Skip to content

Conversation

SAKURA-CAT
Copy link
Member

@SAKURA-CAT SAKURA-CAT commented Jun 6, 2025

Description

测试发现bool类型继承int,这导致前端将所有的True/False处理为1/0

close #1035

add test for #1044

@SAKURA-CAT SAKURA-CAT requested review from Copilot and Feudalman June 6, 2025 05:39
@SAKURA-CAT SAKURA-CAT self-assigned this Jun 6, 2025
@SAKURA-CAT SAKURA-CAT added the 🐛 bug Something isn't working label Jun 6, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses an issue where bool values were previously being misinterpreted as ints in the configuration parsing logic. Key changes include:

  • Adding tests in test_config.py to specifically verify bool behavior.
  • Adjusting the bool handling in swanlab/data/run/config.py by removing bool from BASE_TYPE and adding a dedicated check.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
test/unit/data/run/test_config.py Added tests for proper bool value updating
swanlab/data/run/config.py Implemented dedicated bool handling in config parsing

@SAKURA-CAT SAKURA-CAT merged commit c74e839 into main Jun 6, 2025
5 checks passed
@SAKURA-CAT SAKURA-CAT deleted the fix/config branch June 6, 2025 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ADVICE] 配置里面bool类型的超参的显示问题
2 participants