Skip to content

Commit d51a2fd

Browse files
committed
faq console truncation
1 parent 6144de6 commit d51a2fd

File tree

2 files changed

+18
-2
lines changed
  • en/guide_cloud/experiment_track
  • zh/guide_cloud/experiment_track

2 files changed

+18
-2
lines changed

en/guide_cloud/experiment_track/FAQ.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,12 @@ Some users may encounter the following situation: Why does my training process s
6363

6464
This is because SwanLab has a hidden rule for determining crashes. If no logs (including automatically collected system metrics) are uploaded within 15 minutes, the experiment is marked as crashed. This is to prevent the experiment from remaining in the "Running" state indefinitely if the training process is unexpectedly killed and cannot trigger the status upload logic in the SwanLab SDK.
6565

66-
Therefore, if your machine experiences network issues for more than 15 minutes, the experiment status will be displayed as "Crashed."
66+
Therefore, if your machine experiences network issues for more than 15 minutes, the experiment status will be displayed as "Crashed."
67+
68+
## Command Line Logging and Truncation
69+
70+
SwanLab records the standard output stream of the process after `swanlab.init()` is called, which can be viewed in the "Logs" tab of the experiment.
71+
72+
If a line of command-line output is too long, it will be truncated. The current limit is 500 characters.
73+
74+
If you wish to remove this restriction, you can modify the `MAX_UPLOAD_LEN` parameter in `swanlab/log/console.py` in the SwanLab package source code. This will ensure that the corresponding command-line output is stored in the `swanlog` log file, and the offline dashboard will display it accordingly. However, this change will not affect the rules of the cloud version.

zh/guide_cloud/experiment_track/FAQ.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,12 @@ swanlab.init(mode='disabled')
6767

6868
这是因为SwanLab判定中断有一条隐藏规则,如果训练进程在15分钟以内没有任何日志上传(包含自动收集的系统指标),则判定为中断,这是为了避免训练进程被意外Kill后,无法触达SwanLab SDK中的状态上传逻辑,导致实验永远处于“运行中”状态。
6969

70-
所以如果你的机器出现了网络问题,且时间大于15分钟,就会导致实验状态显示为“中断”。
70+
所以如果你的机器出现了网络问题,且时间大于15分钟,就会导致实验状态显示为“中断”。
71+
72+
## 命令行记录与截断
73+
74+
SwanLab会记录`swanlab.init()`之后进程中的标准输出流,可以在实验的「日志」选项卡查看。
75+
76+
如果一行的命令行输出过长,会被截断,目前的限制是500个字符。
77+
78+
如果你想解除限制,可以前往swanlab的包源码,对`swanlab/log/console.py`中的`MAX_UPLOAD_LEN`进行修改。这样在`swanlog`日志文件中会存储相应的命令行输出,且离线看板也会按此显示,但不会让云端版的规则产生改变。

0 commit comments

Comments
 (0)