Skip to content

Conversation

Zeyi-Lin
Copy link
Member

Description

  1. 支持通过json/yaml配置文件初始化swanlab.init,接口为swanlab.init_from_path
  2. 删除正则表达式

测试脚本:

import swanlab

run = swanlab.init_from_path('.../swanlab-config.yaml')

for epoch in range(2, run.config.epochs):
    acc = 1 - 2**-epoch - random.random() / epoch - offset
    loss = 2**-epoch + random.random() / epoch + offset
    print(f"Epoch {epoch}: loss={loss}, accuracy={acc}")
    swanlab.log({"loss": loss, "accuracy": acc})

配置文件:

experiment_name: 🙋Hello World
description: 你好,世界
config:
  epochs: 10
  learning_rate: 0.0001

Zeyi-Lin and others added 5 commits March 26, 2024 17:29
commit 2f1b563
Author: KAAANG <[email protected]>
Date:   Tue Mar 19 15:06:50 2024 +0800

    v0.2.4

commit ef38b94
Author: Zirui Cai <[email protected]>
Date:   Sat Mar 16 13:26:34 2024 +0800

    feat: check blanks

commit c625281
Author: Zirui Cai <[email protected]>
Date:   Sat Mar 16 13:09:49 2024 +0800

    refactor: project name

commit f134936
Author: Zirui Cai <[email protected]>
Date:   Sat Mar 16 13:01:34 2024 +0800

    refactor: delete blanks

commit f1ca709
Author: Zirui Cai <[email protected]>
Date:   Sat Mar 16 12:49:17 2024 +0800

    refactor: experiment name

commit 245943c
Author: ZeYi Lin <[email protected]>
Date:   Thu Mar 14 21:42:33 2024 +0800

    Update file.py
@Zeyi-Lin Zeyi-Lin requested a review from SAKURA-CAT March 26, 2024 11:34
@Zeyi-Lin Zeyi-Lin self-assigned this Mar 26, 2024
@Zeyi-Lin Zeyi-Lin added this to the v0.3.0 milestone Mar 26, 2024
@Zeyi-Lin Zeyi-Lin requested a review from Feudalman March 26, 2024 11:35
@SAKURA-CAT SAKURA-CAT merged commit b5070b3 into main Mar 26, 2024
@SAKURA-CAT SAKURA-CAT deleted the feat/init_from_file branch March 26, 2024 13:47
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.

3 participants