SwanLab icon indicating copy to clipboard operation
SwanLab copied to clipboard

[BUG]使用EvalScope时无法完整记录Percentile results的问题

Open ShaohonChen opened this issue 8 months ago • 12 comments

在使用Evalscope时,无法完整记录Percentile results。

⬇️终端打印的信息

Image

⬇️使用SwanLab的log记录打印的信息

Image

⬇️使用WandB记录的信息

Image

ShaohonChen avatar Apr 11 '25 15:04 ShaohonChen

我在联邦学习训练时也遇到了类似的错误,无法完整记录print内容。 我开始使用的是0.4.12版本,更新到0.5.5后,问题依然存在。 ⬇️swanlab log记录的信息 Image ⬇️正常情况下,swanlab log记录的信息 Image

CVrookieee avatar Apr 12 '25 03:04 CVrookieee

Currently, SwanLab only supports recording the stdout ( standard output stream ), and support for recording the stderr ( standard error stream ) will be added in subsequent updates.

Zeyi-Lin avatar Apr 12 '25 14:04 Zeyi-Lin

Currently, SwanLab only supports recording the stdout ( standard output stream ), and support for recording the stderr ( standard error stream ) will be added in subsequent updates.

The challenge in logging the standard error stream is that progress bars, represented by tools like tqdm, can generate tens of thousands of lines in an extremely short time. This requires specific adaptations for progress bar scenarios. However, given the team's limited development bandwidth, community contributions are highly welcome!

Zeyi-Lin avatar Apr 12 '25 14:04 Zeyi-Lin

我在联邦学习训练时也遇到了类似的错误,无法完整记录print内容。 我开始使用的是0.4.12版本,更新到0.5.5后,问题依然存在。 ⬇️swanlab log记录的信息 Image ⬇️正常情况下,swanlab log记录的信息 Image

我的情况属于issue #938,已解决,感谢

CVrookieee avatar Apr 13 '25 00:04 CVrookieee

临时增加了stderr的支持,可使用如下命令安装

pip install git+https://github.com/SwanHubX/SwanLab.git@tmp-add-stderr-log

参考分支: https://github.com/SwanHubX/SwanLab/tree/tmp-add-stderr-log

ShaohonChen avatar Apr 13 '25 08:04 ShaohonChen

Image

目前运行时在SwanLab上查看会出现乱码,辛苦 @Feudalman 看看为啥会乱码,附上参考log文件。

log.txt

为了保证完整记录,分支默认开到最大的4096长度,这个辛苦 @SAKURA-CAT 看看是否能默认改大点

ShaohonChen avatar Apr 13 '25 08:04 ShaohonChen

出现乱码

我没有看到哪乱码了

SAKURA-CAT avatar Apr 13 '25 08:04 SAKURA-CAT

为了保证完整记录,分支默认开到最大的4096长度,这个辛苦 @SAKURA-CAT 看看是否能默认改大点

你可以使用swanlab.Settings动态调整你需要的长度: https://docs.swanlab.cn/api/py-settings.html

SAKURA-CAT avatar Apr 13 '25 08:04 SAKURA-CAT

Image

Image

表格有格式控制符号,估计前端都按照空格处理了

ShaohonChen avatar Apr 13 '25 08:04 ShaohonChen

表格有格式控制符号,估计前端都按照空格处理了

emm这个不是因为前端忽略了空格吗?

SAKURA-CAT avatar Apr 13 '25 08:04 SAKURA-CAT

为了保证完整记录,分支默认开到最大的4096长度,这个辛苦 @SAKURA-CAT 看看是否能默认改大点

你可以使用swanlab.Settings动态调整你需要的长度: https://docs.swanlab.cn/api/py-settings.html

evalscope使用的是命令行开启测评,比如:

evalscope eval \
 --model Qwen/Qwen2.5-0.5B-Instruct \
 --datasets gsm8k arc \
 --limit 5 \
 --swanlab-api-key '你的API Key' \
 --name 'qwen2.5-gsm8k-arc'

所以可以在未来版本中支持使用环境变量的方式设置截断长度,以适配许多框架用的是命令行启动训练的场景

Zeyi-Lin avatar Apr 13 '25 15:04 Zeyi-Lin

目前和 @SAKURA-CAT 已经确定了技术方案,将在后续版本添加stderr的支持,以及webui上的格式对齐

Zeyi-Lin avatar Apr 15 '25 03:04 Zeyi-Lin

Image ![Image](https://github.com/user-attachments/assets/7630eb4f-fb17-4816-b34c-7b1354a164d0)

表格有格式控制符号,估计前端都按照空格处理了

前端问题已修复,sdk 的标准错误流捕捉功能还在排期中

SAKURA-CAT avatar May 11 '25 07:05 SAKURA-CAT