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: add some func for get exp info #842

Merged
merged 1 commit into from
Feb 28, 2025
Merged

feat: add some func for get exp info #842

merged 1 commit into from
Feb 28, 2025

Conversation

SAKURA-CAT
Copy link
Contributor

这段拉取请求包括对swanlab包的几项更改,以增加新功能和改善代码组织。最重要的更改包括添加新函数以检索URL,重新组织导入,以及增强错误处理和测试。

新功能:

  • swanlab/data/run/main.py中添加了get_url()get_project_url()函数,分别用于检索当前实验和项目的URL。

代码重组:

  • swanlab/__init__.pyswanlab/data/__init__.py中重新组织了导入,包括configget_urlget_project_url[1] [2]
  • 更新了swanlab/data/run/__init__.py中的导入语句,以包含新函数。

错误处理:

  • swanlab/log/console.py中增强了错误处理,以捕获在关闭的文件上尝试进行I/O操作时的ValueError

测试:

  • test/unit/data/run/test_main.py中为get_url()get_project_url()函数添加了单元测试。[1] [2] [3]
  • 更新了test/unit/data/test_sdk.py中的测试,以断言WEB_HOST环境变量的正确值。

@SAKURA-CAT SAKURA-CAT added the 💪 enhancement New feature or request label Feb 28, 2025
@SAKURA-CAT SAKURA-CAT self-assigned this Feb 28, 2025
@SAKURA-CAT SAKURA-CAT merged commit 3c07e17 into main Feb 28, 2025
5 checks passed
@SAKURA-CAT SAKURA-CAT deleted the feat/some-sugar branch February 28, 2025 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants