Skip to content

Commit

Permalink
sharing exp: document studio.token
Browse files Browse the repository at this point in the history
  • Loading branch information
skshetry committed Apr 18, 2023
1 parent 46e5578 commit ae8896c
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 9 deletions.
5 changes: 5 additions & 0 deletions content/docs/command-reference/exp/push.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ to see experiments in the remote.
This command will also try to `dvc push` all <abbr>cached</abbr> 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
Expand Down
2 changes: 1 addition & 1 deletion content/docs/command-reference/exp/remove.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ With `--queue`, the list of experiments awaiting execution is cleared instead.
include all first-parent commits (similar to `git log -n`).

- `-g`, `--git-remote` - Name or URL of the Git remote to remove the experiment
from
from.

- `-h`, `--help` - shows the help message and exit.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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
Expand Down
18 changes: 18 additions & 0 deletions content/docs/user-guide/project-structure/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -378,6 +380,22 @@ Composition].

<details>

## 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.

</details>

<details>

## index

- `index.dir` - specify a custom location for the directory where remote index
Expand Down

0 comments on commit ae8896c

Please sign in to comment.