Skip to content

Conversation

Zeyi-Lin
Copy link
Member

Description

Closes: #1189

Test Code:

export SWANLAB_DESCRIPTION="这是一个重要的实验"

# 设置实验标签(多个标签用逗号分隔)
export SWANLAB_TAGS="production,model-v1,important"

# 禁用Git信息采集
export SWANLAB_DISABLE_GIT=true

# 运行实验
python your_script.py

@Zeyi-Lin Zeyi-Lin changed the title vite coding feat: more env var Jul 20, 2025
@Zeyi-Lin Zeyi-Lin marked this pull request as ready for review July 20, 2025 06:10
@Zeyi-Lin Zeyi-Lin requested a review from SAKURA-CAT July 20, 2025 06:10
@Zeyi-Lin Zeyi-Lin self-assigned this Jul 20, 2025
@Zeyi-Lin Zeyi-Lin added the 💪 enhancement New feature or request label Jul 20, 2025
@Zeyi-Lin
Copy link
Member Author

Zeyi-Lin commented Sep 1, 2025

需要补一下单元测试

Introduced the check_env decorator for environment-based function control and refactored git info retrieval to use it. Added _load_list_from_env for parsing list-type env variables, updated SwanLabEnv to remove toolkit dependency, and improved test coverage for new utilities.
Updated the @check_env decorator on get_git_info to provide an empty dict as the default return value when SwanLabEnv.DISABLE_GIT is set. This prevents errors when git information is unavailable.
Renamed test_utils.py to test_metadata_utils.py in run/metadata and test_utils.py to test_sdk_utils.py in data to better reflect their contents and improve code organization.
@SAKURA-CAT SAKURA-CAT merged commit 27f5145 into main Sep 9, 2025
5 checks passed
@SAKURA-CAT SAKURA-CAT deleted the feat/add-env-var branch September 9, 2025 04:56
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.

[REQUEST] 环境变量补充列表

2 participants