You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Added `swanlab.sync_wandb()`: Supports synchronizing metrics to SwanLab when using Weights&Biases for experiment tracking.
11
+
- Added `swanlab.sync_wandb()`: Supports synchronizing metrics to SwanLab when using Weights&Biases for experiment tracking.[Docs](/en/guide_cloud/integration/integration-wandb.md)
12
12
- Added framework integration: Configuration items will now record the framework being used.
[Weights & Biases](https://github.com/wandb/wandb) (Wandb) is an experiment tracking, model optimization, and collaboration platform for machine learning and deep learning projects. W&B provides powerful tools to log and visualize experiment results, helping data scientists and researchers better manage and share their work.
3
+
[Weights & Biases](https://github.com/wandb/wandb) (Wandb) is a platform for experiment tracking, model optimization, and collaboration in machine learning and deep learning projects. W&B provides powerful tools for recording and visualizing experimental results, helping data scientists and researchers better manage and share their work.
4
4
5
5

6
6
7
-
You can use `swanlab convert` to convert existing projects on Wandb into SwanLab projects.
7
+
**You can synchronize projects from Wandb to SwanLab in two ways:**
8
+
9
+
1.**Synchronized Tracking**: If your current project uses wandb for experiment tracking, you can use the `swanlab.sync_wandb()` command to synchronize metrics to SwanLab while running the training script.
10
+
2.**Convert Existing Projects**: If you want to copy a project from wandb to SwanLab, you can use `swanlab convert` to convert an existing project on Wandb to a SwanLab project.
8
11
9
12
::: info
10
-
In the current version, only scalar charts are supported for conversion.
13
+
The current version only supports converting scalar charts.
11
14
:::
12
15
13
-
## Find Your Project, Entity, and Run ID
16
+
[[toc]]
17
+
18
+
## 1. Synchronized Tracking
19
+
20
+
### 1.1 Add the `sync_wandb` Command
21
+
22
+
Add the `swanlab.sync_wandb()` command anywhere before `wandb.init()` in your code to synchronize wandb metrics to SwanLab during training.
23
+
24
+
```python
25
+
import swanlab
26
+
27
+
swanlab.sync_wandb()
28
+
29
+
...
30
+
31
+
wandb.init()
32
+
```
33
+
34
+
In the above code, `wandb.init()` will simultaneously initialize swanlab, with the project name, experiment name, and configuration matching the `project`, `name`, and `config` in `wandb.init()`. Therefore, you do not need to manually initialize swanlab.
35
+
36
+
### 1.2 Alternative Approach
37
+
38
+
Another approach is to manually initialize swanlab first, then run the wandb code.
39
+
40
+
```python
41
+
import swanlab
42
+
43
+
swanlab.init(...)
44
+
swanlab.sync_wandb()
45
+
46
+
...
47
+
48
+
wandb.init()
49
+
```
50
+
51
+
In this approach, the project name, experiment name, and configuration will match the `project`, `experiment_name`, and `config` in `swanlab.init()`. The `project` and `name` in the subsequent `wandb.init()` will be ignored, and the `config` will be updated in `swanlab.config`.
52
+
53
+
### 1.3 Test Code
14
54
15
-
The `project`, `entity`, and `runid` are required for the conversion (runid is optional).
0 commit comments