-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Description
When trying to export models with extra="allow" setting in the config, We get error:
AttributeError: type object 'Config' has no attribute 'extra'
In cli/script.py line 257
After modifying to
# Handle case when config is a Pydantic model's Config class
if hasattr(config, 'extra'):
if config.extra != "allow":
revert["extra"] = config.extra
config.extra = "forbid" # type: ignore
else:
# If `extra` doesn't exist in the `Config`, handle it accordingly
revert["extra"] = None # No need to set, just ensure we avoid issues
Makes it to work
makkus, levYatsishin and jangxyz
Metadata
Metadata
Assignees
Labels
No labels