Пример #1
0
 def succeed(self):
   custom_driver_spec = (executable_spec_pb2.PythonClassExecutableSpec())
   custom_driver_spec.class_path = 'tfx.orchestration.portable.python_driver_operator._FakeNoopDriver'
   driver_operator = python_driver_operator.PythonDriverOperator(
       custom_driver_spec, None, None, None)
   driver_output = driver_operator.run_driver(None, None, None)
   self.assertEqual(driver_output, _DEFAULT_DRIVER_OUTPUT)
Пример #2
0
def _run_driver(
    executable_spec: executable_spec_pb2.PythonClassExecutableSpec,
    mlmd_connection_config: metadata.ConnectionConfigType,
    execution_info: data_types.ExecutionInfo
) -> driver_output_pb2.DriverOutput:
    operator = python_driver_operator.PythonDriverOperator(
        executable_spec, metadata.Metadata(mlmd_connection_config))
    return operator.run_driver(execution_info)