Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 18732

Extract current running stage from dvc

$
0
0

I'm conducting an experiment using 'dvc repro -f', where multiple stages are executed according to the dvc.yaml configuration. For instance:

Stages: Training:   foreach:    -cycle: 0    -cycle: 1    -cycle: 2   do:    cmd:     python train.py Selection:   foreach:    -cycle: 0    -cycle: 1    -cycle: 2   do:    cmd:     python train.py

During the execution of each stage, such as the training stage at cycle 0, I aim to extract its stage name, like 'Training_0', within a Python program and during selection stage it should be Selection_0. I'm seeking a method to extract this information either while the stage is being executed or just before its execution begins. i tried using the dvc.api but the api does not return the current stage that is running. How can I achieve this?


Viewing all articles
Browse latest Browse all 18732

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>