From b884bca79bbeae93220e35cb17f27b197c110f46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Saugat=20Pachhai=20=28=E0=A4=B8=E0=A5=8C=E0=A4=97=E0=A4=BE?= =?UTF-8?q?=E0=A4=A4=29?= Date: Mon, 17 Apr 2023 08:58:52 +0545 Subject: [PATCH] sharing exp: document studio.token --- content/docs/command-reference/exp/push.md | 5 +++++ .../live-metrics-and-plots.md | 16 ++++++++-------- .../project-structure/configuration.md | 18 ++++++++++++++++++ 3 files changed, 31 insertions(+), 8 deletions(-) diff --git a/content/docs/command-reference/exp/push.md b/content/docs/command-reference/exp/push.md index a04eeca63ea..9deae02d909 100644 --- a/content/docs/command-reference/exp/push.md +++ b/content/docs/command-reference/exp/push.md @@ -47,6 +47,11 @@ 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. Check +[this guide on how to setup 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 3d23d16dadb..cf1f2ba68d5 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 38f17792a58..8e16ff36f46 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. @@ -378,6 +380,22 @@ Composition].
+## studio + +- `studio.token` - + [Studio access token to use](/doc/studio/user-guide/projects-and-experiments/live-metrics-and-plots#set-up-an-access-token). + 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. + +- `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 - `index.dir` - specify a custom location for the directory where remote index