Skip to content

Commit 5e53881

Browse files
authored
Fix an issue with storing sub-configs. (#2566)
Fix #2469
1 parent d423ad7 commit 5e53881

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

metaflow/user_configs/config_parameters.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,9 @@ def _to_dict(cls, obj: Any) -> Any:
271271
v = obj
272272
return v
273273

274+
def __reduce__(self):
275+
return (self.__class__, (self.to_dict(),))
276+
274277

275278
class DelayEvaluator(collections.abc.Mapping):
276279
"""
@@ -484,7 +487,6 @@ def __init__(
484487
parser: Optional[Union[str, Callable[[str], Dict[Any, Any]]]] = None,
485488
**kwargs: Dict[str, str]
486489
):
487-
488490
if default is not None and default_value is not None:
489491
raise MetaflowException(
490492
"For config '%s', you can only specify default or default_value, not both"

0 commit comments

Comments
 (0)