Skip to content

Conversation

@DrownFish19
Copy link
Contributor

@DrownFish19 DrownFish19 commented Jan 19, 2026

Before submitting

  • Lint code. If there are lint issues, please format the code first.
# Install and register `pre-commit` in the project folder
pip install pre-commit && pre-commit install

# Process previous code files separately
pre-commit run --file XXXX.py
  • Add test cases into tests folder. If there are codecov issues, please add tests cases first.

PR types

Others

PR changes

Others

Description

Update deafult value for evaluation_strategy/logging_strategy/save_strategy.

When

OmegaConf.structured(dataclass_type) # TrainingArguments

will find evaluation_strategy's default value is "no". However, IntervalStrategy["no"] can not find.

image

根本原因是值默认类型和默认值不匹配,因此在此PR修改默认值。
虽然 IntervalStrategy 的定义中 NO = "no",看起来值是小写的,但 Python 的 Enum 查找机制如下:
按名查找 (By Name): IntervalStrategy['NO'] -> 返回 IntervalStrategy.NO (这是 OmegaConf 在结构化转换时默认尝试的行为)。
按值查找 (By Value): IntervalStrategy('no') -> 返回 IntervalStrategy.NO。
OmegaConf 的 structured 方法在处理类型提示为 Enum 的字段时,通常期望输入匹配枚举的 Name。
Merged in dev: #3609
Merged in dev: #3609

@paddle-bot
Copy link

paddle-bot bot commented Jan 19, 2026

Thanks for your contribution!

Copy link
Collaborator

@lugimzzz lugimzzz left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (release/v1.0@e070af5). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff               @@
##             release/v1.0    #3613   +/-   ##
===============================================
  Coverage                ?   36.67%           
===============================================
  Files                   ?      400           
  Lines                   ?    71271           
  Branches                ?        0           
===============================================
  Hits                    ?    26142           
  Misses                  ?    45129           
  Partials                ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@DrownFish19
Copy link
Contributor Author

/re-run all-failed

2 similar comments
@DrownFish19
Copy link
Contributor Author

/re-run all-failed

@DrownFish19
Copy link
Contributor Author

/re-run all-failed

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