Fix keep backwards compatibility for pipeline.add_step() positional arguments

This commit is contained in:
allegroai 2023-09-16 20:53:30 +03:00
parent 1b27ed07f7
commit 1820423b02

View File

@ -81,7 +81,6 @@ class PipelineController(object):
parents = attrib(type=list, default=None) # list of parent DAG steps parents = attrib(type=list, default=None) # list of parent DAG steps
timeout = attrib(type=float, default=None) # execution timeout limit timeout = attrib(type=float, default=None) # execution timeout limit
parameters = attrib(type=dict, default=None) # Task hyper-parameters to change parameters = attrib(type=dict, default=None) # Task hyper-parameters to change
recursively_parse_parameters = attrib(type=bool, default=False) # if True, recursively parse parameters in lists, dicts, or tuples
configurations = attrib(type=dict, default=None) # Task configuration objects to change configurations = attrib(type=dict, default=None) # Task configuration objects to change
task_overrides = attrib(type=dict, default=None) # Task overrides to change task_overrides = attrib(type=dict, default=None) # Task overrides to change
executed = attrib(type=str, default=None) # The actual executed Task ID (None if not executed yet) executed = attrib(type=str, default=None) # The actual executed Task ID (None if not executed yet)
@ -100,6 +99,8 @@ class PipelineController(object):
monitor_artifacts = attrib(type=list, default=None) # List of artifact names to monitor monitor_artifacts = attrib(type=list, default=None) # List of artifact names to monitor
monitor_models = attrib(type=list, default=None) # List of models to monitor monitor_models = attrib(type=list, default=None) # List of models to monitor
explicit_docker_image = attrib(type=str, default=None) # The Docker image the node uses, specified at creation explicit_docker_image = attrib(type=str, default=None) # The Docker image the node uses, specified at creation
recursively_parse_parameters = attrib(type=bool, default=False) # if True, recursively parse parameters in
# lists, dicts, or tuples
def __attrs_post_init__(self): def __attrs_post_init__(self):
if self.parents is None: if self.parents is None:
@ -369,7 +370,6 @@ class PipelineController(object):
base_task_id=None, # type: Optional[str] base_task_id=None, # type: Optional[str]
parents=None, # type: Optional[Sequence[str]] parents=None, # type: Optional[Sequence[str]]
parameter_override=None, # type: Optional[Mapping[str, Any]] parameter_override=None, # type: Optional[Mapping[str, Any]]
recursively_parse_parameters=False, # type: bool
configuration_overrides=None, # type: Optional[Mapping[str, Union[str, Mapping]]] configuration_overrides=None, # type: Optional[Mapping[str, Union[str, Mapping]]]
task_overrides=None, # type: Optional[Mapping[str, Any]] task_overrides=None, # type: Optional[Mapping[str, Any]]
execution_queue=None, # type: Optional[str] execution_queue=None, # type: Optional[str]
@ -386,7 +386,8 @@ class PipelineController(object):
cache_executed_step=False, # type: bool cache_executed_step=False, # type: bool
base_task_factory=None, # type: Optional[Callable[[PipelineController.Node], Task]] base_task_factory=None, # type: Optional[Callable[[PipelineController.Node], Task]]
retry_on_failure=None, # type: Optional[Union[int, Callable[[PipelineController, PipelineController.Node, int], bool]]] # noqa retry_on_failure=None, # type: Optional[Union[int, Callable[[PipelineController, PipelineController.Node, int], bool]]] # noqa
status_change_callback=None # type: Optional[Callable[[PipelineController, PipelineController.Node, str], None]] # noqa status_change_callback=None, # type: Optional[Callable[[PipelineController, PipelineController.Node, str], None]] # noqa
recursively_parse_parameters=False # type: bool
): ):
# type: (...) -> bool # type: (...) -> bool
""" """