Skip to content
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

document env vars #5030

Merged
merged 2 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions content/docs/dvclive/env.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# dvclive.env
# Environment Variables

List of environment variables to configure DVCLive behavior.

Expand All @@ -13,5 +13,7 @@ os.environ[env.DVCLIVE_OPEN] = "True"
- `DVCLIVE_LOGLEVEL`: Configure the
[logging level](https://docs.python.org/3/library/logging.html#logging-levels)
of DVCLive. Defaults to `WARNING`.
- `DVCLIVE_OPEN`: If True, DVCLive will try to automatically open the HTML
generated by `Live.make_report()` in the default browser. Defaults to `False`.
- `DVCLIVE_OPEN`: If `true`, DVCLive will try to automatically open the HTML
generated by `Live.make_report()` in the default browser. Defaults to `false`.

See also [DVC environment variables](/doc/user-guide/env).
4 changes: 4 additions & 0 deletions content/docs/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@
}
]
},
{
"label": "Environment Variables",
"slug": "env"
},
"troubleshooting",
{
"label": "Anonymized Usage Analytics",
Expand Down
23 changes: 23 additions & 0 deletions content/docs/user-guide/env.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Environment Variables

List of environment variables to configure DVC behavior.

- `DVC_EXP_AUTO_PUSH`: If `true`, run `dvc exp push` at the end of a successful
<abbr>experiment</abbr>.
- `DVC_EXP_GIT_REMOTE`: The name of the Git remote to use in `DVC_EXP_AUTO_PUSH`
(for example, `origin`).
- `DVC_NO_ANALYTICS`: If `true`, disables
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `DVC_NO_ANALYTICS`: If `true`, disables
- `DVC_NO_ANALYTICS`: If set, disables

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@skshetry Why is it your preference? I kind of see the logic, but part of me feels it's better to give an example of a valid value for the env var.

Copy link
Member

@skshetry skshetry Dec 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We used DVC_NO_ANALYTICS to take effect on any value because with this envvar, you only want to disable analytics. And, tbh with these envvars, I can never figure out if it should be set as 0/1/true/yes/no.

I am fine with showing an example. I wasn't sure if this was a reference or not. I'm fine with what you have.

[analytics](/doc/user-guide/analytics). Overrides `dvc config core.analytics`.
- `DVC_PAGER`: Set what program DVC uses for paging output (for example,
`more`).
- `DVC_STUDIO_OFFLINE`: If `true`, disables sharing
[live experiments](/doc/studio/user-guide/experiments/live-metrics-and-plots)
even if the DVC Studio token is set. Overrides `dvc config studio.offline`.
- `DVC_STUDIO_REPO_URL`: Set URL of Git remote associated with the DVC Studio
project. Overrides `dvc config studio.repo_url`.
- `DVC_STUDIO_TOKEN`: Set DVC Studio access token to use. Overrides
`dvc config studio.token`.
- `DVC_STUDIO_URL`: Set URL of Studio to use (in case of self-hosted DVC Studio
instance). Overrides `dvc config studio.url`.

See also [DVCLive environment variables](/doc/dvclive/env).
Loading