-
Notifications
You must be signed in to change notification settings - Fork 30
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
Fix issue 372: resulting tuning config file now preserve comments #373
base: master
Are you sure you want to change the base?
Conversation
Coverage Report
Files without new missing coverage
273 files skipped due to complete coverage. Coverage success: total of 98.10% is above 98.06% 🎉 |
|
"sentencepiece>=0.1.96", | ||
"optuna>=4.0.0", | ||
"plotly>=5.18.0", | ||
"ruamel.yaml<0.18.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the cap ?
"sentencepiece>=0.1.96", | ||
"optuna>=4.0.0", | ||
"plotly>=5.18.0", | ||
"ruamel.yaml<0.18.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be best to avoid adding new dependencies. If I'm not mistaken, using edsnlp.tune now requires:
- ruaml.yaml which is indeed better than PyYAML and more actively maintained
- and configobj which, although mature, doesn't seem actively maintained and adds more than simple comment preservation since it contains its own validation engine
if config_path.endswith("yml") or config_path.endswith("yaml"): | ||
config_file = os.path.join(output_dir, "config.yml") | ||
else: | ||
config_file = os.path.join(output_dir, "config.cfg") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we check the content of the produced config file ? As written here, the test would pass without the comment preservation, which is what you wanted to ensure in the first place :)
Description
Resulting tuning config file now preserve comments from original config file.
Changes
tune.py
: addwrite_final_config
method that read original config with ruamel.yaml, update it with optimal hyperparameters found during tuning, then write it inoutput_dir
.Checklist