-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
checkpoints/live: move execution env to stage #5257
Conversation
This looks ok to me with the way checkpoints and dvclive are currently defined, but there has been some discussion on whether or not checkpoint should just be a stage level flag in the future, rather than an output level flag. Not sure if the same consideration would apply to dvclive? |
@pmrowla |
I think having it in |
7d84184
to
79cc44f
Compare
@pmrowla moved |
@pared Looks like PR and commit titles need an update too? |
79cc44f
to
e8aab41
Compare
dvc/stage/__init__.py
Outdated
elif out.checkpoint and checkpoint_func: | ||
from dvc.env import DVC_CHECKPOINT, DVC_ROOT | ||
|
||
env.update({DVC_CHECKPOINT: "1", DVC_ROOT: self.repo.root_dir}) |
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.
This isn't because of your changes, but looking at this now, I think we should be setting DVC_ROOT
all the time in the calling env()
function. (DVC_CHECKPOINT
should still only be set inside this if
case)
For experiments that are run in temp-dirs (and not only checkpoint experiments), it will always be useful for user's code to be able to see where it is being run, since they may need to work with relpaths from that directory (instead of relpaths inside their git/dvc repo workspace). And outside of the experiment context, it won't hurt us to set DVC_ROOT
for regular repro
runs as well.
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.
Good point!
e8aab41
to
f421fb1
Compare
β I have followed the Contributing to DVC checklist.
π If this PR requires documentation updates, I have created a separate PR (or issue, at least) in dvc.org and linked it here.
Thank you for the contribution - we'll try to review it as soon as possible. π
This PR aims to make
Output
source of the execution environment forStage.run
. It seems that outputs are the cause ofenv.
Related: #4902 (comment)