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

Use Multiple Bundle Config Files With Inference/Training #1549

Open
ericspod opened this issue Sep 19, 2023 · 3 comments
Open

Use Multiple Bundle Config Files With Inference/Training #1549

ericspod opened this issue Sep 19, 2023 · 3 comments

Comments

@ericspod
Copy link
Member

Is your feature request related to a problem? Please describe.
One of the best practice concepts we're documenting with bundles is having a config file with common definitions used by inference or training configs. This would be "common.json" or "common.yaml", and would for example be loaded first before "inference.json" or "train.json". MONAILabel currently loads only one file and optionally will load "multi_gpu_train.json/yaml", if "common.json/yaml" is present would follow best practice to load this file first.

Describe the solution you'd like
The bundle infer or train tasks should load "common.json/yaml" before infer/train configs. This should be included in the constants data structures used by these tasks to track what files are searched for. This behaviour should also be clearly documented.

Describe alternatives you've considered
Currently definitions have to be duplicated across multiple scripts to ensure compatibility with MONAILabel. This is error-prone and not modular.

Additional context
This is an important change I feel in conjunction with the bundle work we're doing for the 1.3 core release.

@ericspod
Copy link
Member Author

CC @SachidanandAlle @diazandr3s Would you have had a chance to take a look at this? Without our updates for bundles I'd like to see what we can do here to keep Label aligned with what I feel is best practice. We could consider an additional tutorial here on creating a bundle from scratch and running it locally with Label.

@SachidanandAlle
Copy link
Collaborator

SachidanandAlle commented Oct 9, 2023

Actually I like the BundleWorkflow => InferenceWorkflow || TrainWorkflow

We infact deprecate python based (similar abstraction) which we had introduced in MONAI Label sample-apps and make everything uniform based on the above.

I can see you have defined the entry point for these workflows.. and MONAI Label can directly call those entry points.
At any stage if it wants to extend, there is a scope to extend certain methods as well.

I wish, soon we can deprecate whole ConfigWorkflow (in my opinion its a big tech-debt)

Post 0.8 release, we can consider this unification as the next task. It simplifies and avoids any kind of duplication.
Actually more opportunities for anyone to start with MONAI Label and export it as a bundle at the end.. and vice versa..

@ericspod
Copy link
Member Author

Do you mean that you would be deprecating the use of bundles which use configuration files? JSON/YAML config files are still going to be the main way bundles are defined so that would limit the scope for Label a lot if so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

2 participants