-
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
studio: push exp refs #9295
Comments
I think this could actually be moved to a DVC issue. It should be that every DVC exp commit generated by This also probably requires inferring a default Git branch to push to (there is a related discussion about |
It makes sense to me.
Not sure I understand what is that requirement about |
Sorry, I meant inferring a default Git remote. |
It appears that it is already handled in the current exp push: dvc/dvc/repo/experiments/push.py Line 59 in 24e10e0
|
🤨 Then why does |
Because those 2 things (remote arg, env var) are from before the code I linked, which was introduced for Studio integration. |
I'm in favor of making the git remote optional in all these places. Even in a forking workflow, I don't really see the problem since there's an option to configure it, and the typical workflow would still be to push to I know @pmrowla suggested he typically pushes to |
It's not inferring default remote, it's using the same remote where |
IIRC |
What does
I suggest we keep it but make it optional. |
dvc-studio-client uses branch’s upstream remote that is set (usually when doing whereas Note: there is no default remote in Git, only default remote for each branch. |
Is dvc-studio-client using that solely to decide which studio project url to use? Can we pass a remote to dvc-studio-client? Even if we decide to try to infer the remote, I think we will always want to have an option to set it explicitly, and we should be respecting that in dvc-studio-client. |
@skshetry @daavoo @shcheklein (and anyone else interested): I updated my thoughts on this ticket at the top. PTAL and give your feedback so we can finalize this. I'd like to make a decision before we put out any content about this so we don't have to change it too many times. |
Not sure I understand the following:
Do you mean that the "live sharing" (sending updates to |
Yes, that's what I meant @daavoo. |
Ok. I slightly disagree then 😄 I reason that |
Good point. Currently we can push/share 1) live metrics, 2) exp refs, and 3) cache updates. I think of live metrics as a temporary placeholder for exp refs (are there times when it would be important to share live metrics but not the exp ref?). For cache updates, if we go in the direction of using Studio for recovering interrupted training jobs, we may have live pushes to the cache in some scenarios. I would prefer to split behavior by cache/no-cache instead of live/non-live. We could make the auto push option a string (like suggested here) that specifies what gets auto-pushed ( |
👍 |
How would dvclive work? It still has to use In any case, it seems we need both environment variables. |
Or, we could encourage use of cli flag for auto-push, and use STUDIO_TOKEN for live updates. STUDIO_TOKEN=token # only for live updates
dvc exp run --push It will be more explicit this way. :) |
Discussed with @dberenbaum. It looks like we will use the existing We also discussed that we'll need some CLI flags for On DVCLive side, it will have to read from dvc's config, and dvc will have to also set |
For CLI, we could name it |
This quickly got overly complicated 😅 . I can lower the priority of automatically pushing exp refs, and instead let's focus on what's implemented already. The behavior of the env var The minimum I can think of to make them more compatible:
|
DVCLive should auto-discover |
We could do it this way, but is this a reasonable default behavior whenever the token is saved to the config? I would like to save my Studio token once to my global config file, but I'd be less likely to do that if it meant all my experiments from all my projects get automatically live shared to Studio. |
I'll suggest keeping this issue open and releasing what we have for now. The only thing that's not possible at this time is not pushing the cache and that can be done by following ways: dvc exp run
dvc exp push <last-exp-run> --no-cache If we want to show the URL in |
@skshetry Agreed we shouldn't let this block anything, but what do you think about this part at least? It seems pretty straightforward, and at least it means someone who sets the env var gets all the benefits you added to |
dvc/dvc/repo/experiments/push.py Line 56 in eef5fb9
I don't have issue with this, although I don't think consistency matters here as the token is applicable for the whole ecosystem, not just dvc. We could support both, prioritizing |
🤦 Sorry, then I guess we are in good shape here.
Yup, I agree with this approach of giving |
Lowering the priority.
@daavoo Thoughts on this? |
No big deal. Can even support both in the same line of code |
Coming back to this one. Rather than automatically pushing to the git and/or dvc remote, WDYT about hinting to do |
Closing this as not planned since I don't think there's any reason to auto-push at the moment. |
DVCLive shoulddvc exp push
experiment refs when:STUDIO_TOKEN
is set (or live sharing to Studio is otherwise enabled)save_dvc_exp=True
(even if usingdvc exp run
; not sure what's best if usingdvc exp run
but notsave_dvc_exp=True
)On the Studio side, this
dvc exp push
should replace the live metrics with the exp ref. This would help unify the live metrics and exp refs. For typical workflows, it means that live metrics would show live updates only temporarily and eventually show a "completed" exp ref.Edit: update from related discussion. DVCLive should not have to push experiment refs. DVC should push them during either
dvc exp save
ordvc exp run
if the following are both true:studio.token
config option or theDVC_STUDIO_TOKEN
env var (let's renameSTUDIO_TOKEN
toDVC_STUDIO_TOKEN
for consistency with other env vars). In the future, we could also have a way to pass the token via CLI/Python API. We can follow the same conventions for the Studio URL.exp.auto_push
config option or theDVC_EXP_AUTO_PUSH
env var. Like the Studio token, we could also have a way to enable/disable through CLI/Python API. We can follow the same conventions for the Git remote URL, which should be optional.This means including
STUDIO_TOKEN
/DVC_STUDIO_TOKEN
would not be enough on its own to enable live sharing of experiments. I think it's okay because I would push for the onboarding to be made easier via #9265 to not rely on this env var and instead have the env var mostly used for CI.The text was updated successfully, but these errors were encountered: