question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deriving an experiment name from a given config

See original GitHub issue

Hello, I am not sure if this is a trivial question. I want to change an experiment’s name depending on the used configuration. The reason is to have a clear overview over multiple experiments with different configurations in visualization tools like omniboard. Because I use seml to run my sacred experiments within a slurm system, I have no control over executing the experiment.run() function.

I tried to set _run.experiment_info["name"] = "my_new_name" in the main and a pre_run_hook function, but the change did not persist to the MongoDB.

After reading issue 110 (basically the reverse of what I want to do), I tried the mentioned option_hook. Using this, I can successfully change the experiment’s name and it persists to the MongoDB. However, in the option hook I don’t have access to my configuration and hence, I can’t update the name in the way I want to.

Is this use case currently supported and if, how could I accomplish a configuration dependent name change?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
thequilocommented, Feb 22, 2022

I don’t know how seml works, does it pass the yaml file by ex.add_config(yaml_file) or by calling the sacred script with with config.yaml? It should be possible to define a config scope:

ex = Experiment('default_name')

@ex.config
def config(): 
    some_config_value = None   # Will be set form your yaml file when called with `with config.yaml`
    ex.path = f'derived_name_{some_config_value}'
0reactions
thequilocommented, Feb 22, 2022

Glad that it worked! I’ll close the issue for now

Read more comments on GitHub >

github_iconTop Results From Across the Web

Experiment name from config #110 - IDSIA/sacred - GitHub
Currently my setup looks like this: yaml files that define my model architectures ... Deriving an experiment name from a given config #861....
Read more >
Experiment Configuration - Triage Documentation
The configuration helps users define the parameters in an experiment. ... If multiple arguments are specified, Triage will run experiments on each available ......
Read more >
Experiment Config Reference - Read the Docs
This document lists field names with camelCase . If users use these fields in the pythonic way with NNI Python APIs (e.g., nni.experiment...
Read more >
Make Experiments! - Project Management Service
from a specific experiment type like 'amip-LR.config'. ... The value for the setting given by the variable name between '%{' and '}' is....
Read more >
Configure Experiments with wandb.config - Documentation
config object in your script to save your training configuration: hyperparameters, input settings like dataset name or model type, and any other independent ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found