Repository navigation
Commit 60f1abe
committed
refactor(hf): merge an override into the section's own dict, with no fallback
A section read from either config type has its dict in the data being merged:
PretrainedConfig.to_dict serializes every sub-config the config holds, and
RawConfigShim wraps only the dicts it holds. The `or {}` fallback was reached
only by a section a config class computes in a property, as transformers'
PeAudioVideoConfig does, and there the whole-section write it produced was
refused at the re-init ("property ... has no setter"); such an override now
fails at the merge, naming the section. _with_overrides takes the two config
types it is handed.1 parent 9c635a1 commit 60f1abe
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
| 237 | + | |
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
242 | | - | |
| 242 | + | |
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
| |||
0 commit comments