Description
DVCLive should dvc 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
or dvc exp run
if the following are both true:
- The Studio token is available. This can be found either in the
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. - Automatic sharing/pushing is enabled. This can be enabled via the
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.