|
1 | 1 | # Environment Variables |
2 | 2 |
|
3 | | -[⚙️Full Environment Variables -> Github](https://github.com/SwanHubX/SwanLab/blob/main/swanlab/env.py) |
| 3 | +[⚙️Complete Environment Variables 1 -> Github](https://github.com/SwanHubX/SwanLab/blob/main/swanlab/env.py)、[⚙️Complete Environment Variables 2 -> Github](https://github.com/SwanHubX/SwanLab-Toolkit/blob/main/swankit/env.py) |
4 | 4 |
|
5 | 5 | ## Global Configuration |
6 | 6 |
|
7 | | -### `SWANLAB_FOLDER` |
8 | | -- **Description**: The path where the SwanLab global folder is saved, defaulting to the `.swanlab` folder in the user's home directory. |
9 | | -- **Environment Variable**: `SWANLAB_FOLDER` |
10 | | - |
11 | | -### `SWANLOG_FOLDER` |
12 | | -- **Description**: The path where SwanLab parsed log files are saved, defaulting to the `swanlog` folder in the current running directory. |
13 | | -- **Environment Variable**: `SWANLOG_FOLDER` |
14 | | - |
15 | | -### `SWANLAB_MODE` |
16 | | -- **Description**: The parsing mode of SwanLab, involving callbacks registered by the operator. Currently, there are three modes: `local`, `cloud`, and `disabled`, with the default being `cloud`. **Note: Case sensitive**. |
17 | | -- **Environment Variable**: `SWANLAB_MODE` |
| 7 | +| Environment Variable | Description | Default Value | |
| 8 | +| --- | --- | --- | |
| 9 | +| `SWANLAB_SAVE_DIR` | Path where SwanLab global folder is saved | `.swanlab` folder in the user's home directory | |
| 10 | +| `SWANLAB_LOG_DIR` | Path where SwanLab parsed log files are saved | `swanlog` folder in the current working directory | |
| 11 | +| `SWANLAB_MODE` | SwanLab's parsing mode, which involves callbacks registered by the operator. Currently, there are three modes: `local`, `cloud`, and `disabled`. **Note: Case-sensitive** | `cloud` | |
18 | 12 |
|
19 | 13 | ## Service Configuration |
20 | 14 |
|
21 | | -### `SWANBOARD_PROT` |
22 | | -- **Description**: The port for the CLI offline dashboard `swanboard` service. |
23 | | -- **Environment Variable**: `SWANLAB_BOARD_PORT` |
24 | | - |
25 | | -### `SWANBOARD_HOST` |
26 | | -- **Description**: The address for the CLI offline dashboard `swanboard` service. |
27 | | -- **Environment Variable**: `SWANLAB_BOARD_HOST` |
28 | | - |
29 | | -### `SWANLAB_WEB_HOST` |
30 | | -- **Description**: The web address for the SwanLab cloud environment. |
31 | | -- **Environment Variable**: `SWANLAB_WEB_HOST` |
32 | | - |
33 | | -### `API_HOST` |
34 | | -- **Description**: The API address for the SwanLab cloud environment. |
35 | | -- **Environment Variable**: `SWANLAB_API_HOST` |
| 15 | +| Environment Variable | Description | |
| 16 | +| --- | --- | |
| 17 | +| `SWANLAB_BOARD_PORT` | Port for the CLI offline dashboard `swanboard` service | |
| 18 | +| `SWANLAB_BOARD_HOST` | Address for the CLI offline dashboard `swanboard` service | |
| 19 | +| `SWANLAB_WEB_HOST` | Web address for the SwanLab cloud environment | |
| 20 | +| `SWANLAB_API_HOST` | API address for the SwanLab cloud environment | |
36 | 21 |
|
37 | 22 | ## Login Authentication |
38 | 23 |
|
39 | | -### `SWANLAB_API_KEY` |
40 | | -- **Description**: The cloud API Key. During login, this environment variable is checked first. If it does not exist, it checks whether the user is already logged in. If not logged in, the login process is initiated. |
41 | | - - If a string is passed to the `login` interface, this environment variable is invalid. |
42 | | - - If the user is already logged in, this environment variable takes precedence over locally stored login information. |
43 | | -- **Environment Variable**: `SWANLAB_API_KEY` |
| 24 | +| Environment Variable | Description | |
| 25 | +| --- | --- | |
| 26 | +| `SWANLAB_API_KEY` | Cloud API Key. During login, this environment variable is checked first. If it doesn't exist, the system checks if the user is already logged in. If not, the login process is initiated.<br>- If a string is passed to the `login` interface, this environment variable is ignored.<br>- If the user is already logged in, this environment variable takes precedence over locally stored login information. | |
44 | 27 |
|
45 | 28 | ## Others |
46 | 29 |
|
47 | | -### `SWANLAB_WEBHOOK` |
48 | | -- **Description**: Webhook address. If this environment variable exists, SwanLab will call this address to send a message upon successful initialization. |
49 | | -- **Environment Variable**: `SWANLAB_WEBHOOK` |
| 30 | +| Environment Variable | Description | |
| 31 | +| --- | --- | |
| 32 | +| `SWANLAB_WEBHOOK` | Webhook address.<br> When SwanLab initialization is complete, if this environment variable exists, it will be called to send a message. | |
0 commit comments