Skip to content

Commit 6144de6

Browse files
committed
fix api
1 parent b21be05 commit 6144de6

File tree

7 files changed

+70
-18
lines changed

7 files changed

+70
-18
lines changed

.vitepress/en.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,8 @@ function sidebarAPI(): DefaultTheme.SidebarItem[] {
300300
{ text: 'integration', link: 'py-integration' },
301301
{ text: 'converter', link: 'py-converter' },
302302
{ text: 'sync_wandb', link: 'py-sync-wandb' },
303+
{ text: 'sync_tensorboard', link: 'py-sync-tensorboard' },
304+
{ text: 'Other', link: 'py-other' },
303305
]
304306
},
305307
{

.vitepress/zh.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,8 @@ function sidebarAPI(): DefaultTheme.SidebarItem[] {
317317
{ text: 'integration', link: 'py-integration' },
318318
{ text: 'converter', link: 'py-converter' },
319319
{ text: 'sync_wandb', link: 'py-sync-wandb' },
320+
{ text: 'sync_tensorboard', link: 'py-sync-tensorboard' },
321+
{ text: '其他', link: 'py-other' },
320322
]
321323
},
322324
{

en/api/py-other.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Other Python APIs
2+
3+
## get_run
4+
5+
Retrieves the currently running experiment object (`SwanLabRun`).
6+
7+
```python
8+
run = swanlab.init(...)
9+
10+
...
11+
12+
run = swanlab.get_run()
13+
```
14+
15+
## get_url
16+
17+
Retrieves the URL of the experiment (in cloud mode; otherwise, returns `None`).
18+
19+
```python
20+
print(swanlab.get_url())
21+
```
22+
23+
## get_project_url
24+
25+
Retrieves the URL of the project (in cloud mode; otherwise, returns `None`).
26+
27+
```python
28+
print(swanlab.get_project_url())
29+
```

en/api/py-sync-tensorboard.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# swanlab.sync_tensorboard
2+
3+
Synchronize metrics from TensorBoard/TensorBoardX to SwanLab. [Documentation](/en/guide_cloud/integration/integration-tensorboard.md)

zh/api/py-other.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# 其他Python API
2+
3+
## get_run
4+
5+
获取当前运行的实验对象(`SwanLabRun`)。
6+
7+
```python
8+
run = swanlab.init(...)
9+
10+
...
11+
12+
run = swanlab.get_run()
13+
```
14+
15+
## get_url
16+
17+
获取实验的URL(cloud模式,否则为None)。
18+
19+
```python
20+
print(swanlab.get_url())
21+
```
22+
23+
## get_project_url
24+
25+
获取项目的URL(cloud模式,否则为None)。
26+
27+
```python
28+
print(swanlab.get_project_url())
29+
```
30+

zh/api/py-run.md

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,4 @@ print(run.public.json())
2929

3030
```python
3131
print(run.public.cloud.experiment_url)
32-
```
33-
34-
## get_url
35-
36-
获取实验的URL。
37-
38-
```python
39-
run = swanlab.init()
40-
print(run.get_url())
41-
```
42-
43-
## get_project_url
44-
45-
获取项目的URL。
46-
47-
```python
48-
run = swanlab.init()
49-
print(run.get_project_url())
32+
```

zh/api/py-sync-tensorboard.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# swanlab.sync_wandb
2+
3+
将tensorboard/tensorboardX的指标同步到SwanLab, [文档](/guide_cloud/integration/integration-tensorboard.md)

0 commit comments

Comments
 (0)