You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Making usage of this neat package, we created a configuration-structure kind of big. It has several layers of sub-configs and one config in particular is used repeatedly within an upper layer (see code example below for clarification). It turns out that now the config has grown to big (with over 50 parameters in the sub-config), leading to a simple_parsing.conflicts.ConflictResolutionError although there is no real conflict present.
To Reproduce
import dataclasses
from simple_parsing import ArgumentParser, DashVariant, NestedMode
SubConfig = dataclasses.make_dataclass(
'SubConfig',
fields=[
(arg, int, dataclasses.field(default=1))
for arg in list('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ')
]
)
@dataclasses.dataclass
class MainConfig:
config_1: SubConfig
config_2: SubConfig
if __name__ == "__main__":
# parse commandline and load default config-file
parser = ArgumentParser(
add_option_string_dash_variants=DashVariant.DASH,
nested_mode=NestedMode.WITHOUT_ROOT,
)
parser.add_arguments(MainConfig, "args")
parsed_args = parser.parse_args()
config: MainConfig = parsed_args.args
print(config)
Expected behavior
Print out the config aka MainConfig(config_1=SubConfig(a=1, b=1, c=1, d=1, e=1, ..., Z=1).
Actual behavior
Raises simple_parsing.conflicts.ConflictResolutionError.
Desktop (please complete the following information):
Version 0.1.5
Python version: 3.10
The text was updated successfully, but these errors were encountered:
Describe the bug
Making usage of this neat package, we created a configuration-structure kind of big. It has several layers of sub-configs and one config in particular is used repeatedly within an upper layer (see code example below for clarification). It turns out that now the config has grown to big (with over 50 parameters in the sub-config), leading to a
simple_parsing.conflicts.ConflictResolutionError
although there is no real conflict present.To Reproduce
Expected behavior
Print out the config aka
MainConfig(config_1=SubConfig(a=1, b=1, c=1, d=1, e=1, ..., Z=1)
.Actual behavior
Raises
simple_parsing.conflicts.ConflictResolutionError
.Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: