Skip to content

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 requested a review from SAKURA-CAT March 25, 2024 03:05
@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