-
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
Add support for overwriting parameters via CLI #79
Conversation
Co-authored-by: Leon Hetzel <MxMstrmn@users.noreply.github.com>
seml/add.py
Outdated
@@ -136,7 +137,7 @@ def add_experiments(db_collection_name, config_file, force_duplicates, no_hash=F | |||
if 'conda_environment' not in seml_config: | |||
seml_config['conda_environment'] = os.environ.get('CONDA_DEFAULT_ENV') | |||
|
|||
# Set Slurm config with default parameters as fall-back option | |||
# Set Slurm config with default parameters as fall-back option | |||
slurm_config = merge_dicts(SETTINGS.SLURM_DEFAULT, slurm_config) |
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.
On a related note: can we also make it possible to overwrite slurm parameters when starting experiments? Sometimes I screw up the partition or so and then I have to re-queue everything.
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.
That sounds like a good idea. However, I think we should open a follow-up issue on that and have a separate PR since the logic will be distinct from this one.
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.
Wouldn't this use the same interface? e.g. --with slurm.sbatch_options.mem=25G
or so?
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.
I would use a separate argument and unify the style with seml jupyter
where you have the -sb
option to supply sbatch parameters. However, there you need to provide a dictionary which is not very user-friendly. In conjunction with this PR it could look something like:
seml <collection> add <yaml> -o dataset=imagenet -sb mem=25G
We could reuse the key-value parsing we introduce with this PR for the sbatch parameters but integrating both into one argument makes parsing more difficult and user always have to nest their parameters and sbatch options with sbatch.xyz
and config.xyz
.
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.
I agree that nesting with config.
each time is not super user friendly. I suggest we do -sb mem=25G partition=gpu_all
etc. separately (which is I think what you suggested)?
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.
Yes :)
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.
Looks good. Feel free to merge!
Co-authored-by: Leon Hetzel
Reference issue
Issue #71
What does this implement/fix?
Additional information
<key>
should use the flattened dictionary notation with.
and<value>
is evaluated byeval
.