Repository navigation
Commit c185d30
fix(create_dummy_models): skip primitive attributes ending in _config in _get_exact_config
PR #45333 added `serialize_explicit_per_layer_config: bool = False` to
PreTrainedConfig base class. Its name ends in `_config`, so the dir()
scan in `_get_exact_config` picks it up and tries to recurse into the
`False` value, crashing with `AttributeError: 'bool' object has no
attribute 'to_dict'` (affects Qwen3_5Config and any other config that
inherits the attribute).
Skip any sub_config that is neither a dict nor has a `to_dict` method,
i.e. plain primitives that happen to have a `_config`-suffixed name.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 51a517d commit c185d30
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
543 | 543 | | |
544 | 544 | | |
545 | 545 | | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
546 | 550 | | |
547 | 551 | | |
548 | 552 | | |
| |||
0 commit comments