[cherry-pick] update deafult value for xxx_strategy and model_conf #3613
+13
−13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before submitting
testsfolder. 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
will find evaluation_strategy's default value is
"no". However,IntervalStrategy["no"]can not find.根本原因是值默认类型和默认值不匹配,因此在此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