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

Feat/better readme #70

Merged
merged 5 commits into from
Dec 23, 2023
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
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,16 @@
</p>
<p align="center">
<a href="https://pypi.python.org/pypi/swanlab"><img src="https://img.shields.io/pypi/v/swanlab" /></a>
<a href="https://pypi.org/project/swanlab/"><img alt="pypi Download" src="https://img.shields.io/pypi/dm/SwanLab"></a>
<a href="https://geektechstudio.feishu.cn/wiki/UInBw9eaziv17IkwfrOcHCZ1nbc"><img alt="Website" src="https://img.shields.io/badge/website-online-blue"></a>
<a href="https://github.com/SwanHubX/SwanLab/blob/main/LICENSE"><img src="https://img.shields.io/github/license/SwanHubX/SwanLab.svg"></a>
<a href="https://github.com/SwanHubX/SwanLab/releases"><img alt="GitHub release" src="https://img.shields.io/github/release/SwanHubX/SwanLab.svg"></a>
</p>





<h4 align="center">
<p>
<b>English</b> |<a href="https://github.com/SwanHubX/SwanLab/blob/main/README_zh-hans.md">简体中文</a>
Expand All @@ -16,6 +23,7 @@




SwanLab is the next-generation machine learning experiment management and visualization tool released by the [SwanHub](https://swanhub.co), designed to facilitate effective collaboration in machine learning training.

SwanLab provides streamlined APIs that make it easy to track machine learning metrics and record configurations. Additionally, SwanLab provides a visual dashboard for the most intuitive way to **monitor**, **analyze**, and **compare** your training.
Expand Down Expand Up @@ -53,7 +61,7 @@ offset = random.random() / 5

# Initialize the experiment and record configuration information
swanlab.init(
description="This is a sample experiment for machine learning training.",
description="This is a sample experiment for machine learning training.",
config={
"learning_rate": lr,
"epochs": epochs,
Expand All @@ -64,9 +72,10 @@ swanlab.init(
for epoch in range(2, epochs):
acc = 1 - 2**-epoch - random.random() / epoch - offset
loss = 2**-epoch + random.random() / epoch + offset
print(f"epoch={epoch}, accuracy={acc}, loss={loss}")
# Track key metrics
swanlab.log({"loss": loss, "accuracy": acc})
time.sleep(0.1)
time.sleep(1)
```

During the program running, a `swanlog` folder will be generated in the directory to record your training data.
Expand Down Expand Up @@ -97,3 +106,7 @@ Access`http://127.0.0.1:5092` at this time to enter the experiment dashboard and



# Contributors

[![swanlab contributors](https://contrib.rocks/image?repo=SwanHubX/SwanLab&max=2000)](https://github.com/SwanHubX/SwanLab/graphs/contributors)

42 changes: 27 additions & 15 deletions README_zh-hans.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,21 @@
</p>
<p align="center">
<a href="https://pypi.python.org/pypi/swanlab"><img src="https://img.shields.io/pypi/v/swanlab" /></a>
<a href="https://github.com/SwanHubX/SwanLab/blob/main/LICENSE">
<img src="https://img.shields.io/github/license/SwanHubX/SwanLab.svg">
</a>
<a href="https://github.com/SwanHubX/SwanLab/releases">
<img alt="GitHub release" src="https://img.shields.io/github/release/SwanHubX/SwanLab.svg">
</a>
<a href="https://pypi.org/project/swanlab/"><img alt="pypi Download" src="https://img.shields.io/pypi/dm/SwanLab"></a>
<a href="https://geektechstudio.feishu.cn/wiki/UInBw9eaziv17IkwfrOcHCZ1nbc"><img alt="Website" src="https://img.shields.io/badge/website-online-blue"></a>
<a href="https://github.com/SwanHubX/SwanLab/blob/main/LICENSE"><img src="https://img.shields.io/github/license/SwanHubX/SwanLab.svg"></a>
<a href="https://github.com/SwanHubX/SwanLab/releases"><img alt="GitHub release" src="https://img.shields.io/github/release/SwanHubX/SwanLab.svg"></a>
</p>




<h4 align="center">
<p>
<a href="https://github.com/SwanHubX/SwanLab/blob/main/README.md">English</a> |<b>简体中文</b>
</p>
</h4>

SwanLab 是[SwanHub](https://swanhub.co)开源社区发布的新一代机器学习实验管理与可视化工具,旨在让机器学习训练有效地协作起
来。
SwanLab 是[SwanHub](https://swanhub.co)开源社区发布的新一代机器学习实验管理与可视化工具,旨在让机器学习训练有效地协作起来。

SwanLab 提供简洁的 API,轻松实现机器学习指标跟踪与配置记录。同时,SwanLab 还提供了一个可视化看板,以最直观的方式**监看、
分析和对比**你的训练。
Expand All @@ -29,7 +28,9 @@ SwanLab 提供简洁的 API,轻松实现机器学习指标跟踪与配置记

目前,SwanLab 正在快速迭代,并将持续添加新功能。

## Installation


## 安装

此存储库在 Python 3.8+上进行了测试。

Expand All @@ -39,10 +40,11 @@ SwanLab 可以使用 pip 安装,如下所示:
pip install swanlab
```

## Quick tour

让我们模拟一个简单的机器学习训练过程,使用`swanlab.init`来初始化实验并记录配置信息,并使用`swanlab.log`跟踪关键指标(在
这个例子中是 `loss``acc`):

## 快速开始

让我们模拟一个简单的机器学习训练过程,使用`swanlab.init`来初始化实验并记录配置信息,并使用`swanlab.log`跟踪关键指标(在这个例子中是 `loss``acc`):

```python
import swanlab
Expand All @@ -55,7 +57,7 @@ offset = random.random() / 5

# Initialize the experiment and record configuration information
swanlab.init(
description="This is a sample experiment for machine learning training.",
description="This is a sample experiment for machine learning training.",
config={
"learning_rate": lr,
"epochs": epochs,
Expand All @@ -66,9 +68,10 @@ swanlab.init(
for epoch in range(2, epochs):
acc = 1 - 2**-epoch - random.random() / epoch - offset
loss = 2**-epoch + random.random() / epoch + offset
print(f"epoch={epoch}, accuracy={acc}, loss={loss}")
# Track key metrics
swanlab.log({"loss": loss, "accuracy": acc})
time.sleep(0.1)
time.sleep(1)
```

在程序运行过程中,目录下会生成一个`swanlog`文件夹,记录了你的训练数据。
Expand All @@ -91,6 +94,15 @@ swanlab watch

<img alt="swanlab-dashboard-1" src="readme_files/swanlab-dashborad-1.png" width="800">



# License

[Apache 2.0 License](https://github.com/SwanHubX/SwanLab/blob/main/LICENSE)



# 贡献者

[![swanlab contributors](https://contrib.rocks/image?repo=SwanHubX/SwanLab&max=2000)](https://github.com/SwanHubX/SwanLab/graphs/contributors)