Skip to content

Commit d2e4315

Browse files
Revert hotfix Fall back to config.text_config._name_or_path (#4581)
1 parent 357e331 commit d2e4315

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

trl/trainer/utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2026,5 +2026,4 @@ def get_config_model_id(config: PretrainedConfig) -> str:
20262026
`str`:
20272027
The model identifier associated with the model configuration.
20282028
"""
2029-
# Fall back to `config.text_config._name_or_path` if `config._name_or_path` is missing: Qwen2-VL and Qwen2.5-VL. See GH-4323
2030-
return getattr(config, "_name_or_path", "") or getattr(getattr(config, "text_config", None), "_name_or_path", "")
2029+
return getattr(config, "_name_or_path", "")

0 commit comments

Comments
 (0)