Skip to content

Commit

Permalink
fix: convert wandb metadata (#854)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeyi-Lin authored Mar 5, 2025
1 parent 3153915 commit 4b018ab
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 11 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@

## 🌟 最近更新

- 2025.03.04:新增 **MLFlow** 功能,支持将MLFlow实验转换为SwanLab实验,[使用指引](https://docs.swanlab.cn/guide_cloud/integration/integration-mlflow.html)

- 2025.03.01:新增 **移动实验** 功能,现在可以将实验移动到不同组织的不同项目下了

- 2025.02.24:我们与 [EasyR1](https://github.com/hiyouga/EasyR1) 完成了联合集成,现在你可以在EasyR1中使用SwanLab来**跟踪和可视化多模态大模型强化学习实验**[使用指引](https://docs.swanlab.cn/guide_cloud/integration/integration-easyr1.html)
Expand All @@ -73,11 +75,11 @@

- 2025.01.17:新增`sync_wandb`功能,[文档](https://docs.swanlab.cn/guide_cloud/integration/integration-wandb.html),支持与Weights & Biases实验跟踪同步;大幅改进了日志渲染性能

- 2025.01.11:云端版大幅优化了项目表格的性能,并支持拖拽、排序、筛选等交互


<details><summary>完整更新日志</summary>

- 2025.01.11:云端版大幅优化了项目表格的性能,并支持拖拽、排序、筛选等交互

- 2025.01.01:新增折线图**持久化平滑**、折线图拖拽式改变大小,优化图表浏览体验

- 2024.12.22:我们与 [LLaMA Factory](https://github.com/hiyouga/LLaMA-Factory) 完成了联合集成,现在你可以在LLaMA Factory中使用SwanLab来**跟踪和可视化大模型微调实验**[使用指引](https://github.com/hiyouga/LLaMA-Factory?tab=readme-ov-file#use-swanlab-logger)
Expand Down Expand Up @@ -301,6 +303,7 @@ swanlab watch ./logs
**其他框架:**
- [Tensorboard](https://docs.swanlab.cn/guide_cloud/integration/integration-tensorboard.html)
- [Weights&Biases](https://docs.swanlab.cn/guide_cloud/integration/integration-wandb.html)
- [MLFlow](https://docs.swanlab.cn/guide_cloud/integration/integration-mlflow.html)
- [HuggingFace Accelerate](https://docs.swanlab.cn/guide_cloud/integration/integration-huggingface-accelerate.html)
- [Unsloth](https://docs.swanlab.cn/guide_cloud/integration/integration-unsloth.html)
- [Hydra](https://docs.swanlab.cn/guide_cloud/integration/integration-hydra.html)
Expand Down
7 changes: 5 additions & 2 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ Supports both cloud/offline usage, integrates with 30+ mainstream frameworks, an

## 🌟 Recent Updates

- 2025.03.04: Added **MLFlow** feature, supporting conversion of MLFlow experiments to SwanLab experiments. [Usage Guide](https://docs.swanlab.cn/guide_cloud/integration/integration-mlflow.html)

- 2025.03.01: Added **move experiment** feature, now you can move experiments to different projects in different organizations.

- 2025.02.24: We completed integration with [EasyR1](https://github.com/hiyouga/EasyR1). Now you can use SwanLab in EasyR1 to **track and visualize large model fine-tuning experiments**. [Usage Guide](https://github.com/hiyouga/EasyR1?tab=readme-ov-file#merge-checkpoint-in-hugging-face-format).
Expand All @@ -69,10 +71,10 @@ Supports both cloud/offline usage, integrates with 30+ mainstream frameworks, an

- 2025.01.11: The cloud version enhanced project table performance with drag-and-drop, sorting, and filtering support.

- 2025.01.01: Added **persistent smoothing** for line charts and drag-to-resize functionality for line charts, improving chart browsing experience.

<details><summary>Full Changelog</summary>

- 2025.01.01: Added **persistent smoothing** for line charts and drag-to-resize functionality for line charts, improving chart browsing experience.

- 2024.12.22: We completed integration with [LLaMA Factory](https://github.com/hiyouga/LLaMA-Factory). Now you can use SwanLab in LLaMA Factory to **track and visualize large model fine-tuning experiments**. [Usage Guide](https://github.com/hiyouga/LLaMA-Factory?tab=readme-ov-file#use-swanlab-logger).

- 2024.12.15: **Hardware Monitoring (0.4.0)** is now available, supporting system-level information recording and monitoring for CPU, NPU (Ascend), and GPU (Nvidia).
Expand Down Expand Up @@ -292,6 +294,7 @@ Below is a list of frameworks we have integrated. Feel free to submit an [Issue]
**Other Frameworks:**
- [Tensorboard](https://docs.swanlab.cn/guide_cloud/integration/integration-tensorboard.html)
- [Weights&Biases](https://docs.swanlab.cn/guide_cloud/integration/integration-wandb.html)
- [MLFlow](https://docs.swanlab.cn/guide_cloud/integration/integration-mlflow.html)
- [HuggingFace Accelerate](https://docs.swanlab.cn/guide_cloud/integration/integration-huggingface-accelerate.html)
- [Unsloth](https://docs.swanlab.cn/guide_cloud/integration/integration-unsloth.html)
- [Hydra](https://docs.swanlab.cn/guide_cloud/integration/integration-hydra.html)
Expand Down
7 changes: 5 additions & 2 deletions README_JP.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@

## 🌟 最近の更新

- 2025.03.04: MLFlowの統合を追加し、MLFlow実験をSwanLab実験に変換する機能をサポートしました。[使用ガイド](https://docs.swanlab.cn/guide_cloud/integration/integration-mlflow.html)

- 2025.03.01:新機能として、実験の移動が追加されました。

- 2025.02.24:我們與[EasyR1](https://github.com/hiyouga/EasyR1)完成了聯合集成,[使用指引](https://github.com/hiyouga/EasyR1?tab=readme-ov-file#merge-checkpoint-in-hugging-face-format)
Expand All @@ -68,11 +70,11 @@

- 2025.01.17:`sync_wandb`機能を追加し、[ドキュメント](https://docs.swanlab.cn/en/guide_cloud/integration/integration-wandb.html)、Weights & Biases実験追跡との同期をサポート;ログレンダリング性能を大幅に最適化

- 2025.01.11:クラウド版はプロジェクトテーブルのパフォーマンスを大幅に最適化し、ドラッグ&ドロップ、並べ替え、フィルタリングなどのインタラクションをサポートしました。


<details><summary>完全な更新履歴</summary>

- 2025.01.11:クラウド版はプロジェクトテーブルのパフォーマンスを大幅に最適化し、ドラッグ&ドロップ、並べ替え、フィルタリングなどのインタラクションをサポートしました。

- 2025.01.01:折れ線グラフの**永続的スムージング**、折れ線グラフのドラッグによるサイズ変更を追加し、チャート閲覧体験を最適化

- 2024.12.22:[LLaMA Factory](https://github.com/hiyouga/LLaMA-Factory)との統合を完了し、LLaMA FactoryでSwanLabを使用して**大規模モデルのファインチューニング実験を追跡・可視化**できるようになりました。[使用ガイド](https://github.com/hiyouga/LLaMA-Factory?tab=readme-ov-file#use-swanlab-logger)
Expand Down Expand Up @@ -296,6 +298,7 @@ swanlab watch ./logs
**その他のフレームワーク:**
- [Tensorboard](https://docs.swanlab.cn/guide_cloud/integration/integration-tensorboard.html)
- [Weights&Biases](https://docs.swanlab.cn/guide_cloud/integration/integration-wandb.html)
- [MLFlow](https://docs.swanlab.cn/guide_cloud/integration/integration-mlflow.html)
- [HuggingFace Accelerate](https://docs.swanlab.cn/guide_cloud/integration/integration-huggingface-accelerate.html)
- [Unsloth](https://docs.swanlab.cn/guide_cloud/integration/integration-unsloth.html)
- [Hydra](https://docs.swanlab.cn/guide_cloud/integration/integration-hydra.html)
Expand Down
7 changes: 5 additions & 2 deletions README_RU.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@

## 🌟 Последние обновления

- 2025.03.04: Добавлена интеграция с [MLFlow](https://docs.swanlab.cn/guide_cloud/integration/integration-mlflow.html), теперь вы можете использовать SwanLab для **отслеживания и визуализации экспериментов MLFlow**.

- 2025.03.01: Добавлена функция **перемещения экспериментов**, теперь вы можете перемещать эксперименты между организациями и проектами.

- 2025.02.24: Мы объединили усилия с [EasyR1](https://github.com/hiyouga/EasyR1), теперь вы можете использовать SwanLab в EasyR1 для **отслеживания и визуализации экспериментов по тонкой настройке больших моделей** [инструкция по использованию](https://github.com/hiyouga/EasyR1?tab=readme-ov-file#merge-checkpoint-in-hugging-face-format).
Expand All @@ -65,11 +67,11 @@

- 2025.01.22: Добавлена функция `sync_tensorboardX` и `sync_tensorboard_torch`, поддерживающая синхронизацию с этими двумя TensorBoard фреймворками.

- 2025.01.17: Добавлена функция `sync_wandb`, [документация](https://docs.swanlab.cn/en/guide_cloud/integration/integration-wandb.html), поддерживающая синхронизацию с отслеживанием экспериментов Weights & Biases; значительно улучшена производительность рендеринга логов.


<details><summary>Полный список изменений</summary>

- 2025.01.17: Добавлена функция `sync_wandb`, [документация](https://docs.swanlab.cn/en/guide_cloud/integration/integration-wandb.html), поддерживающая синхронизацию с отслеживанием экспериментов Weights & Biases; значительно улучшена производительность рендеринга логов.

- 2025.01.11: Облачная версия значительно оптимизировала производительность таблиц проектов и добавила поддержку таких функций, как перетаскивание, сортировка и фильтрация.

- 2025.01.01: Добавлено **сглаживание графиков** и возможность изменения размера графиков перетаскиванием, улучшено взаимодействие с графиками.
Expand Down Expand Up @@ -293,6 +295,7 @@ swanlab watch ./logs
**Другие фреймворки:**
- [Tensorboard](https://docs.swanlab.cn/guide_cloud/integration/integration-tensorboard.html)
- [Weights&Biases](https://docs.swanlab.cn/guide_cloud/integration/integration-wandb.html)
- [MLFlow](https://docs.swanlab.cn/guide_cloud/integration/integration-mlflow.html)
- [HuggingFace Accelerate](https://docs.swanlab.cn/guide_cloud/integration/integration-huggingface-accelerate.html)
- [Unsloth](https://docs.swanlab.cn/guide_cloud/integration/integration-unsloth.html)
- [Hydra](https://docs.swanlab.cn/guide_cloud/integration/integration-hydra.html)
Expand Down
6 changes: 3 additions & 3 deletions swanlab/converter/wb/wb_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ def parse_wandb_logs(self, wb_project: str, wb_entity: str, wb_run_id: str = Non
workspace=self.workspace,
experiment_name=wb_run.name,
description=wb_run.notes,
cloud=self.cloud,
mode="cloud" if self.cloud else "local",
logdir=self.logdir,
)
else:
swanlab_run = swanlab.get_run()

try:
wb_run_metadata = {"wandb_metadata": wb_run_metadata}
wb_run_metadata = {"wandb_metadata": wb_run.metadata}
except:
wb_run_metadata = None
wb_run_metadata = {}

wb_config = {
"wandb_run_id": wb_run.id,
Expand Down

0 comments on commit 4b018ab

Please sign in to comment.