From 5e5ca544c8f608f0a1ef47733ef9d2ab7843a59a Mon Sep 17 00:00:00 2001 From: ZeYi Lin <944270057@qq.com> Date: Sat, 23 Dec 2023 00:49:36 +0800 Subject: [PATCH 1/5] optimize readme code --- README.md | 4 +++- README_zh-hans.md | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 489549b15..9d0f50d7e 100644 --- a/README.md +++ b/README.md @@ -64,9 +64,11 @@ 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"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. diff --git a/README_zh-hans.md b/README_zh-hans.md index e2ea83bc4..796f0c726 100644 --- a/README_zh-hans.md +++ b/README_zh-hans.md @@ -66,9 +66,11 @@ 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"accuracy={acc}, loss={loss}") + # Track key metrics swanlab.log({"loss": loss, "accuracy": acc}) - time.sleep(0.1) + time.sleep(1) ``` 在程序运行过程中,目录下会生成一个`swanlog`文件夹,记录了你的训练数据。 From bcb398f34633c23cdbf7ea4682583127fc74d675 Mon Sep 17 00:00:00 2001 From: ZeYi Lin <944270057@qq.com> Date: Sat, 23 Dec 2023 03:47:02 +0800 Subject: [PATCH 2/5] Add badge and contributor --- README.md | 14 +++++++++++++- README_zh-hans.md | 32 ++++++++++++++++++++++---------- 2 files changed, 35 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 9d0f50d7e..966f85ec8 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,16 @@

+ pypi Download + Website GitHub release

+ + + + +

English |简体中文 @@ -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. @@ -64,7 +72,7 @@ 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"accuracy={acc}, loss={loss}") + print(f"epoch={epoch}, accuracy={acc}, loss={loss}") # Track key metrics swanlab.log({"loss": loss, "accuracy": acc}) @@ -99,3 +107,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) + diff --git a/README_zh-hans.md b/README_zh-hans.md index 796f0c726..1b32ebadd 100644 --- a/README_zh-hans.md +++ b/README_zh-hans.md @@ -5,20 +5,19 @@

- - - - - GitHub release - + pypi Download + Website + + GitHub release

+ +

English |简体中文

- SwanLab 是[SwanHub](https://swanhub.co)开源社区发布的新一代机器学习实验管理与可视化工具,旨在让机器学习训练有效地协作起 来。 @@ -29,7 +28,9 @@ SwanLab 提供简洁的 API,轻松实现机器学习指标跟踪与配置记 目前,SwanLab 正在快速迭代,并将持续添加新功能。 -## Installation + + +## 安装 此存储库在 Python 3.8+上进行了测试。 @@ -39,7 +40,9 @@ SwanLab 可以使用 pip 安装,如下所示: pip install swanlab ``` -## Quick tour + + +## 快速开始 让我们模拟一个简单的机器学习训练过程,使用`swanlab.init`来初始化实验并记录配置信息,并使用`swanlab.log`跟踪关键指标(在 这个例子中是 `loss` 和 `acc`): @@ -66,7 +69,7 @@ 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"accuracy={acc}, loss={loss}") + print(f"epoch={epoch}, accuracy={acc}, loss={loss}") # Track key metrics swanlab.log({"loss": loss, "accuracy": acc}) @@ -93,6 +96,15 @@ swanlab watch swanlab-dashboard-1 + + # 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) + From 6d54d6977becad5286ee223a1dd1594430449083 Mon Sep 17 00:00:00 2001 From: ZeYi Lin <944270057@qq.com> Date: Sat, 23 Dec 2023 14:58:20 +0800 Subject: [PATCH 3/5] fix readme code --- README.md | 5 ++--- README_zh-hans.md | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 966f85ec8..c5ece0bb6 100644 --- a/README.md +++ b/README.md @@ -61,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, @@ -72,8 +72,7 @@ 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}") - + print(f"epoch={epoch}, accuracy={acc}, loss={loss}") # Track key metrics swanlab.log({"loss": loss, "accuracy": acc}) time.sleep(1) diff --git a/README_zh-hans.md b/README_zh-hans.md index 1b32ebadd..506416817 100644 --- a/README_zh-hans.md +++ b/README_zh-hans.md @@ -58,7 +58,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, @@ -69,8 +69,7 @@ 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}") - + print(f"epoch={epoch}, accuracy={acc}, loss={loss}") # Track key metrics swanlab.log({"loss": loss, "accuracy": acc}) time.sleep(1) From 0549bb0e4bd5bf2e535122659cbc5d0f5d16913b Mon Sep 17 00:00:00 2001 From: ZeYi Lin <944270057@qq.com> Date: Sat, 23 Dec 2023 15:00:01 +0800 Subject: [PATCH 4/5] fix reamde code and badge --- README.md | 4 ++-- README_zh-hans.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c5ece0bb6..135915470 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@

- pypi Download + pypi Download Website GitHub release @@ -72,7 +72,7 @@ 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}") + print(f"epoch={epoch}, accuracy={acc}, loss={loss}") # Track key metrics swanlab.log({"loss": loss, "accuracy": acc}) time.sleep(1) diff --git a/README_zh-hans.md b/README_zh-hans.md index 506416817..5f14aaca2 100644 --- a/README_zh-hans.md +++ b/README_zh-hans.md @@ -5,7 +5,7 @@

- pypi Download + pypi Download Website GitHub release @@ -69,7 +69,7 @@ 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}") + print(f"epoch={epoch}, accuracy={acc}, loss={loss}") # Track key metrics swanlab.log({"loss": loss, "accuracy": acc}) time.sleep(1) From 11658bcb4a2cba33422ad63a8b22019fed498613 Mon Sep 17 00:00:00 2001 From: ZeYi Lin <944270057@qq.com> Date: Sat, 23 Dec 2023 16:25:43 +0800 Subject: [PATCH 5/5] fix reamde_zh-hans.md --- README_zh-hans.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README_zh-hans.md b/README_zh-hans.md index 5f14aaca2..9771d29bf 100644 --- a/README_zh-hans.md +++ b/README_zh-hans.md @@ -13,13 +13,13 @@ +

English |简体中文

-SwanLab 是[SwanHub](https://swanhub.co)开源社区发布的新一代机器学习实验管理与可视化工具,旨在让机器学习训练有效地协作起 -来。 +SwanLab 是[SwanHub](https://swanhub.co)开源社区发布的新一代机器学习实验管理与可视化工具,旨在让机器学习训练有效地协作起来。 SwanLab 提供简洁的 API,轻松实现机器学习指标跟踪与配置记录。同时,SwanLab 还提供了一个可视化看板,以最直观的方式**监看、 分析和对比**你的训练。 @@ -44,8 +44,7 @@ pip install swanlab ## 快速开始 -让我们模拟一个简单的机器学习训练过程,使用`swanlab.init`来初始化实验并记录配置信息,并使用`swanlab.log`跟踪关键指标(在 -这个例子中是 `loss` 和 `acc`): +让我们模拟一个简单的机器学习训练过程,使用`swanlab.init`来初始化实验并记录配置信息,并使用`swanlab.log`跟踪关键指标(在这个例子中是 `loss` 和 `acc`): ```python import swanlab