Skip to content

[WIP] k4MLJetTagger implementation#75

Closed
saracreates wants to merge 6 commits intokey4hep:mainfrom
saracreates:jet-tagger-impl
Closed

[WIP] k4MLJetTagger implementation#75
saracreates wants to merge 6 commits intokey4hep:mainfrom
saracreates:jet-tagger-impl

Conversation

@saracreates
Copy link
Contributor

BEGINRELEASENOTES

  • [WIP]
  • add k4MLJetTagger with flag --enableMLJetTagger to CLD reconstruction
  • set model used for inference with --MLJetTaggerModel (default is set to model_ParT_ecm240_cld_o2_v5. Model types can be chosen from ./CLDConfig/HighLevelReco/models_MLJetTagger.yaml)
  • Every time a new tagger is implemented add the information about it as a new entry in ./CLDConfig/HighLevelReco/models_MLJetTagger.yaml.

ENDRELEASENOTES

@saracreates
Copy link
Contributor Author

@tmadlener helped me to find the issue why the JetTag collections are not attached (Thank you!). I am using svc = IOSvc("IOSvc") in my tagger implementation while CLDReconstruction.py still uses PodioInput and PodioOutput

It is not possible to add the tagger output to PodioOuput. Therefore, we try to switch to IOSvc in CLDConfig

@saracreates
Copy link
Contributor Author

The RefinedJetTag_X collections are now attached to the output.

There are still things to modify / clean up the CLDReconstruction.py

  • These changes only work for EDM4hep output. Adopt it to work with LCIO too!
  • Instead of simply taking the input files use the dedicated function create_reader. Don't know how what read is and how to define it with IOSvc . Once modified, turn on this again.
  • Use create_writer functions for outputs too

@Zehvogel
Copy link
Collaborator

Zehvogel commented Apr 29, 2025

I would suggest that we:

Making these changes should be very straightforward, but our test/validation coverage is not great, so we might end up spending a lot of time on that :/

@Zehvogel Zehvogel self-assigned this Apr 29, 2025
This was referenced Apr 30, 2025
@saracreates
Copy link
Contributor Author

@kjvbrt found a bug. If --enableMLJetTagger is not set, for some reason no new collections are attached to the ouptut file at all. E.g. SiTracks, RefinedVertexJets, PrimaryVertices or PandoraPFOs are missing. I don't understand where this is coming from yet as the flag --enableMLJetTagger only 1) converts LCIO collections to edm4hep and 2) adds the algorithm to the list. It does not modify the last processor. Maybe this has something to do with switching to IOSvc...?

@Zehvogel
Copy link
Collaborator

Zehvogel commented May 5, 2025

@kjvbrt found a bug. If --enableMLJetTagger is not set, for some reason no new collections are attached to the ouptut file at all. E.g. SiTracks, RefinedVertexJets, PrimaryVertices or PandoraPFOs are missing. I don't understand where this is coming from yet as the flag --enableMLJetTagger only 1) converts LCIO collections to edm4hep and 2) adds the algorithm to the list. It does not modify the last processor. Maybe this has something to do with switching to IOSvc...?

We would need to see the exact setup for this to say anything. I cannot reproduce that in #78 where I put both the change to the proper change to the IOSvc (#77) and the relevant parts from this PR together into one. There all the collections seem to be there without the flag.

@jmcarcell
Copy link
Member

Closed in favor of #78

@jmcarcell jmcarcell closed this Jan 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants