From bd339fb94efd2db6b7294293fbf2cf314f498a9f Mon Sep 17 00:00:00 2001 From: skshetry <18718008+skshetry@users.noreply.github.com> Date: Thu, 20 Apr 2023 15:38:05 +0545 Subject: [PATCH] sharing exp: document studio.token (#4470) --- content/docs/command-reference/exp/push.md | 7 +++++++ .../live-metrics-and-plots.md | 16 +++++++-------- .../project-structure/configuration.md | 20 +++++++++++++++++++ 3 files changed, 35 insertions(+), 8 deletions(-) diff --git a/content/docs/command-reference/exp/push.md b/content/docs/command-reference/exp/push.md index a04eeca63e..92c981b95a 100644 --- a/content/docs/command-reference/exp/push.md +++ b/content/docs/command-reference/exp/push.md @@ -47,6 +47,13 @@ to see experiments in the remote. This command will also try to `dvc push` all cached data associated with the experiments to [remote storage], unless `--no-cache` is used. +If `studio.token` config or `DVC_STUDIO_TOKEN` environment variable is set, DVC +will notify Studio about new experiments, and display a Studio project URL to +view experiments. +[Get the token](https://studio.iterative.ai/user/_/profile?section=accessToken) +or check +[this guide on how to create an access token](/doc/studio/user-guide/projects-and-experiments/live-metrics-and-plots#set-up-an-access-token). + ## Options - `-A`, `--all-commits` - push all experiments in the repository (overrides diff --git a/content/docs/studio/user-guide/projects-and-experiments/live-metrics-and-plots.md b/content/docs/studio/user-guide/projects-and-experiments/live-metrics-and-plots.md index 3d23d16dad..cf1f2ba68d 100644 --- a/content/docs/studio/user-guide/projects-and-experiments/live-metrics-and-plots.md +++ b/content/docs/studio/user-guide/projects-and-experiments/live-metrics-and-plots.md @@ -12,11 +12,11 @@ This requires a 2-step process: ## Set up an access token -Iterative Studio uses access tokens to authorize [DVCLive] to send live updates -to the metrics and plots. The access token must be present in any request that -sends data to the Iterative Studio ingestion endpoint. Requests with missing or -incorrect access tokens are rejected with an appropriate HTTP error code and -error message. +Iterative Studio uses access tokens to authorize DVC and [DVCLive] to send +experiments and live updates to the metrics and plots. The access token must be +present in any request that sends data to the Iterative Studio ingestion +endpoint. Requests with missing or incorrect access tokens are rejected with an +appropriate HTTP error code and error message. ### Create and manage access token @@ -29,14 +29,14 @@ handy if you suspect that your account security may have been compromised. ### Provide access token to experiment -DVCLive expects the access token to be set in the `STUDIO_TOKEN` environment +DVCLive expects the access token to be set in the `DVC_STUDIO_TOKEN` environment variable. If you are running the experiment locally, you can set this environment variable when submitting the training job. ```cli -$ STUDIO_TOKEN=**** dvc exp run +$ DVC_STUDIO_TOKEN=**** dvc exp run ``` If you are running the experiment as part of a CI job, a secure way to provide @@ -49,7 +49,7 @@ example below). steps: - name: Train model env: - STUDIO_TOKEN: ${{ secrets.STUDIO_TOKEN }} + DVC_STUDIO_TOKEN: ${{ secrets.DVC_STUDIO_TOKEN }} ``` ## Send and view live metrics and plots diff --git a/content/docs/user-guide/project-structure/configuration.md b/content/docs/user-guide/project-structure/configuration.md index 7eade7a8b5..8b737c05b6 100644 --- a/content/docs/user-guide/project-structure/configuration.md +++ b/content/docs/user-guide/project-structure/configuration.md @@ -65,6 +65,8 @@ within: - [`plots`](#plots) - options for configuring `dvc plots`. - [`state`](#state) - see [Internal directories and files][internals] to learn more about the state database. +- [`studio`](#studio) - options for configuring + [Iterative Studio](https://studio.iterative.ai/) token - [`index`](#index) - see [Internal directories and files][internals] to learn more about remote index files. @@ -389,6 +391,24 @@ have no effect.
+## studio + +- `studio.token` - Studio access token to use. When this is set, DVC uses this + to notify Studio of new experiments. For security reasons, we advise setting + token to either a local or a global config. This can also be specified through + `DVC_STUDIO_TOKEN` environment variable. + + [Get the token](https://studio.iterative.ai/user/_/profile?section=accessToken) + or check + [this guide on how to create an access token](/doc/studio/user-guide/projects-and-experiments/live-metrics-and-plots#set-up-an-access-token). + +- `studio.url` - URL of Studio to use (in case of self-hosted Studio instance). + This can also be specified through `DVC_STUDIO_URL` environment variable. + +
+ +
+ ## index