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/config_file #426

Merged
merged 1 commit into from
Mar 25, 2024
Merged

feat/config_file #426

merged 1 commit into from
Mar 25, 2024

Conversation

Zeyi-Lin
Copy link
Member

@Zeyi-Lin Zeyi-Lin commented Mar 25, 2024

Closes: #252

Description

swanlab.init增加config_file参数,支持填入json、yaml文件路径。
将json、yaml读取解析为dict,与config合并后传入。

测试代码:

import swanlab

swanlab.init(
    config={"epochs": 50, "lr": 0.04}
    config_file=".../config.yaml"
)

config.yaml:

debug: 这是一串的字符串
epochs: 60
learning_rate: 0.01
test: 1
verbose: 1

@Zeyi-Lin Zeyi-Lin self-assigned this Mar 25, 2024
@Zeyi-Lin Zeyi-Lin added this to the v0.3.0 milestone Mar 25, 2024
@SAKURA-CAT SAKURA-CAT merged commit ff5664c into main Mar 25, 2024
@SAKURA-CAT SAKURA-CAT deleted the feat/config_json branch March 25, 2024 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Use json and yaml to run a training with SwanLab
2 participants