-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
932 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# FAQ | ||
|
||
## 登录时,API Key为什么输入不进去? | ||
|
||
见此回答:[链接](https://www.zhihu.com/question/720308649/answer/25076837539) | ||
|
||
|
||
## 如何从一个脚本启动多个实验? | ||
|
||
在多次创建实验之间增加`swanlab.finish()`即可。 | ||
|
||
执行了`swanlab.finish()`之后,再次执行`swanlab.init()`就会创建新的实验; | ||
如果不执行`swanlab.finish()`的情况下,再次执行`swanlab.init()`,将无视此次执行。 | ||
|
||
## 如何在训练时关闭swanlab记录(Debug调试)? | ||
|
||
将`swanlab.init`的`mode`参数设置为disabled,就可以不创建实验以及不写入数据。 | ||
|
||
```python | ||
swanlab.init(mode='disabled') | ||
``` | ||
|
||
|
||
## 本地的训练已经结束,但SwanLab UI上仍然在运行中,要怎么改变状态? | ||
|
||
点击实验名旁边的终止按钮,会将实验状态从“进行中”转为“中断”,并停止接收数据的上传。 | ||
|
||
![stop](/assets/stop.png) | ||
|
||
|
||
## 如何查看折线图的局部细节? | ||
|
||
放大折线图,长按鼠标划过目标的区域,即可放大查看该区域。 | ||
|
||
![details](/assets/faq-chart-details.png) | ||
|
||
双击区域后复原。 | ||
|
||
## 如何取消实验的后缀名? | ||
|
||
```python | ||
swanlab.init(suffix=None) | ||
``` | ||
|
||
ps: 在0.3.22版本以后,不再自动为实验名添加后缀。 | ||
|
137 changes: 137 additions & 0 deletions
137
en/guide_cloud/experiment_track/create-experiment-by-configfile.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
# Create Experiment with Configuration File | ||
|
||
This section will introduce how to create SwanLab experiments using configuration files in json or yaml format. | ||
|
||
## Load Configuration File with swanlab.config | ||
|
||
The `config` parameter of `swanlab.init` supports passing the path of a configuration file in json or yaml format, and parses the configuration file into a dictionary for experiment creation. | ||
|
||
### Using json File | ||
|
||
Below is an example of a configuration file in json format: | ||
|
||
```json | ||
{ | ||
"epochs": 20, | ||
"learning-rate": 0.001 | ||
} | ||
``` | ||
|
||
Pass the path of the configuration file to the `config` parameter, it will parse the configuration file into a dictionary: | ||
|
||
```python | ||
swanlab.init(config="swanlab-init-config.json") | ||
# Equivalent to swanlab.init(config={"epochs": 20, "learning-rate": 0.001}) | ||
``` | ||
|
||
### Using yaml File | ||
|
||
Below is an example of a configuration file in yaml format: | ||
|
||
```yaml | ||
epochs: 20 | ||
learning-rate: 0.001 | ||
``` | ||
Pass the path of the configuration file to the `config` parameter, it will parse the configuration file into a dictionary: | ||
|
||
```python | ||
swanlab.init(config="swanlab-init-config.yaml") | ||
# Equivalent to swanlab.init(config={"epochs": 20, "learning-rate": 0.001}) | ||
``` | ||
|
||
## Load Configuration File with swanlab.init | ||
|
||
The `load` parameter of `swanlab.init` supports passing the path of a configuration file in json or yaml format, and parses the configuration file for experiment creation. | ||
|
||
### Using json File | ||
|
||
Below is an example of a configuration file in json format: | ||
|
||
```json | ||
{ | ||
"project": "cat-dog-classification", | ||
"experiment_name": "Resnet50", | ||
"description": "My first AI experiment", | ||
"config": { | ||
"epochs": 20, | ||
"learning-rate": 0.001 | ||
} | ||
} | ||
``` | ||
|
||
Pass the path of the configuration file to the `load` parameter, it will parse the configuration file to initialize the experiment: | ||
|
||
```python | ||
swanlab.init(load="swanlab-config.json") | ||
# Equivalent to | ||
# swanlab.init( | ||
# project="cat-dog-classification", | ||
# experiment_name="Resnet50", | ||
# description="My first AI experiment", | ||
# config={ | ||
# "epochs": 20, | ||
# "learning-rate": 0.001 | ||
# } | ||
# ) | ||
``` | ||
|
||
### Using yaml File | ||
|
||
Below is an example of a configuration file in yaml format: | ||
|
||
```yaml | ||
project: cat-dog-classification | ||
experiment_name: Resnet50 | ||
description: My first AI experiment | ||
config: | ||
epochs: 20 | ||
learning-rate: 0.001 | ||
``` | ||
|
||
Pass the path of the configuration file to the `load` parameter, it will parse the configuration file to initialize the experiment: | ||
|
||
```python | ||
swanlab.init(load="swanlab-config.yaml") | ||
# Equivalent to | ||
# swanlab.init( | ||
# project="cat-dog-classification", | ||
# experiment_name="Resnet50", | ||
# description="My first AI experiment", | ||
# config={ | ||
# "epochs": 20, | ||
# "learning-rate": 0.001 | ||
# } | ||
# ) | ||
``` | ||
|
||
## FAQ | ||
|
||
### 1. Is the configuration file naming fixed? | ||
|
||
The naming of the configuration file is free, but it is recommended to use `swanlab-init` and `swanlab-init-config` as the configuration names. | ||
|
||
### 2. What is the relationship between the parameters in the configuration file and the script? | ||
|
||
The priority of the parameters in the script is higher than that in the configuration file, that is, the parameters in the script will override the parameters in the configuration file. | ||
|
||
For example, there is a yaml configuration file and a code snippet below: | ||
|
||
```yaml | ||
project: cat-dog-classification | ||
experiment_name: Resnet50 | ||
description: My first AI experiment | ||
config: | ||
epochs: 20 | ||
learning-rate: 0.001 | ||
``` | ||
|
||
```python | ||
swanlab.init( | ||
experiment_name="resnet101", | ||
config={"epochs": 30}, | ||
load="swanlab-init.yaml" | ||
) | ||
``` | ||
|
||
The final `experiment_name` is resnet101, and `config` is {"epochs": 30}. |
Oops, something went wrong.