Skip to content

Commit c1fa8e6

Browse files
committed
Make changes to click API
1 parent 67dcc86 commit c1fa8e6

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

metaflow/runner/click_api.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,8 +532,16 @@ def _compute_flow_parameters(self):
532532
# We ignore any errors if we don't check the configs in the click API.
533533

534534
# Init all values in the flow mutators and then process them
535-
for decorator in self._flow_cls._flow_state.get(_FlowState.FLOW_MUTATORS, []):
536-
decorator.external_init()
535+
for mutator in self._flow_cls._flow_state.get(_FlowState.FLOW_MUTATORS, []):
536+
mutator.external_init()
537+
538+
# Initialize mutators with top-level options (using defaults for Deployer/Runner)
539+
for mutator in self._flow_cls._flow_state.get(_FlowState.FLOW_MUTATORS, []):
540+
mutator_options = {
541+
option: option_info["default"]
542+
for option, option_info in mutator.options.items()
543+
}
544+
mutator.flow_init_options(mutator_options)
537545

538546
new_cls = self._flow_cls._process_config_decorators(
539547
config_options, process_configs=CLICK_API_PROCESS_CONFIG

0 commit comments

Comments
 (0)