aimhubio / aim

Aim 💫 — An easy-to-use & supercharged open-source experiment tracker.
https://aimstack.io
Apache License 2.0
5.23k stars 321 forks source link

Add support for setting Run name via Run.__init__ #2190

Open vakker opened 2 years ago

vakker commented 2 years ago

🐛 Bug

When I set the run_hash manually I get:

Setting custom `Run.hash` value is deprecated! Consider setting `Run.name` instead. This functionality will be removed in version 3.15.

To reproduce

aim.Run(experiment="asd", run_hash="potato")

Expected behavior

The warning is clear per se, however the fix is not. It comes from here. The Run class doesn't have a name property, nor a parameter to its __init__. Am I missing something?

Environment

alberttorosyan commented 2 years ago

Hey @vakker! Adding the name argument to Run.__init__ will resolve the issue. Meanwhile, can you try to set the name right after creating Run instance?

run = aim.Run(experiment="asd")
run.name = "potato"
vakker commented 2 years ago

Yeah, setting it after the init works. But then is it used anywhere? The Run class doesn't seem to use the name property anywhere.

alberttorosyan commented 2 years ago

@vakker the Run.name is displayed in UI (see attached screenshot), as well as can be used to filter runs, metrics when doing queries: run.name == "my run" and metric.context.subset == "train"

Screen Shot 2022-09-22 at 14 25 19
alberttorosyan commented 2 years ago

as for the setting the name via __init__, could you please change the issue description accordingly? alternative would be to submit the new feature request and close this one.

vakker commented 2 years ago

@alberttorosyan thanks, that makes sense. I can change the description, but to what exactly?

alberttorosyan commented 2 years ago

Hey @vakker! Sorry for late response; somehow missed your last comment. I think something like this would be a good match: Add support for setting Run name via Run.__init__

sharathmk9 commented 11 months ago

Hi @SGevorg, We have developed this features internally that user can choose the optional run name Run(name='my-run') or by setting env variable export __AIM_RUN_NAME__=my-run If no one has started the development, we can plan to move the changes to this repo. Thanks