mirror of
https://github.com/clearml/clearml-docs
synced 2025-03-03 02:32:49 +00:00
Fix CLEARML_LOG_ENVIRONMENT info (#887)
This commit is contained in:
parent
e08cb72fac
commit
b377e940aa
@ -1044,7 +1044,7 @@ and limitations on bucket naming.
|
||||
Multiple selected variables are supported including the suffix "\*". For example: "AWS\_\*" will log any OS environment
|
||||
variable starting with "AWS\_". Example: `log_os_environments: ["AWS_*", "CUDA_VERSION"]`
|
||||
|
||||
* This value can be overwritten with OS environment variable `CLEARML_LOG_ENVIRONMENT="[AWS_*, CUDA_VERSION]"`.
|
||||
* This value can be overwritten with OS environment variable `CLEARML_LOG_ENVIRONMENT=AWS_*,CUDA_VERSION`.
|
||||
|
||||
---
|
||||
|
||||
|
@ -17,7 +17,7 @@ but can be overridden by command-line arguments.
|
||||
### General
|
||||
|Name| Description |
|
||||
|---|--------------------------------------------------------------------------------|
|
||||
|**CLEARML_LOG_ENVIRONMENT** | List of Environment variable names. These environment variables will be logged in the ClearML task's configuration hyperparameters `Environment` section. When executed by a ClearML agent, these values will be set in the task's execution environment. |
|
||||
|**CLEARML_LOG_ENVIRONMENT** | List of Environment variable names. These environment variables will be logged in the ClearML task's configuration hyperparameters `Environment` section. When executed by a ClearML agent, these values will be set in the task's execution environment. The list should be specified in the following format: `CLEARML_LOG_ENVIRONMENT=VAR_1,VAR_2`. |
|
||||
|**CLEARML_TASK_NO_REUSE** | Boolean. <br/> When set to `1`, a new task is created for every execution (see Task [reuse](../clearml_sdk/task_sdk.md#task-reuse)). |
|
||||
|**CLEARML_CACHE_DIR** | Set the path for the ClearML cache directory, where ClearML stores all downloaded content. |
|
||||
|**CLEARML_DOCKER_IMAGE** | Sets the default docker image to use when running an agent in [Docker mode](../clearml_agent/clearml_agent_execution_env.md#docker-mode). |
|
||||
|
17
docs/faq.md
17
docs/faq.md
@ -854,18 +854,25 @@ export CLEARML_API_HOST="http://localhost:8008"
|
||||
|
||||
#### How can I track OS environment variables with experiments? <a id="track-env-vars"></a>
|
||||
|
||||
Set the OS environment variable `CLEARML_LOG_ENVIRONMENT` with the variables you need track, either:
|
||||
You can set environment variables to track in an experiment by specifying them in the `sdk.development.log_os_environments`
|
||||
field of the [`clearml.conf`](configs/clearml_conf.md) file:
|
||||
|
||||
```editorconfig
|
||||
log_os_environments: ["AWS_*", "CUDA_VERSION"]
|
||||
```
|
||||
|
||||
You can also use the `CLEARML_LOG_ENVIRONMENT` variable to track environment variables:
|
||||
|
||||
* All environment variables:
|
||||
|
||||
```
|
||||
export CLEARML_LOG_ENVIRONMENT="*"
|
||||
export CLEARML_LOG_ENVIRONMENT=*
|
||||
```
|
||||
|
||||
* Specific environment variables, for example, log `PWD` and `PYTHONPATH`:
|
||||
|
||||
```
|
||||
export CLEARML_LOG_ENVIRONMENT="PWD,PYTHONPATH"
|
||||
export CLEARML_LOG_ENVIRONMENT=PWD,PYTHONPATH
|
||||
```
|
||||
|
||||
* No environment variables:
|
||||
@ -874,6 +881,10 @@ Set the OS environment variable `CLEARML_LOG_ENVIRONMENT` with the variables you
|
||||
export CLEARML_LOG_ENVIRONMENT=
|
||||
```
|
||||
|
||||
:::note Overriding clearml.conf
|
||||
The `CLEARML_LOG_ENVIRONMENT` variable always overrides the `clearml.conf` file.
|
||||
:::
|
||||
|
||||
## ClearML Hosted Service
|
||||
|
||||
#### I run my script, but my experiment is not in the ClearML Hosted Service Web UI. How do I fix this? <a id="hosted-service-no-config"></a>
|
||||
|
@ -43,20 +43,34 @@ Relying on environment variables makes an experiment not fully reproducible, sin
|
||||
runtime.
|
||||
:::
|
||||
|
||||
Environment variables can be logged by modifying the [clearml.conf](../configs/clearml_conf.md) file. Modify the `log_os_environments`
|
||||
parameter specifying parameters to log.
|
||||
Environment variables can be logged to a task by specifying the variables in the `sdk.development.log_os_environments`
|
||||
field of the [`clearml.conf`](../configs/clearml_conf.md) file:
|
||||
|
||||
```editorconfig
|
||||
log_os_environments: ["AWS_*", "CUDA_VERSION"]
|
||||
```
|
||||
|
||||
You can also specify environment variables using the `CLEARML_LOG_ENVIRONMENT` variable.
|
||||
|
||||
You can also specify environment variables using the `CLEARML_LOG_ENVIRONMENT` environment variable:
|
||||
* All environment variables:
|
||||
```
|
||||
export CLEARML_LOG_ENVIRONMENT=*
|
||||
```
|
||||
|
||||
* Specific environment variables. For example, log `PWD` and `PYTHONPATH`:
|
||||
```
|
||||
export CLEARML_LOG_ENVIRONMENT=PWD,PYTHONPATH
|
||||
```
|
||||
|
||||
* No environment variables
|
||||
```
|
||||
export CLEARML_LOG_ENVIRONMENT=
|
||||
```
|
||||
|
||||
:::note Overriding clearml.conf
|
||||
The `CLEARML_LOG_ENVIRONMENT` always overrides the `clearml.conf` file.
|
||||
The `CLEARML_LOG_ENVIRONMENT` variable always overrides the `clearml.conf` file.
|
||||
:::
|
||||
|
||||
When a script that has integrated ClearML is executed, the environment variables listed in `clearml.conf` or specified by
|
||||
When a script that has integrated ClearML is executed, the environment variables listed in the `clearml.conf` or specified by
|
||||
the `CLEARML_LOG_ENVIRONMENT` variable are logged by ClearML.
|
||||
|
||||
### Explicit Logging
|
||||
|
@ -122,7 +122,12 @@ parameter's line, and the type, description, and default value appear, if they w
|
||||
|
||||
#### Environment Variables
|
||||
|
||||
If the `CLEARML_LOG_ENVIRONMENT` variable was set, the **Environment** group will show environment variables (see [this FAQ](../faq.md#track-env-vars)).
|
||||
If environment variables were listed in the `CLEARML_LOG_ENVIRONMENT` environment variable or the `sdk.development.log_os_environments`
|
||||
field of the `clearml.conf` file, the **Environment** group displays the listed environment variables (see [this FAQ](../faq.md#track-env-vars)).
|
||||
|
||||
:::note
|
||||
The `CLEARML_LOG_ENVIRONMENT` variable always overrides the `clearml.conf` file.
|
||||
:::
|
||||
|
||||

|
||||
|
||||
|
@ -117,7 +117,8 @@ Add, change, or delete hyperparameters, which are organized in the **ClearML Web
|
||||
|
||||
* **General** - Parameter dictionaries (from code, connected to the Task by calling [`Task.connect()`](../references/sdk/task.md#connect)).
|
||||
|
||||
* Environment variables - Tracked if the `CLEARML_LOG_ENVIRONMENT` environment variable was set (see this [FAQ](../faq.md#track-env-vars)).
|
||||
* Environment variables - Tracked if variables were listed in the `CLEARML_LOG_ENVIRONMENT` environment variable
|
||||
or the `sdk.development.log_os_environments` field of the `clearml.conf` file (see this [FAQ](../faq.md#track-env-vars)).
|
||||
|
||||
* Custom named parameter groups (see the `name` parameter in [`Task.connect`](../references/sdk/task.md#connect)).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user