Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readme v0.2.0 #326

Merged
merged 3 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Track and visualize all the pieces of your machine learning pipeline
</p>

<p align="center">
<a href="https://github.com/SwanHubX/SwanLab/stargazers"><img src="https://img.shields.io/github/stars/SwanHubX/SwanLab?style=social" alt= /></a>
<a href="https://github.com/SwanHubX/SwanLab/stargazers"><img src="https://img.shields.io/github/stars/SwanHubX/SwanLab?style=social"/></a>
<a href="https://github.com/SwanHubX/SwanLab/blob/main/LICENSE"><img src="https://img.shields.io/github/license/SwanHubX/SwanLab.svg?color=brightgreen" alt="license"></a>
<a href="https://github.com/SwanHubX/SwanLab/commits/main"><img src="https://img.shields.io/github/last-commit/SwanHubX/SwanLab" alt="license"></a>
<a href="https://pypi.python.org/pypi/swanlab"><img src="https://img.shields.io/pypi/v/swanlab?color=orange" alt= /></a>
<a href="https://pypi.python.org/pypi/swanlab"><img src="https://img.shields.io/pypi/v/swanlab?color=orange"/></a>
<a href="https://pepy.tech/project/swanlab"><img alt="pypi Download" src="https://static.pepy.tech/badge/swanlab/month"></a>
<a href="https://github.com/SwanHubX/SwanLab/discussions"><img alt="Github Discussion" src="https://img.shields.io/badge/discussions-GitHub-333333?logo=github"></a>
</p>
Expand All @@ -38,24 +38,30 @@ English | <a href="README_zh-hans.md">中文</a>

## Changelog

[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`.

[24/01/25] 😄 We supported a new Config/Summary table component that supports parameter search. Additionally, we've used new fonts and color schemes.

[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)

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`.

[24/01/14] 🔥 We supported a new UI, tracking additional environment information, including command, git commit/branch and memory. Additionally, we've added a `logdir` API, allowing developers to set the directory for log files.

[Full Changelog](https://github.com/SwanHubX/SwanLab/releases)

<br>

## Key Function

- **🚀 Multimedia charts**: log Image/Audio/Video/Text/object3D...

<div align="center">
<img src="readme_files/mutilmedia-chart.gif" width="600">
</div>

- **🧪 Experiments GridView**: compare your key metrics for inspiration faster

<div align="center">
<img src="readme_files/experiments-gridView.gif" width="600">
<img src="readme_files/experiments-table.png" width="600">
</div>

- **📊 Charts**: visualize your entire training process
Expand Down Expand Up @@ -113,6 +119,7 @@ import swanlab
swanlab.init(
# save model inputs and hyperparameters in a swanlab.config object
config={'learning_rate': 0.01},
logdir="./logs",
)

# Model training code here...
Expand All @@ -124,7 +131,7 @@ for epoch in range(1, 20):

3. Third, Run a Dashboard:
```bash
$ swanlab watch
$ swanlab watch -l ./logs
```

That's it! Open http://127.0.0.1:5092 to view a dashboard of your first SwanLab Experiment.
Expand All @@ -141,6 +148,7 @@ Learn how to use SwanLab more effectively by following these use cases:
| [MNIST](https://github.com/SwanHubX/SwanLab-examples/tree/main/MNIST) | Handwriting recognition based on a plain net and MNIST dataset with pytroch, swanlab. |
| [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). |
| [Text Generation](https://github.com/SwanHubX/SwanLab-examples/blob/main/Word_language_model) | Text generation based on Word_language_model (RNN/LSTM/GRU/Transformer) |
| [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 |

<br>

Expand Down
16 changes: 12 additions & 4 deletions README_zh-hans.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,28 @@

## 更新日志

[24/02/08] 🔥 超大更新! 我们支持了[图像图表](https://geektechstudio.feishu.cn/wiki/LZFxwTuegiXxPGkhXcpcBUEXnHb)、[音频图表](https://geektechstudio.feishu.cn/wiki/SU6mwcVNbixMf1k95KbcZHDCnJe)、多实验图表以及一系列全面的优化和改进!可通过 `pip install -U swanlab` 升级到最新版本体验新特性。

[24/01/25] 😄 我们发布了新的Config/Summary表格组件,支持参数搜索。此外我们还使用了新的字体和配色。

[24/01/23] 🚨 我们使用SQLite数据库和Peewee库替代了之前的基础配置信息读写方案([#114](https://github.com/SwanHubX/SwanLab/issues/114)),这是个极大有利于项目未来的改动,但缺陷是不兼容旧版本(swanlab<=v0.1.4)的日志数据文件,所以如需可视化旧版本产生的日志文件, 请使用[转换脚本](script/transfer_logfile_0.1.4.py)。与此同时,我们增加了支持导出实验列表为CSV,新的环境记录项`Run path`和`logdir`,增加了快捷复制的交互,以及新的API `swanlab.config`。

[24/01/14] 🔥 我们发布了一个新的UI界面,以及跟踪更多环境信息,包括Command、git提交/分支、和机器内存。此外,我们还添加了一个`logdir` API,允许开发人员设置日志文件的目录。

[完整更新日志](https://github.com/SwanHubX/SwanLab/releases)

<br>

## 核心功能

- **🚀 多媒体图表**: 记录训练中的图像/音频/视频/文本/3D模型...

<div align="center">
<img src="readme_files/mutilmedia-chart.gif" width="600">
</div>

- **🧪 表格视图**: 对比关键指标,更快获得洞见

<div align="center">
<img src="readme_files/experiments-gridView.gif" width="600">
<img src="readme_files/experiments-table.png" width="600">
</div>

- **📊 图表视图**: 可视化你的机器学习训练全过程
Expand Down Expand Up @@ -110,6 +116,7 @@ import swanlab
swanlab.init(
# save model inputs and hyperparameters in a swanlab.config object
config={'learning_rate': 0.01},
logdir="./logs",
)

# Model training code here...
Expand All @@ -121,7 +128,7 @@ for epoch in range(1, 20):

3. 第三步,开启一个SwanLab仪表板:
```bash
$ swanlab watch
$ swanlab watch -l ./logs
```

就是这样!打开 http://127.0.0.1:5092 ,查看你的第一个SwanLab实验的仪表板。
Expand All @@ -138,6 +145,7 @@ $ swanlab watch
| [MNIST](https://github.com/SwanHubX/SwanLab-examples/tree/main/MNIST) | 基于神经网络的MNIST手写体识别(使用pytorch、swanlab库) |
| [图像分类](https://github.com/SwanHubX/SwanLab-examples/blob/main/Resnet50) | ResNet50猫狗分类(使用pytorch、swanlab、Gradio库) [图文教程](https://zhuanlan.zhihu.com/p/676430630) |
| [文本生成](https://github.com/SwanHubX/SwanLab-examples/blob/main/Word_language_model) | 基于自然语言模型的文本生成 (RNN/LSTM/GRU/Transformer) |
| [微调UIE](https://github.com/SwanHubX/SwanLab-examples/tree/main/UIE) | 如何使用个人数据来微调UIE模型并通过swanlab监控训练过程 |

<br>

Expand Down
Binary file modified readme_files/charts-1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed readme_files/experiments-gridView.gif
Binary file not shown.
Binary file added readme_files/experiments-table.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readme_files/mutilmedia-chart.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion swanlab/data/modules/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ class Audio(BaseType):
"""

def __init__(
self, data_or_path: Union[str, np.ndarray, List["Audio"]], sample_rate: int = None, caption: str = None
self,
data_or_path: Union[str, np.ndarray, List["Audio"]],
sample_rate: int = None,
caption: str = None,
):
"""Accept a path to an audio file on a numpу array of audio data."""
super().__init__(data_or_path)
Expand Down