Skip to content

Commit c90ff58

Browse files
authored
docs: self hosted (#106)
* changelog * Update .gitignore * update * update dashboard * en * Update .gitignore * swanlab.login() * cli-login * register-callback * docker image * changelog * banner * plugin init * sync_mlflow * changelog sync mlflow * upgrade quick-start * emailcallback * lark callback * fix * add lark show * custom plugin * dashboard * fix link * update sync_mlfllow * exptrack add send notification * better index * style * style * update docker deploy
1 parent 1b8fbcf commit c90ff58

File tree

82 files changed

+1640
-148
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+1640
-148
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
node_modules
33
/.vitepress/dist
44
/.vitepress/cache
5-
.idea
5+
.idea
6+
1.py
7+
2.py
8+
logs/

.vitepress/en.ts

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { defineConfig, type DefaultTheme} from 'vitepress'
33
var base_path_guide_cloud = '/en/guide_cloud'
44
var base_path_examples = '/en/examples'
55
var base_path_api = '/en/api'
6+
var base_path_plugin = '/en/plugin'
67

78
// https://vitepress.dev/reference/site-config
89
export const en = defineConfig({
@@ -27,7 +28,7 @@ export const en = defineConfig({
2728
// 导航栏配置
2829
nav: [
2930
{
30-
text: 'User Guide',
31+
text: 'Guide',
3132
link: base_path_guide_cloud + '/general/what-is-swanlab',
3233
},
3334
{
@@ -45,8 +46,8 @@ export const en = defineConfig({
4546
link: base_path_api + '/api-index',
4647
activeMatch: '/en/api/',
4748
},
48-
{ text: 'Contact Us', link: '/en/guide_cloud/community/online-support'},
49-
{ text: 'v0.4.11', items: [
49+
{ text: 'Plugin', link: base_path_plugin + '/plugin-index'},
50+
{ text: 'v0.5.0', items: [
5051
{ text: 'changelog', link: base_path_guide_cloud + '/general/changelog' },
5152
{ text: 'Feedback', link: 'https://geektechstudio.feishu.cn/share/base/form/shrcn8koDFRcH2mMcBYMh9tiKfI'},
5253
{ text: 'Contribute Docs', link: 'https://github.com/SwanHubX/SwanLab-Docs' },
@@ -87,6 +88,7 @@ export const en = defineConfig({
8788
'/en/guide_cloud/integration/':{base: '/en/guide_cloud/integration/', items: sidebarIntegration(),},
8889
'/en/examples/':{base: '/en/examples/', items: sidebarExamples(),},
8990
'/en/api/':{base: '/en/api/', items: sidebarAPI(),},
91+
'/en/plugin/':{base: '/en/plugin/', items: sidebarPlugin(),},
9092
},
9193

9294
// 页脚配置
@@ -121,22 +123,29 @@ function sidebarGuideCloud(): DefaultTheme.SidebarItem[] {
121123
items: [
122124
{ text: 'What is experiment tracking?', link: 'experiment_track/what-is-experiment-track' },
123125
{ text: 'Create an experiment', link: 'experiment_track/create-experiment' },
124-
{ text: 'Create by config file', link: 'experiment_track/create-experiment-by-configfile' },
125126
{ text: 'Set config', link: 'experiment_track/set-experiment-config' },
126127
{ text: 'Log metric', link: 'experiment_track/log-experiment-metric' },
127128
{ text: 'Log media metric', link: 'experiment_track/log-media' },
128129
{ text: 'System Hardware Monitoring', link: 'experiment_track/system-monitor' },
129130
{ text: 'View result', link: 'experiment_track/view-result' },
130131
{ text: 'Finish experiment', link: 'experiment_track/finish-experiment' },
132+
{ text: 'Email Notifications', link: 'experiment_track/send-notification' },
131133
{ text: 'Jupyter Notebook', link: 'experiment_track/jupyter-notebook' },
132134
{ text: 'Limitations and Performance', link: 'experiment_track/limit-and-performance' },
133135
{ text: 'Experiment metadata', link: 'experiment_track/experiment-metadata' },
134136
{ text: 'FAQ', link: 'experiment_track/FAQ' },
135137
]
136138
},
137139
{
138-
text: '💻 Self-hosted',
140+
text: '🚀 Self-hosted',
139141
// collapsed: false,
142+
items: [
143+
{ text: 'Docker deployment', link: 'self_host/docker-deploy' },
144+
]
145+
},
146+
{
147+
text: '💻 Offline board',
148+
collapsed: true,
140149
items: [
141150
{ text: 'Offline board', link: 'self_host/offline-board' },
142151
{ text: 'Remote access tutorial', link: 'self_host/remote-view' },
@@ -304,6 +313,8 @@ function sidebarAPI(): DefaultTheme.SidebarItem[] {
304313
{ text: 'converter', link: 'py-converter' },
305314
{ text: 'sync_wandb', link: 'py-sync-wandb' },
306315
{ text: 'sync_tensorboard', link: 'py-sync-tensorboard' },
316+
{ text: 'sync_mlflow', link: 'py-sync-mlflow' },
317+
{ text: 'register_callback', link: 'py-register-callback' },
307318
{ text: 'Other', link: 'py-other' },
308319
]
309320
},
@@ -316,3 +327,29 @@ function sidebarAPI(): DefaultTheme.SidebarItem[] {
316327
}
317328
]
318329
}
330+
331+
function sidebarPlugin(): DefaultTheme.SidebarItem[] {
332+
return [
333+
{
334+
text: '🔧 Make your custom plugin',
335+
link: 'custom-plugin',
336+
},
337+
{
338+
text: '✈️ Notification',
339+
// collapsed: false,
340+
items: [
341+
{ text: 'Email', link: 'notification-email' },
342+
{ text: 'Lark', link: 'notification-lark' },
343+
{ text: 'Dingtalk', link: 'notification-dingtalk' },
344+
{ text: 'Wechat', link: 'notification-wxwork' },
345+
]
346+
},
347+
{
348+
text: '📝 Writer',
349+
// collapsed: false,
350+
items: [
351+
{ text: 'CSV Table', link: 'writer-csv' },
352+
]
353+
},
354+
]
355+
}

.vitepress/zh.ts

Lines changed: 58 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { defineConfig, type DefaultTheme} from 'vitepress'
33
var base_path_guide_cloud = '/guide_cloud'
44
var base_path_examples = '/examples'
55
var base_path_api = '/api'
6+
var base_path_plugin = '/plugin'
67

78
// https://vitepress.dev/reference/site-config
89
export const zh = defineConfig({
@@ -31,7 +32,7 @@ export const zh = defineConfig({
3132
// 导航栏配置
3233
nav: [
3334
{
34-
text: '用户指南',
35+
text: '指南',
3536
link: base_path_guide_cloud + '/general/what-is-swanlab',
3637
// activeMatch: '/guide_cloud/',
3738
},
@@ -50,7 +51,12 @@ export const zh = defineConfig({
5051
link: base_path_api + '/api-index',
5152
activeMatch: '/api/',
5253
},
53-
{ text: 'v0.4.11', items: [
54+
{
55+
text: '插件',
56+
link: base_path_plugin + '/plugin-index',
57+
activeMatch: '/plugin/',
58+
},
59+
{ text: 'v0.5.0', items: [
5460
{ text: '更新日志', link: base_path_guide_cloud + '/general/changelog' },
5561
{ text: '建议反馈', link: 'https://geektechstudio.feishu.cn/share/base/form/shrcn8koDFRcH2mMcBYMh9tiKfI'},
5662
{ text: '贡献文档', link: 'https://github.com/SwanHubX/SwanLab-Docs' },
@@ -106,6 +112,7 @@ export const zh = defineConfig({
106112
'/examples/':{base: '/examples/', items: sidebarExamples(),},
107113
'/guide_cloud/integration/':{base: '/guide_cloud/integration/', items: sidebarIntegration(),},
108114
'/api/':{base: '/api/', items: sidebarAPI(),},
115+
'/plugin/':{base: '/plugin/', items: sidebarPlugin(),},
109116
},
110117

111118
// 页脚配置
@@ -137,36 +144,43 @@ function sidebarGuideCloud(): DefaultTheme.SidebarItem[] {
137144
items: [
138145
{ text: '什么是实验跟踪', link: 'experiment_track/what-is-experiment-track' },
139146
{ text: '创建一个实验', link: 'experiment_track/create-experiment' },
140-
{ text: '用配置文件创建实验', link: 'experiment_track/create-experiment-by-configfile' },
141147
{ text: '设置实验配置', link: 'experiment_track/set-experiment-config' },
142148
{ text: '记录指标', link: 'experiment_track/log-experiment-metric' },
143149
{ text: '记录多媒体数据', link: 'experiment_track/log-media' },
144150
{ text: '系统硬件监控(支持昇腾)', link: 'experiment_track/system-monitor' },
145151
{ text: '查看实验结果', link: 'experiment_track/view-result' },
146152
{ text: '结束一个实验', link: 'experiment_track/finish-experiment' },
153+
{ text: '邮件/第三方通知', link: 'experiment_track/send-notification' },
147154
{ text: '用Jupyter Notebook跟踪实验', link: 'experiment_track/jupyter-notebook' },
148155
{ text: '限制与性能', link: 'experiment_track/limit-and-performance' },
149156
{ text: '实验元数据', link: 'experiment_track/experiment-metadata' },
150157
{ text: 'FAQ', link: 'experiment_track/FAQ' },
151158
]
152159
},
153160
{
154-
text: '💻 自托管',
161+
text: '🚀 自托管',
155162
// collapsed: false,
156163
items: [
157-
{ text: '离线看板', link: 'self_host/offline-board' },
158-
{ text: '远程访问教程', link: 'self_host/remote-view' },
164+
{ text: 'Docker部署', link: 'self_host/docker-deploy' },
159165
]
160166
},
167+
{
168+
text: '💻 离线看板',
169+
collapsed: true,
170+
items: [
171+
{ text: '使用离线看板', link: 'self_host/offline-board' },
172+
{ text: '远程访问离线看板', link: 'self_host/remote-view' },
173+
]
174+
},
161175
{
162176
text: '👥 社区',
163177
// collapsed: false,
164178
items: [
165179
{ text: '在线支持', link: 'community/online-support'},
166180
{ text: 'Github徽章', link: 'community/github-badge'},
167-
{ text: '论文引用', link: 'community/paper-cite'},
168-
{ text: '贡献代码', link: 'community/contributing-code'},
169-
{ text: '贡献官方文档', link: 'community/contributing-docs'},
181+
// { text: '论文引用', link: 'community/paper-cite'},
182+
// { text: '贡献代码', link: 'community/contributing-code'},
183+
// { text: '贡献官方文档', link: 'community/contributing-docs'},
170184
{ text: '关于我们', link: 'community/emotion-machine'},
171185
]
172186
},]
@@ -319,8 +333,15 @@ function sidebarAPI(): DefaultTheme.SidebarItem[] {
319333
{ text: 'login', link: 'py-login' },
320334
{ text: 'integration', link: 'py-integration' },
321335
{ text: 'converter', link: 'py-converter' },
322-
{ text: 'sync_wandb', link: 'py-sync-wandb' },
323-
{ text: 'sync_tensorboard', link: 'py-sync-tensorboard' },
336+
{
337+
text: '同步其他工具',
338+
items: [
339+
{ text: 'sync_wandb', link: 'py-sync-wandb' },
340+
{ text: 'sync_tensorboard', link: 'py-sync-tensorboard' },
341+
{ text: 'sync_mlflow', link: 'py-sync-mlflow' },
342+
]
343+
},
344+
{ text: 'register_callback', link: 'py-register-callback' },
324345
{ text: '其他', link: 'py-other' },
325346
]
326347
},
@@ -332,4 +353,30 @@ function sidebarAPI(): DefaultTheme.SidebarItem[] {
332353
]
333354
}
334355
]
356+
}
357+
358+
function sidebarPlugin(): DefaultTheme.SidebarItem[] {
359+
return [
360+
{
361+
text: '🔧 制作自定义插件',
362+
link: 'custom-plugin',
363+
},
364+
{
365+
text: '✈️ 通知类',
366+
// collapsed: false,
367+
items: [
368+
{ text: '邮件', link: 'notification-email' },
369+
{ text: '飞书', link: 'notification-lark' },
370+
{ text: '钉钉', link: 'notification-dingtalk' },
371+
{ text: '企业微信', link: 'notification-wxwork' },
372+
]
373+
},
374+
{
375+
text: '📝 记录类',
376+
// collapsed: false,
377+
items: [
378+
{ text: 'CSV表格', link: 'writer-csv' },
379+
]
380+
},
381+
]
335382
}

en/api/cli-swanlab-login.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,35 @@
11
# swanlab login
22

3-
``` bash
3+
```bash
44
swanlab login [OPTIONS]
55
```
66

77
| Option | Description |
88
| --- | --- |
9-
| `--relogin` | Re-login. |
9+
| `-r`, `--relogin` | Re-login. |
10+
| `-h`, `--host` | Specify the host where the SwanLab service is located. For example, `http://localhost:8000`. |
11+
| `-k`, `--api-key` | Specify the API Key. This allows automatic login if you prefer not to enter the API key via the command line. |
12+
| `-w`, `--web-host` | Specify the web host where the SwanLab frontend is located. |
1013

1114
## Introduction
1215

1316
Log in to your SwanLab account to synchronize experiments to the cloud.
1417

15-
After running the following command, if it's your first login, you will be prompted to fill in your [API_KEY](https://swanlab.cn/settings):
18+
After executing the following command, if it's your first time logging in, you will be prompted to enter your [API_KEY](https://swanlab.cn/settings):
1619

1720
```bash
1821
swanlab login
1922
```
2023

21-
After the first login, the credentials will be saved locally, and you won't need to log in again via `swanlab.login` or `swanlab login`.
24+
After logging in once, the credentials will be saved locally, overwriting any previously saved credentials, eliminating the need to log in again via `swanlab.login` or `swanlab login`.
25+
26+
> If you do not want the credentials to be saved locally, use [swanlab.login()](./py-login.md) in a Python script to log in.
27+
28+
If your computer is not suitable for entering the API Key via the command line (e.g., some Windows CMD), you can use:
29+
30+
```bash
31+
swanlab login -k <api-key>
32+
```
2233

2334
## Re-login
2435

@@ -28,10 +39,16 @@ If you need to log in with a different account, use the following command:
2839
swanlab login --relogin
2940
```
3041

31-
This will prompt you to enter a new API Key to re-login.
42+
This will prompt you to enter a new API Key to log in again.
3243

3344
## Logout
3445

3546
```bash
3647
swanlab logout
48+
```
49+
50+
## Logging in to a Private Service
51+
52+
```bash
53+
swanlab login --host <host>
3754
```

0 commit comments

Comments
 (0)