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

DefaultTrainer with LazyConfigs #5176

Open
carandraug opened this issue Dec 7, 2023 · 1 comment
Open

DefaultTrainer with LazyConfigs #5176

carandraug opened this issue Dec 7, 2023 · 1 comment
Labels
enhancement Improvements or good new features

Comments

@carandraug
Copy link

🚀 Feature

Enable use of LazyConfigs with the existing Defaultrainer

Motivation & Examples

DefaultTrainer is quite nice. Straight from the documentation "it includes more standard default behaviors that one might want to opt in, including default configurations for optimizer, learning rate schedule, logging, evaluation, checkpointing etc.". However, it is limited to yacs configs.

If one is using the new lazyconfigs, the advice is to copy paste the code in lazyconfig_train_net.py and start hacking at it, which can be a bit daunting. I think it would make things simpler if one could just use DefaultTrainer to begin with and then expand as needed. Effectively the same approach one would take with YACS configs.

Suppose that DefaultTrainer did not exist. The advice for someone with a YACS config would then be to copy a tools/train_net.py (a much more complicated one - the current one effectively calls DefaultTrainer) and start from there. Having DefaulTrainer simplifies this. Unfortunately, this option does not exist if one is starting with lazyConfig files.

Having had a look at it, I feel that it should be possible (a lot of the code in DefaultTrainer is similar to the code in lazyconfig_train_net.py). There's a few cases that I'm unsure about but if I know that there is interest by upstream, then I could spend time working on it.

Please let me know if there's interest on extending DefaultTrainer to support LazyConfig.

@carandraug carandraug added the enhancement Improvements or good new features label Dec 7, 2023
@hiyyg
Copy link
Contributor

hiyyg commented Dec 10, 2023

That would be very great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements or good new features
Projects
None yet
Development

No branches or pull requests

2 participants