Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring of the TRAINING stage #171

Open
4 tasks
HealthyPear opened this issue Feb 7, 2022 · 3 comments
Open
4 tasks

Refactoring of the TRAINING stage #171

HealthyPear opened this issue Feb 7, 2022 · 3 comments
Labels
enhancement New feature or request input / output new features or issues regarding input and output formats refactoring
Milestone

Comments

@HealthyPear
Copy link
Member

Context

See #91

Description

  • the entry point for protopipe-TRAINING should simply change from pointing to protopipe.scripts.data_training.py to ctapipe-process
  • a new example configuration file training.json should be added to protopipe/aux/ example_config_files, maybe also a pure DL1b one (for DL1a there will be already the example files for using TwoPassWindowSum)
  • the code related to protopipe-MODEL should be updated to support input from ctapipe, namely it should load data from the output of the new protopipe-TRAINING with ctapipe.io.TableLoader
  • all benchmarking notebooks related to the TRAINING stage should be updated to use ctapipe.io.TableLoader

These are the minimal changes to apply in order to not create breaking changes, any other improvement should be the focus of subsequent pull requests.

Caveats

It is not currently possible to refactor the whole pipeline, so the DL2 script won't be interested in these changes.
This means that its configuration will be still done using analysis.yaml.
This is not ideal as it could lead to some issues or bugs...

One idea would be to separate the estimation part of the code in order to use ctapipe-process also for DL2.

@HealthyPear HealthyPear added enhancement New feature or request input / output new features or issues regarding input and output formats refactoring labels Feb 7, 2022
@HealthyPear HealthyPear added this to the v0.6.0 milestone Feb 7, 2022
@kosack
Copy link
Contributor

kosack commented Feb 11, 2022

you could perhaps also consider generating a JSON config file for ctapipe-process from your YAML config, rather than supplying one. That would ensure they are synchronized.

@HealthyPear
Copy link
Member Author

But they don't have the same nomenclature, how would you do this automatically (I am assuming this since you wrote "generating")?

@kosack
Copy link
Contributor

kosack commented Feb 11, 2022

You would have to write a function that translates one to the other. Not pretty, but it would work. write_ctapipe_config(protpipe_config_dict, filename)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request input / output new features or issues regarding input and output formats refactoring
Projects
None yet
Development

No branches or pull requests

2 participants