|View source on GitHub|
Custom driver for model validator.
Initialize self. See help(type(self)) for accurate signature.
pre_execution( input_dict, output_dict, exec_properties, driver_args, pipeline_info, component_info )
Handle pre-execution logic.
There are four steps:
- Fetches input artifacts from metadata and checks whether uri exists.
- Registers execution.
- Decides whether a new execution is needed. 4a. If (3), prepare output artifacts. 4b. If not (3), fetch cached output artifacts.
input_dict: key -> Channel for inputs.
output_dict: key -> Channel for outputs. Uris of the outputs are not assigned.
exec_properties: Dict of other execution properties.
driver_args: An instance of data_types.DriverArgs class.
pipeline_info: An instance of data_types.PipelineInfo, holding pipeline related properties including pipeline_name, pipeline_root and run_id
component_info: An instance of data_types.ComponentInfo, holding component related properties including component_type and component_id.
RuntimeError: if any input as an empty uri.
resolve_exec_properties( exec_properties, pipeline_info, component_info )
resolve_input_artifacts( input_dict, exec_properties, driver_args, pipeline_info )
Resolve input artifacts from metadata.
Subclasses might override this function for customized artifact properties resolution logic. However please note that this function is supposed to be called in normal cases (except head of the pipeline) since it handles artifact info passing from upstream components.
input_dict: key -> Channel mapping for inputs generated in logical pipeline.
exec_properties: Dict of other execution properties, e.g., configs.
driver_args: An instance of data_types.DriverArgs with driver configuration properties.
pipeline_info: An instance of data_types.PipelineInfo, holding pipeline related properties including component_type and component_id.
Final execution properties that will be used in execution.
RuntimeError: for Channels that do not contain any artifact. This will be reverted once we support Channel-based input resolution.
ValueError: if in interactive mode, the given input channels have not been resolved.
Verify that all artifacts have existing uri.
artifacts_dict: key -> types.Artifact for inputs.
RuntimeError: if any input as an empty or non-existing uri.