Skip to content
Snippets Groups Projects

YAML configuration of reconstruction parameters [online]

Merged Sergei Zharko requested to merge s.zharko/cbmroot:event-reco-par into master
All threads resolved!

The merge request introduces a configuration of the online parameters vs. the reconstruction parameter tag. The tag is defined for a particular runID range. Within the range detector calibrations and alignment matrices must be unchanged (e.g., changing the alignment matrices requires re-generation of the hit-finder and tracking parameters).

EDIT PAL: This MR needs (is built on top of) !2123 (merged)
This merge request is required for !2094.

Conventions:

  • all the parameter files, which are required for the reconstruction (event or timeslice), are stored under a particular tag, which is defined in CbmRuntimeDatabase.yaml for a given runID range;

  • all the paths are defined relative to ${VMCWORKDIR}/parameters/online directory

  • the top directory for reconstruction parameter files and the configuration file is ${VMCWORKDIR}/parameters/online/recoPar

  • each file has always the same name (e.g. "StsHitfind.yaml", "TofHitfinerPar.yaml" etc.)

    UPDATE AFTER WORKING ON COMMENTS

  • all configuration for cbm::algo (including unpackers, hit-finders, tracking, event-building, event-selection, event-triggering, v0-finder) is defined in a common yaml-config (the name is optional);

  • paths to the parameters of the algorithms are defined in node "parFiles" of the main config relative to the path the main config;

  • cbmreco accepts a path to the main config, not to a common parameters directory for online (option -p is re-used here);

  • online running of cbmreco does not require any information on the runID to define parameters, offline running of the algorithms in cbmreco rely on pre-defined MainConfig.yaml files, stored in cbmroot_parameter repository by path parameters/online/recoPar/<tag>/MainConfig.yaml;

  • access to the MainConfig.yaml path by a given run ID is provided by CbmRunDatabaseContainer::GetAlgoMainConfigPath() from C++ code (including ROOT macros) relatively to ${VMCWORKDIR} and by calling $ run_info --run <runID> --algo-config from bash absolutely.

Edited by Sergei Zharko

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Sergei Zharko added 14 commits

    added 14 commits

    Compare with previous version

  • Sergei Zharko added 4 commits

    added 4 commits

    Compare with previous version

    • Resolved by Sergei Zharko

      I've been thinking about this development, and I have a few reservations. I shared them during our online meeting, but I wanted to reiterate them here since I've been asked for a review.

      I don't have any formal objections to this first MR - from a quick review, it looks fine technically. However, my concern with this MR is that I believe the overall parameter handling approach in the online binary is heading in the wrong direction. While these changes don't make it substantially worse than before, they perhaps make it "prettier wrong."

      I think storing parameters in .yaml files makes sense. What I find structurally questionable is hardcoding filenames or path components of these files in the code. In my view, there should be a main configuration file passed as a parameter to the program. For an additional indirection layer, this file could then specify the names of (or relative paths to) other .yaml files.

      Felix initially violated this principle when he introduced a configuration DIRECTORY as a parameter, where "well known filenames" are searched for. Since then, development has continued further in what I consider a structurally unfavorable direction.

      Things go really wrong in my opinion since we essentially built parameter versioning into the online binary. I understand the motivation: we want to test offline with different .tsa files from different runs, and it should "just work." But this approach is based on a fundamentally offline-centered system view. We need to be able to test and develop the online binary offline, but online deployment is the goal of all this work. Online, there aren't different versions - there's only NOW. And exactly this isn't properly supported by this offline system.

      I believe we don't need much to get to a fundamentally usable online parameter handling:

      1. A directory with .yaml files that are valid NOW

      2. A way to modify these (could be a UI for shifters, a Git repo that's automatically checked out there, or initially just a text editor under a shared user account - we already have the latter)

      3. Archiving the directory for each run (simple and good would be the ATLAS solution: automatically commit the directory to a Git repository at the beginning of each run and define a tag for the run)

      For retrospective work with .tsa files, you'd simply retrieve the corresponding parameters that were current for each run. With Git, this could be more elegant in the future. And if you want to continue offline and pursue hypotheses like "How would it have run online if we had already had the better alignment from my_new_alignment.yaml back then?" - you'd modify the corresponding file in your copy and try it.

      What I see here is a mixing/confusion of concepts. A kind of run database was built into the online binary, which doesn't make sense online. This MR now moves this RunDb from the binary partially into specially designed .yaml files. But this doesn't make it better, because it doesn't belong there either.

    • Resolved by Sergei Zharko

      Just a heads up, I'll be out of the office starting tomorrow and won't be back until Monday, July 28th. To avoid any delays, I'd really appreciate it if someone could take over as a reviewer in my absence. Thanks a bunch!

  • Sergei Zharko added 13 commits

    added 13 commits

    Compare with previous version

    • Resolved by Sergei Zharko

      I would propose a following parameter handling scheme:

      • Configuration -- a list of different settings, which can be configured by a user for a particular execution of the cbmreco in a single YAML-file:

        • common properties of cbm::algo: active subsystems (to be removed from cbm::algo::Options), contents of cbm::algo::RecoParams (RecoParams.h, RecoParams.yaml)
        • configuration for different algorithms in a dedicated YAML node (e.g. tracking - ca_params_online.yaml, event building - EventbuildConfig.yaml)
        • paths to different parameter files (e.g., to kf::Setup, hitfinder parameters, readout parameters)
      • Parameter files -- individual parameters of the algorithms, which must be provided by experts and should be prepared in advance

      @v.friese, @j.decuveland, @p.-a.loizeau, @f.uhlig, @se.gorbunov, what do you think about it?

  • Volker Friese requested review from @p.-a.loizeau and removed review request for @j.decuveland

    requested review from @p.-a.loizeau and removed review request for @j.decuveland

  • Pierre-Alain Loizeau changed the description

    changed the description

  • Pierre-Alain Loizeau mentioned in merge request !2097

    mentioned in merge request !2097

  • Volker Friese changed milestone to %JUL25

    changed milestone to %JUL25

  • Sergei Zharko added 21 commits

    added 21 commits

    Compare with previous version

  • Sergei Zharko added 33 commits

    added 33 commits

    Compare with previous version

  • Sergei Zharko added 1 commit

    added 1 commit

    Compare with previous version

  • Sergei Zharko added 1 commit

    added 1 commit

    Compare with previous version

  • added 8 commits

    Compare with previous version

  • Sergei Zharko added 4 commits

    added 4 commits

    Compare with previous version

  • Considering the general comments by @j.decuveland, I think that they are basically accounted for in the updates to this MR.

    I must confess I still donot see the full picture of parameter handling, but I am convinced that this MR improves the current situation. I was not able to digest every detail, but I will fo gor merging.

  • Volker Friese requested review from @v.friese and removed review request for @p.-a.loizeau

    requested review from @v.friese and removed review request for @p.-a.loizeau

  • Volker Friese approved this merge request

    approved this merge request

  • Sergei Zharko changed the description

    changed the description

  • Sergei Zharko added 1 commit

    added 1 commit

    • f98a94f8 - bugfix: proper handling of std::getenv() in CbmRunDatabaseContainer and run_info

    Compare with previous version

  • Sergei Zharko added 6 commits

    added 6 commits

    • 2fda536a - 1 commit from branch computing:master
    • cb89d7d8 - online:
    • cd0347e7 - online: parameter file handling
    • 1713cfea - updates to run_info service
    • c4bf06b5 - parameters hash bump
    • bc79e354 - bugfix: proper handling of std::getenv() in CbmRunDatabaseContainer and run_info

    Compare with previous version

  • Volker Friese resolved all threads

    resolved all threads

  • Pierre-Alain Loizeau mentioned in merge request !2168 (merged)

    mentioned in merge request !2168 (merged)

  • merged

  • Please register or sign in to reply
    Loading