iterative / dvc

🦉 ML Experiments and Data Management with Git
https://dvc.org
Apache License 2.0
13.67k stars 1.17k forks source link

Unable to extract dvc Stage Name #10355

Closed rishabhsharma22 closed 6 months ago

rishabhsharma22 commented 6 months ago

Currently there is no way to extract dvc Stage Name for the current stage that is being run by dvc. It will be a good idea to create a environment variable that can extract dvc stage name.

skshetry commented 6 months ago

It will be a good idea to create a environment variable that can extract dvc stage name.

Could you please elaborate why this is a good idea? What are the usecases?

rishabhsharma22 commented 6 months ago

Sure, please take a look at the given question on stack overflow. There are ways to extract the stage name based on your needs when one wants by passing them as arguments. However, in specific cases when the stage name is needed for example when you want to keep a track of hyperparameters at every cycle fir a given experiment. Here is a reference question https://stackoverflow.com/questions/78169479/extract-current-running-stage-from-dvc

skshetry commented 6 months ago

Can you share a concrete example? What dvc.api are you using in your script?