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
@@ -30,58 +34,49 @@ English | <a href="README_zh-hans.md">中文</a>
30
34
-[Key Function](#key-function)
31
35
-[Installation](#installation)
32
36
-[Getting Started](#getting-started)
37
+
-[Tutorial](#Tutorial)
33
38
-[Use Case](#use-case)
34
-
-[More Tips](#more-tips)
35
39
-[LICENSE](#license)
36
40
37
41
<br>
38
42
39
43
## Changelog
40
44
41
-
[24/02/08] 🔥 Very Big Update! We supported [Image Chart](https://geektechstudio.feishu.cn/wiki/LZFxwTuegiXxPGkhXcpcBUEXnHb)、[Audio Chart](https://geektechstudio.feishu.cn/wiki/SU6mwcVNbixMf1k95KbcZHDCnJe)、Mutil-Experiments Chart and a series of comprehensive optimizations and improvements! Please be sure to upgrade to the latest version via `pip install -U swanlab`.
45
+
Upgrade to the latest version: `pip install -U swanlab`。
42
46
43
-
[24/01/25] 😄 We supported a new Config/Summary table component that supports parameter search. Additionally, we've used new fonts and color schemes.
47
+
[24/03/01] 🚀 Still Very Big Upgrade!We supported [Text Chart](https://geektechstudio.feishu.cn/wiki/T0L7wYfzGiZUCKkxfehcFwYAnIh)to meet the needs of tasks in NLP, LLM, Agent and other scenarios; We have made a lot of optimizations to line chart's UI, legend, and rendering speed. We improved the rendering performance of Logs —— now viewing terminal printing information with 200k lines is also not lagging.(v0.2.1)
44
48
45
-
[24/01/23] 🚨 We use SQLite database and Peewee to replace the previous basic configuration information reading and writing solution by [#114](https://github.com/SwanHubX/SwanLab/issues/114). It's a major change that is highly beneficial for the future of the project, but the drawback is that it's not compatible with old versions (swanlab<=v0.1.4) of log data files. Therefore, if you need to visualize log files generated by older versions, please use [transfer script](script/transfer_logfile_0.1.4.py)
49
+
[24/02/08] 🔥 Very Big Upgrade! We supported [Image Chart](https://geektechstudio.feishu.cn/wiki/LZFxwTuegiXxPGkhXcpcBUEXnHb)、[Audio Chart](https://geektechstudio.feishu.cn/wiki/SU6mwcVNbixMf1k95KbcZHDCnJe)、Mutil-Experiments Chart and a series of comprehensive optimizations and improvements! Please be sure to upgrade to the latest version via `pip install -U swanlab`.(v0.2.0)
46
50
47
-
Additionally, we supported export the experiment list as `CSV`, new environment record items `Run path` and `logdir`, added interactive quick copy function, and new API `swanlab.config`.
51
+
[24/01/25] 😄 We supported a new Config/Summary table component that supports parameter search. Additionally, we've used new fonts and color schemes.(v0.1.6)
-**🥔 Offline Support**: SwanLab can run entirely offile, ithout requiring any access to the Internet. For instance, this may be on your local machine, behind a corporate firewall, or in a datacenter
77
+
-**⚡️ Auto Save Environment Info**: Hyperparameters, Config, Metric, Terminal logging, Environment Information auto save.
82
78
83
-
> [!NOTE]
84
-
> See the SwanLab <ahref="https://geektechstudio.feishu.cn/wiki/MwXmw9yDeiZWyQkPnNgcixwWnwu">Documentaion</a> and <ahref="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/SwanHubX/SwanLab-examples">Examples</a> for a full description of the SwanLab.
79
+
-**🥔 Offline Support**: SwanLab can run entirely offile, ithout requiring any access to the Internet. For instance, this may be on your local machine, behind a corporate firewall, or in a datacenter.
85
80
86
81
<br>
87
82
@@ -117,105 +112,93 @@ import swanlab
117
112
118
113
# Start a SwanLab Run with swanlab.init
119
114
swanlab.init(
120
-
# save model inputs and hyperparameters in a swanlab.config object
121
-
config={'learning_rate': 0.01},
115
+
# Save model inputs and hyperparameters in a swanlab.config object
116
+
config={'epochs': 20, 'learning_rate': 0.01},
117
+
# Specify the save path of the log file
122
118
logdir="./logs",
123
119
)
124
120
125
121
# Model training code here...
126
122
127
123
# Log metrics over time for visualizing performance with swanlab.log
128
-
for epoch inrange(1, 20):
124
+
for epoch inrange(1, swanlab.config.epochs):
129
125
swanlab.log({"loss": loss})
130
126
```
131
127
132
-
3. Third, Run a Dashboard:
133
-
```bash
134
-
$ swanlab watch -l ./logs
135
-
```
136
-
137
-
That's it! Open http://127.0.0.1:5092 to view a dashboard of your first SwanLab Experiment.
138
-
139
-
<br>
140
-
141
-
## Use Case
142
-
143
-
Learn how to use SwanLab more effectively by following these use cases:
144
-
145
-
| Code Cases | Description |
146
-
| ------- | ------- |
147
-
|[Hello World](https://github.com/SwanHubX/SwanLab-examples/tree/main/Hello_World)| Getting Started |
148
-
|[MNIST](https://github.com/SwanHubX/SwanLab-examples/tree/main/MNIST)| Handwriting recognition based on a plain net and MNIST dataset with pytroch, swanlab. |
149
-
|[Image Classification](https://github.com/SwanHubX/SwanLab-examples/blob/main/Resnet50)| Cat and dog classification based on ResNet50 with pytorch, swanlab and gradio. [Tutorial](https://zhuanlan.zhihu.com/p/676430630). |
150
-
|[Text Generation](https://github.com/SwanHubX/SwanLab-examples/blob/main/Word_language_model)| Text generation based on Word_language_model (RNN/LSTM/GRU/Transformer) |
151
-
|[UIE-Finetune](https://github.com/SwanHubX/SwanLab-examples/tree/main/UIE)| how to use personal data to finetune UIE model and monitor training process through swanlab |
152
-
153
-
<br>
154
-
155
-
## More Tips
156
-
157
-
🏄♀️ Experiment Dashboard:
158
-
159
-
<details>
160
-
<summary>Set a log directory save path and run the Dashboard using it</summary>
161
-
162
-
Set a log directory save path, such as `./logs`:
128
+
For example, We wrote a simulation experiment script:
loss =2**-epoch + random.random() / epoch + offset
150
+
swanlab.log({"loss": loss, "accuracy": acc})
176
151
```
177
152
178
-
</details>
179
-
180
-
<details>
181
-
<summary>Set the Host and Port for the Dashboard</summary>
182
153
154
+
3. Third, open the terminal and use the following command to start a SwanLab dashboard:
183
155
```bash
184
-
$ swanlab watch --host 0.0.0.0 --port 8080
156
+
$ swanlab watch -l ./logs
185
157
```
186
158
187
-
</details>
188
-
189
-
<details>
190
-
<summary>Remotely access Dashboard</summary>
159
+
SwanLab will give you a URL link (default is http://127.0.0.1:5092). Check the link to see the visualization results of your first experiment in the browser.
191
160
192
-
- Link:[Access the SwanLab Dashboard While Training on a Remote Server](https://zhuanlan.zhihu.com/p/677224865)
-[Pass argparse into swanlab.config](https://geektechstudio.feishu.cn/wiki/CT1Xwo6ehimNH5kz7y9csTGkn0e)
210
188
189
+
<br>
211
190
212
-
swanlab.init(
213
-
config=args
214
-
)
215
-
```
191
+
## Use Case
216
192
217
-
</details>
193
+
Learn how to use SwanLab more effectively by following these use cases:
218
194
195
+
| Code Cases | Description |
196
+
| ------- | ------- |
197
+
|[Hello World](https://github.com/SwanHubX/SwanLab-examples/tree/main/Hello_World)| Getting Started |
198
+
|[MNIST](https://github.com/SwanHubX/SwanLab-examples/tree/main/MNIST)| Handwriting recognition based on a plain net and MNIST dataset with pytroch, swanlab. |
199
+
|[Image Classification](https://github.com/SwanHubX/SwanLab-examples/blob/main/Resnet50)| Cat and dog classification based on ResNet50 with pytorch, swanlab and gradio. [Tutorial](https://zhuanlan.zhihu.com/p/676430630). |
200
+
|[Text Generation](https://github.com/SwanHubX/SwanLab-examples/blob/main/Word_language_model)| Text generation based on Word_language_model (RNN/LSTM/GRU/Transformer) |
201
+
|[UIE-Finetune](https://github.com/SwanHubX/SwanLab-examples/tree/main/UIE)| how to use personal data to finetune UIE model and monitor training process through swanlab |
0 commit comments