id
int64
0
190k
prompt
stringlengths
21
13.4M
docstring
stringlengths
1
12k
166,212
import collections import copy import os from typing import Any, Callable, Dict, List, Optional, Type, cast, MutableMapping from absl import logging from kfp import compiler from kfp import dsl from kfp import gcp from kubernetes import client as k8s_client from tfx import version from tfx.dsl.compiler import compiler ...
null
166,213
import argparse import copy import json import logging import os import sys import textwrap from typing import cast, Dict, List, Mapping, MutableMapping, Optional, Sequence, Tuple, Union from tfx import types from tfx.dsl.compiler import constants from tfx.orchestration import metadata from tfx.orchestration.kubeflow.p...
Registers an execution in MLMD.
166,214
import argparse import copy import json import logging import os import sys import textwrap from typing import cast, Dict, List, Mapping, MutableMapping, Optional, Sequence, Tuple, Union from tfx import types from tfx.dsl.compiler import constants from tfx.orchestration import metadata from tfx.orchestration.kubeflow.p...
Constructs a metadata connection config. Args: kubeflow_metadata_config: Configuration parameters to use for constructing a valid metadata connection config in a Kubeflow cluster. Returns: A Union of metadata_store_pb2.ConnectionConfig and metadata_store_pb2.MetadataStoreClientConfig object.
166,215
import argparse import copy import json import logging import os import sys import textwrap from typing import cast, Dict, List, Mapping, MutableMapping, Optional, Sequence, Tuple, Union from tfx import types from tfx.dsl.compiler import constants from tfx.orchestration import metadata from tfx.orchestration.kubeflow.p...
Render a Channel as markdown string with the following format. **Type**: input_channel.type_name **Artifact: artifact1** **Properties**: **key1**: value1 **key2**: value2 ...... Args: input_channel: the channel to be rendered. Returns: a md-formatted string representation of the channel.
166,216
import argparse import copy import json import logging import os import sys import textwrap from typing import cast, Dict, List, Mapping, MutableMapping, Optional, Sequence, Tuple, Union from tfx import types from tfx.dsl.compiler import constants from tfx.orchestration import metadata from tfx.orchestration.kubeflow.p...
Dump KFP UI metadata json file for visualization purpose. For general components we just render a simple Markdown file for exec_properties/inputs/outputs. If the file already exists and is a valid format(have a list of dictionaries in outputs key), we append the existing UI metadata items to our output json file. Args:...
166,217
import argparse import copy import json import logging import os import sys import textwrap from typing import cast, Dict, List, Mapping, MutableMapping, Optional, Sequence, Tuple, Union from tfx import types from tfx.dsl.compiler import constants from tfx.orchestration import metadata from tfx.orchestration.kubeflow.p...
Gets node of a certain node_id from a pipeline.
166,218
import argparse import copy import json import logging import os import sys import textwrap from typing import cast, Dict, List, Mapping, MutableMapping, Optional, Sequence, Tuple, Union from tfx import types from tfx.dsl.compiler import constants from tfx.orchestration import metadata from tfx.orchestration.kubeflow.p...
Resolve runtime parameters in the pipeline proto inplace.
166,219
import functools from typing import Any, Dict, List, Type from airflow import models from airflow.operators import python_operator from tfx.dsl.components.base import base_node from tfx.orchestration import data_types from tfx.orchestration import metadata from tfx.orchestration.config import base_component_config from...
Helper function to launch TFX component execution. This helper function will be called with Airflow env objects which contains run_id that we need to pass into TFX ComponentLauncher. Args: component: TFX BaseComponent instance. This instance holds all inputs and outputs placeholders as well as component properties. com...
166,220
from typing import Optional from absl import logging from tfx.proto.orchestration import local_deployment_config_pb2 from tfx.proto.orchestration import metadata_pb2 from tfx.proto.orchestration import pipeline_pb2 from google.protobuf import any_pb2 from google.protobuf import message def _to_local_deployment( inp...
Extracts the proto.Any pipeline.deployment_config to LocalDeploymentConfig.
166,221
from typing import Optional from absl import logging from tfx.proto.orchestration import local_deployment_config_pb2 from tfx.proto.orchestration import metadata_pb2 from tfx.proto.orchestration import pipeline_pb2 from google.protobuf import any_pb2 from google.protobuf import message def _unwrap_executable_spec( ...
null
166,222
from typing import Optional from absl import logging from tfx.proto.orchestration import local_deployment_config_pb2 from tfx.proto.orchestration import metadata_pb2 from tfx.proto.orchestration import pipeline_pb2 from google.protobuf import any_pb2 from google.protobuf import message def _unwrap_executable_spec( ...
null
166,223
from typing import Optional, Tuple, Type from tfx.dsl.components.base import base_component from tfx.orchestration.config import base_component_config from tfx.orchestration.config import pipeline_config from tfx.orchestration.launcher import base_component_launcher The provided code snippet includes necessary depende...
Find a launcher and component config to launch the component. The default lookup logic goes through the `supported_launcher_classes` in sequence for each config from the `default_component_configs`. User can override a single component setting by `component_config_overrides`. The method returns the first component conf...
166,224
from typing import Dict, Iterable, List, Mapping, Optional from tfx import types from tfx.proto.orchestration import execution_result_pb2 from tfx.proto.orchestration import pipeline_pb2 from tfx.types import artifact_utils from tfx.utils import json_utils from tfx.utils import proto_utils from google.protobuf import m...
Converts input/output artifact dict.
166,225
from typing import Dict, Iterable, List, Mapping, Optional from tfx import types from tfx.proto.orchestration import execution_result_pb2 from tfx.proto.orchestration import pipeline_pb2 from tfx.types import artifact_utils from tfx.utils import json_utils from tfx.utils import proto_utils from google.protobuf import m...
Converts MLMD value dict into plain value dict.
166,226
import copy import enum from typing import Any, Collection, Dict, Iterable, Iterator, List, Optional, Tuple, Union, cast import warnings from tfx.dsl.compiler import constants from tfx.dsl.components.base import base_node from tfx.dsl.components.base import executor_spec from tfx.dsl.context_managers import dsl_context...
null
166,227
import copy import enum from typing import Any, Collection, Dict, Iterable, Iterator, List, Optional, Tuple, Union, cast import warnings from tfx.dsl.compiler import constants from tfx.dsl.components.base import base_node from tfx.dsl.components.base import executor_spec from tfx.dsl.context_managers import dsl_context...
Enumerate component dependencies arising from data deps between them. Args: components: Components to consider. registry: DslContextRegistry to use for looking up conditional predicates. pipeline: Pipeline object if calling from the context of one. Yields: Pairs of the form (upstream_component, component). If a compone...
166,228
from typing import Any, Dict, List, Optional, Union import jinja2 from tfx import types from tfx.dsl.component.experimental import executor_specs from tfx.dsl.component.experimental import placeholders from tfx.dsl.components.base import executor_spec def _render_items(items: List[str], context: Dict[str, Any]) -> List...
Resolves Jinja2 template languages from an executor container spec. Args: container_spec_tmpl: the container spec template to be resolved. input_dict: Dictionary of input artifacts consumed by this component. output_dict: Dictionary of output artifacts produced by this component. exec_properties: Dictionary of executio...
166,229
from typing import Any, Dict, List, Optional, Union import jinja2 from tfx import types from tfx.dsl.component.experimental import executor_specs from tfx.dsl.component.experimental import placeholders from tfx.dsl.components.base import executor_spec The provided code snippet includes necessary dependencies for imple...
Converts a config object to a swagger API dict. This utility method recursively converts swagger code generated configs into a valid swagger dictionary. This method is trying to workaround a bug (https://github.com/swagger-api/swagger-codegen/issues/8948) from swagger generated code Args: config: The config object. It ...
166,230
from collections.abc import Container, MutableSequence, Sequence import inspect from typing import Any, Callable, TypeVar, get_args, get_origin, Optional from tfx.dsl.component.experimental import json_compat from tfx.orchestration.portable import data_types from tfx.types import artifact from tfx.types import standard...
null
166,231
from collections.abc import Container, MutableSequence, Sequence import inspect from typing import Any, Callable, TypeVar, get_args, get_origin, Optional from tfx.dsl.component.experimental import json_compat from tfx.orchestration.portable import data_types from tfx.types import artifact from tfx.types import standard...
Transforms raw list[Artifact] to target type_hint with type checking.
166,232
from typing import Mapping, Optional, Sequence import uuid from tfx import types from tfx.orchestration import data_types_utils from tfx.orchestration import metadata from tfx.orchestration.portable import merge_utils from tfx.orchestration.portable.mlmd import execution_lib from tfx.proto.orchestration import executio...
Marks an existing execution as using cached outputs from a previous execution. Args: metadata_handle: A handler to access MLMD. contexts: MLMD contexts to associated with the execution. executions: Executions that will be published as CACHED executions. output_artifacts_maps: A list of output artifacts of the execution...
166,233
from typing import Mapping, Optional, Sequence import uuid from tfx import types from tfx.orchestration import data_types_utils from tfx.orchestration import metadata from tfx.orchestration.portable import merge_utils from tfx.orchestration.portable.mlmd import execution_lib from tfx.proto.orchestration import executio...
Marks an existing execution as failed. Args: metadata_handle: A handler to access MLMD. contexts: MLMD contexts to associated with the execution. execution_id: The id of the execution. executor_output: The output of executor.
166,234
import sys import traceback from typing import Any, Dict, List, Mapping, Optional, Type, TypeVar from absl import logging import attr import grpc import portpicker from tfx import types from tfx.dsl.compiler import placeholder_utils from tfx.dsl.io import fileio from tfx.orchestration import data_types_utils from tfx.o...
Registers an execution in MLMD.
166,235
import collections import copy import hashlib from typing import Any, Dict, List, Mapping, Optional, Sequence from tfx import types from tfx.dsl.io import fileio from tfx.orchestration import metadata from tfx.orchestration.portable.mlmd import context_lib from tfx.orchestration.portable.mlmd import execution_lib from ...
Gets cache context for a potential node execution. The cache key is generated by applying SHA-256 hashing function on: - Serialized pipeline info. - Serialized node_info of the PipelineNode. - Serialized executor spec - Serialized input artifacts if any. - Serialized output artifacts if any. The uri was removed during ...
166,236
import collections import copy import hashlib from typing import Any, Dict, List, Mapping, Optional, Sequence from tfx import types from tfx.dsl.io import fileio from tfx.orchestration import metadata from tfx.orchestration.portable.mlmd import context_lib from tfx.orchestration.portable.mlmd import execution_lib from ...
Tries to get the cached output artifacts given a cache context. Args: metadata_handle: A handler to access MLMD store. cache_context: The context representing the cache key. Returns: The cached output artifacts in a dict format. None if no qualified cache result is found.
166,237
import copy import sys from typing import Optional, cast from tfx.dsl.components.base import base_executor from tfx.dsl.io import fileio from tfx.orchestration.portable import base_executor_operator from tfx.orchestration.portable import data_types from tfx.orchestration.portable import outputs_utils from tfx.proto.orc...
Invokes executors given an executor instance and input from the Launcher. Args: execution_info: A wrapper of the details of this execution. executor: An executor instance. Returns: The output from executor.
166,238
import collections import contextlib from typing import Dict, List, Optional, Sequence, Tuple, TypeVar from tfx import types from ml_metadata.proto import metadata_store_pb2 _VALID_OUTPUT_EVENT_TYPES = frozenset([ metadata_store_pb2.Event.OUTPUT, metadata_store_pb2.Event.INTERNAL_OUTPUT, metadata_store_pb2.Even...
Reconstructs input and output artifact maps from events.
166,239
import collections import contextlib from typing import Dict, List, Optional, Sequence, Tuple, TypeVar from tfx import types from ml_metadata.proto import metadata_store_pb2 The provided code snippet includes necessary dependencies for implementing the `is_pending_output_event` function. Write a Python function `def i...
Returns true if the event represents a pending (not finalized) output.
166,240
from __future__ import annotations import collections import copy import itertools import re from typing import Any, Dict, Iterable, List, Mapping, Optional, Sequence, Tuple from absl import logging from tfx import types from tfx.orchestration import data_types_utils from tfx.orchestration import metadata from tfx.orch...
null
166,241
from __future__ import annotations import collections import copy import itertools import re from typing import Any, Dict, Iterable, List, Mapping, Optional, Sequence, Tuple from absl import logging from tfx import types from tfx.orchestration import data_types_utils from tfx.orchestration import metadata from tfx.orch...
Registers REFERENCE and PENDING output artifacts with the execution. Artifacts in output_artifacts not in state REFERENCE will be given state PENDING. Artifacts in state REFERENCE will keep their state. Each output artifact will be linked to the execution with a PENDING_OUTPUT event. The artifacts will be modified in-p...
166,242
from __future__ import annotations import collections import copy import itertools import re from typing import Any, Dict, Iterable, List, Mapping, Optional, Sequence, Tuple from absl import logging from tfx import types from tfx.orchestration import data_types_utils from tfx.orchestration import metadata from tfx.orch...
Returns executions that are associated with all given contexts. Args: metadata_handle: A handler to access MLMD. contexts: MLMD contexts for which to fetch associated executions. Returns: A list of executions associated with all given contexts.
166,243
import collections import itertools from typing import Callable, Mapping, Optional, Sequence, Union from tfx.dsl.compiler import compiler_utils from tfx.dsl.compiler import constants from tfx.orchestration.experimental.core import constants as orchestration_constants from tfx.orchestration.portable.mlmd import event_li...
null
166,244
import collections import itertools from typing import Callable, Mapping, Optional, Sequence, Union from tfx.dsl.compiler import compiler_utils from tfx.dsl.compiler import constants from tfx.orchestration.experimental.core import constants as orchestration_constants from tfx.orchestration.portable.mlmd import event_li...
Gets LIVE output artifacts of the given node. The function query is composed of 3 MLMD API calls: 1. Call get_artifacts() to get LIVE artifacts attributed to the given node. 2. Call get_executions() to get executions that created artifacts from step 1. 3. Call get_events_by_execution_ids() and filter artifacts on wheth...
166,245
from typing import Any, Dict, List, cast from absl import logging from tfx import types from tfx.dsl.components.common import importer from tfx.orchestration import data_types_utils from tfx.orchestration import metadata from tfx.orchestration.portable import data_types from tfx.orchestration.portable import execution_...
null
166,246
import abc from typing import Any, Optional from tfx.dsl.compiler import compiler from tfx.dsl.components.base import base_component from tfx.orchestration import pipeline as pipeline_py from tfx.proto.orchestration import pipeline_pb2 from tfx.utils import doc_controls The provided code snippet includes necessary dep...
Resolve pip dependencies and compile Pipeline object.
166,247
import abc from typing import Any, Optional from tfx.dsl.compiler import compiler from tfx.dsl.components.base import base_component from tfx.orchestration import pipeline as pipeline_py from tfx.proto.orchestration import pipeline_pb2 from tfx.utils import doc_controls The provided code snippet includes necessary dep...
Converts a RunOptions dataclass to proto.
166,248
from typing import Dict, Sequence, Union from absl import logging from tfx import types from tfx.dsl.compiler import placeholder_utils from tfx.orchestration import mlmd_connection_manager as mlmd_cm from tfx.orchestration.portable.input_resolution import exceptions from tfx.orchestration.portable.input_resolution impo...
Resolves parameters given parameter spec. Args: node_parameters: The spec to get parameters. Returns: A Dict of parameters. Raises: RuntimeError: When there is at least one parameter still in runtime parameter form.
166,249
import collections import copy import datetime import os from typing import Any, Dict, List, Mapping, Optional, Sequence, Union import uuid from absl import logging from tfx import types from tfx import version from tfx.dsl.io import fileio from tfx.orchestration import data_types_utils from tfx.orchestration import no...
Remove dirs of output artifacts' URI.
166,250
import collections import copy import datetime import os from typing import Any, Dict, List, Mapping, Optional, Sequence, Union import uuid from absl import logging from tfx import types from tfx import version from tfx.dsl.io import fileio from tfx.orchestration import data_types_utils from tfx.orchestration import no...
Remove stateful_working_dir.
166,251
import collections import copy import datetime import os from typing import Any, Dict, List, Mapping, Optional, Sequence, Union import uuid from absl import logging from tfx import types from tfx import version from tfx.dsl.io import fileio from tfx.orchestration import data_types_utils from tfx.orchestration import no...
Copies files from stateful working dir to executor output dir. Will not overwrite any files already existing in the executor output dir. Args: execution_info: Information for the execution that should have its files migrated. files: The relative file paths to be migrated.
166,252
import collections import copy import datetime import os from typing import Any, Dict, List, Mapping, Optional, Sequence, Union import uuid from absl import logging from tfx import types from tfx import version from tfx.dsl.io import fileio from tfx.orchestration import data_types_utils from tfx.orchestration import no...
Generates a root directory to hold orchestrator generated BCLs for the given node. Args: pipeline_runtime_spec: pipeline runtime specifications. node_id: unique id of the node within the pipeline. Returns: Path to orchestrator generated bcl root dir, which has the format `<node_dir>/.system/orchestrator_generated_bcl`
166,253
from concurrent import futures from typing import Optional from absl import logging import grpc from tfx.orchestration import metadata from tfx.proto.orchestration import execution_watcher_pb2 from tfx.proto.orchestration import execution_watcher_pb2_grpc from ml_metadata.proto import metadata_store_pb2 The provided c...
Generates a gRPC service stub for a given server address.
166,254
import threading from tfx.orchestration import data_types_utils from tfx.orchestration import metadata from tfx.orchestration.experimental.centralized_kubernetes_orchestrator import kubernetes_job_runner from tfx.orchestration.experimental.core import task as task_lib from tfx.orchestration.experimental.core import tas...
Creates an ExecutionInvocation proto with some initial info.
166,255
import threading from tfx.orchestration import data_types_utils from tfx.orchestration import metadata from tfx.orchestration.experimental.centralized_kubernetes_orchestrator import kubernetes_job_runner from tfx.orchestration.experimental.core import task as task_lib from tfx.orchestration.experimental.core import tas...
Gets corresponding pipeline node from IR given the node_id.
166,256
from concurrent import futures import contextlib import time from absl import app from absl import flags from absl import logging import grpc from tfx.orchestration import metadata from tfx.orchestration.experimental.centralized_kubernetes_orchestrator import kubernetes_task_scheduler from tfx.orchestration.experimenta...
Runs the main orchestration loop.
166,257
from concurrent import futures import contextlib import time from absl import app from absl import flags from absl import logging import grpc from tfx.orchestration import metadata from tfx.orchestration.experimental.centralized_kubernetes_orchestrator import kubernetes_task_scheduler from tfx.orchestration.experimenta...
Registers task schedulers.
166,258
from absl import app from absl import flags from absl import logging from tfx import v1 as tfx from tfx.orchestration.experimental.centralized_kubernetes_orchestrator import kubernetes_job_runner from tfx.orchestration.portable import data_types from tfx.proto.orchestration import pipeline_pb2 from google.protobuf impo...
Prepare sample ImportSchemaGen execution info.
166,259
from absl import app from absl import flags from absl import logging from tfx import v1 as tfx from tfx.orchestration.experimental.centralized_kubernetes_orchestrator import kubernetes_job_runner from tfx.orchestration.portable import data_types from tfx.proto.orchestration import pipeline_pb2 from google.protobuf impo...
Prepare sample ImportSchemaGen executable spec.
166,260
from absl import app from absl import flags import grpc from tfx.orchestration.experimental.centralized_kubernetes_orchestrator.service.proto import service_pb2 from tfx.orchestration.experimental.centralized_kubernetes_orchestrator.service.proto import service_pb2_grpc The provided code snippet includes necessary dep...
Echoes user's message.
166,261
import abc import datetime import random import string import time from absl import logging from kubernetes import client as k8s_client from tfx.orchestration.experimental.core import task_scheduler from tfx.orchestration.python_execution_binary import python_execution_binary_utils from tfx.utils import kube_utils from...
null
166,262
import absl from tfx.orchestration import pipeline as pipeline_module from tfx.orchestration.experimental.kubernetes import kubernetes_dag_runner from tfx.orchestration.test_pipelines.download_grep_print_pipeline import create_pipeline_component_instances _pipeline_name = 'download_grep_print_pipeline' _pipeline_root =...
Create sample container component pipeline.
166,263
import os from typing import List import absl import tensorflow_model_analysis as tfma from tfx.components import CsvExampleGen from tfx.components import Evaluator from tfx.components import ExampleValidator from tfx.components import Pusher from tfx.components import SchemaGen from tfx.components import StatisticsGen...
Implements the chicago taxi pipeline with TFX.
166,264
import datetime import json from typing import List, Optional, Type from absl import logging from tfx.dsl.component.experimental import container_component from tfx.dsl.components.base import base_node from tfx.orchestration import data_types from tfx.orchestration import metadata from tfx.orchestration import pipeline...
Use the kubernetes component launcher to launch the component. Args: component: Container component to be executed. component_launcher_class: The class of the launcher to launch the component. component_config: component config to launch the component. pipeline: Logical pipeline that contains pipeline related informati...
166,265
import datetime import json import time from typing import Dict, List from absl import logging from kubernetes import client from tfx.dsl.components.base import base_node from tfx.dsl.context_managers import dsl_context_registry from tfx.orchestration import pipeline as tfx_pipeline from tfx.orchestration.experimental....
Submits and runs a TFX pipeline from outside the cluster. Args: pipeline: Logical pipeline containing pipeline args and components. tfx_image: Container image URI for the TFX container. Raises: RuntimeError: When an error is encountered running the Kubernetes Job.
166,266
import datetime import json import time from typing import Dict, List from absl import logging from kubernetes import client from tfx.dsl.components.base import base_node from tfx.dsl.context_managers import dsl_context_registry from tfx.orchestration import pipeline as tfx_pipeline from tfx.orchestration.experimental....
Deserializes a TFX pipeline. To be replaced with the the TFX Intermediate Representation: tensorflow/community#271. This deserialization procedure reverses the serialization procedure and reconstructs the pipeline instance. Args: serialized_pipeline: Pipeline JSON string serialized with the procedure from _serialize_pi...
166,267
from __future__ import annotations from typing import Optional from absl import logging from tfx.dsl.io import fileio from tfx.orchestration import data_types_utils from tfx.orchestration import metadata from tfx.orchestration.experimental.core import component_generated_alert_pb2 from tfx.orchestration.experimental.co...
Publishes execution results to MLMD for task.
166,268
from __future__ import annotations from typing import Optional from absl import logging from tfx.dsl.io import fileio from tfx.orchestration import data_types_utils from tfx.orchestration import metadata from tfx.orchestration.experimental.core import component_generated_alert_pb2 from tfx.orchestration.experimental.co...
Publishes execution result to MLMD for single component run.
166,269
import collections import itertools import json import sys import textwrap from typing import Callable, Dict, Iterable, List, MutableMapping, Optional, Sequence, Type import uuid from absl import logging import attr from tfx import types from tfx.dsl.compiler import constants as context_constants from tfx.dsl.compiler ...
Returns a `ResolvedInfo` object for executing the node or `None` to skip. Args: mlmd_handle_like: An instance of mlmd handle which connect one MLMD DB, or a MLMDConnectionManager which manages connections to multiple MLMD DBs. node: The pipeline node for which to generate. pipeline: The pipeline proto from which the no...
166,270
import collections import itertools import json import sys import textwrap from typing import Callable, Dict, Iterable, List, MutableMapping, Optional, Sequence, Type import uuid from absl import logging import attr from tfx import types from tfx.dsl.compiler import constants as context_constants from tfx.dsl.compiler ...
Returns the num of failed executions. Only the executions that have the same external execution index as the failed execution will be counted. Args: executions: An iterable of executions. failed_execution: A failed execution whose execution index will be tested against to count the total number of failed execution.
166,271
import collections import itertools import json import sys import textwrap from typing import Callable, Dict, Iterable, List, MutableMapping, Optional, Sequence, Type import uuid from absl import logging import attr from tfx import types from tfx.dsl.compiler import constants as context_constants from tfx.dsl.compiler ...
Returns next active execution to run or `None` if no active executions exist. The active execution with lowest index will be returned. Args: executions: A list of executions Returns: An active execution or `None` if there is no active execution.
166,272
import collections import itertools import json import sys import textwrap from typing import Callable, Dict, Iterable, List, MutableMapping, Optional, Sequence, Type import uuid from absl import logging import attr from tfx import types from tfx.dsl.compiler import constants as context_constants from tfx.dsl.compiler ...
Registers a list of new executions from a list of failed/canceled executions.
166,273
import collections import itertools import json import sys import textwrap from typing import Callable, Dict, Iterable, List, MutableMapping, Optional, Sequence, Type import uuid from absl import logging import attr from tfx import types from tfx.dsl.compiler import constants as context_constants from tfx.dsl.compiler ...
Registers multiple executions in MLMD. Along with the execution: - the input artifacts will be linked to the executions. - the contexts will be linked to both the executions and its input artifacts. Args: metadata_handle: A handler to access MLMD. execution_type: The type of the execution. contexts: MLMD contexts to as...
166,274
import collections import itertools import json import sys import textwrap from typing import Callable, Dict, Iterable, List, MutableMapping, Optional, Sequence, Type import uuid from absl import logging import attr from tfx import types from tfx.dsl.compiler import constants as context_constants from tfx.dsl.compiler ...
Copies artifact types of external artifacts to local db. Args: local_mlmd_handle: A handle to access local MLMD db. artifacts: A list of artifacts. Returns: A list of updated artifacts
166,275
import collections import itertools import json import sys import textwrap from typing import Callable, Dict, Iterable, List, MutableMapping, Optional, Sequence, Type import uuid from absl import logging import attr from tfx import types from tfx.dsl.compiler import constants as context_constants from tfx.dsl.compiler ...
Get a list of unprocessed input from resolved_info. Args: metadata_handle: A handle to access local MLMD db. resolved_info: Resolved input of a node. It may contain processed and unprocessed input. node: The pipeline node of the input. Returns: A list of InputAndParam that have not been processed.
166,276
import collections import itertools import json import sys import textwrap from typing import Callable, Dict, Iterable, List, MutableMapping, Optional, Sequence, Type import uuid from absl import logging import attr from tfx import types from tfx.dsl.compiler import constants as context_constants from tfx.dsl.compiler ...
Interprets `Status` from given failed execution. Args: execution: An execution with last_known_state=FAILED. Returns: A `Status` object interpreted from the execution state. Raises: ValueError: If the given execution has `last_known_state` other than `FAILED`.
166,277
import collections import itertools import json import sys import textwrap from typing import Callable, Dict, Iterable, List, MutableMapping, Optional, Sequence, Type import uuid from absl import logging import attr from tfx import types from tfx.dsl.compiler import constants as context_constants from tfx.dsl.compiler ...
Generates tasks for node an execution. Args: metadata_handle: Handle to interact with MLMD. node: Node to tasks for. execution: Metadata execution to generate tasks for. input_and_param: Inputs and param for node execution. contexts: Contexts for node execution. pipeline: Pipeline for this execution. execution_node_sta...
166,278
import os import tempfile from typing import Optional, Callable from absl import app from absl import flags from tfx.dsl.compiler import constants from tfx.orchestration import metadata from tfx.orchestration.experimental.core import pipeline_ops from tfx.orchestration.experimental.core import pipeline_state as pstate ...
Returns a MetadataStore for performing MLMD API calls.
166,279
import os import tempfile from typing import Optional, Callable from absl import app from absl import flags from tfx.dsl.compiler import constants from tfx.orchestration import metadata from tfx.orchestration.experimental.core import pipeline_ops from tfx.orchestration.experimental.core import pipeline_state as pstate ...
null
166,280
import collections import contextlib import copy import dataclasses import datetime import functools import itertools import os import random import threading import time from typing import Callable, Dict, List, Mapping, Optional, Sequence from absl import logging import attr from tfx import types from tfx.dsl.io impor...
Decorator factory for pipeline ops.
166,281
import collections import contextlib import copy import dataclasses import datetime import functools import itertools import os import random import threading import time from typing import Callable, Dict, List, Mapping, Optional, Sequence from absl import logging import attr from tfx import types from tfx.dsl.io impor...
Stops a single pipeline. Convenience wrapper around stop_pipelines.
166,282
import collections import contextlib import copy import dataclasses import datetime import functools import itertools import os import random import threading import time from typing import Callable, Dict, List, Mapping, Optional, Sequence from absl import logging import attr from tfx import types from tfx.dsl.io impor...
Initiates a node start operation for a pipeline node. Args: mlmd_handle: A handle to the MLMD db. node_uid: Uid of the node to be started. Returns: The `PipelineState` object upon success. Raises: status_lib.StatusNotOkError: Failure to initiate node start operation.
166,283
import collections import contextlib import copy import dataclasses import datetime import functools import itertools import os import random import threading import time from typing import Callable, Dict, List, Mapping, Optional, Sequence from absl import logging import attr from tfx import types from tfx.dsl.io impor...
Initiates a node backfill operation for a pipeline node. Only works on ASYNC pipelines. Doesn't work on nodes within subpipelines. Args: mlmd_handle: A handle to the MLMD db. node_uid: Uid of the node to be backfilled. Returns: The `PipelineState` object upon success. Raises: status_lib.StatusNotOkError: Failure to ini...
166,284
import collections import contextlib import copy import dataclasses import datetime import functools import itertools import os import random import threading import time from typing import Callable, Dict, List, Mapping, Optional, Sequence from absl import logging import attr from tfx import types from tfx.dsl.io impor...
Stops a node. Initiates a node stop operation and waits for the node execution to become inactive. Args: mlmd_handle: A handle to the MLMD db. node_uid: Uid of the node to be stopped. timeout_secs: Amount of time in seconds to wait for node to stop. If `None`, waits indefinitely. Raises: status_lib.StatusNotOkError: Fa...
166,285
import collections import contextlib import copy import dataclasses import datetime import functools import itertools import os import random import threading import time from typing import Callable, Dict, List, Mapping, Optional, Sequence from absl import logging import attr from tfx import types from tfx.dsl.io impor...
Resumes a manual node. Args: mlmd_handle: A handle to the MLMD db. node_uid: Uid of the manual node to be resumed. Raises: status_lib.StatusNotOkError: Failure to resume a manual node.
166,286
import collections import contextlib import copy import dataclasses import datetime import functools import itertools import os import random import threading import time from typing import Callable, Dict, List, Mapping, Optional, Sequence from absl import logging import attr from tfx import types from tfx.dsl.io impor...
Deletes a pipeline run. Mark the pipeline run execution custom_priority['deleted'] to true and pipeline run output artifacts as DELETED. Args: mlmd_handle: A handle to the MLMD db. pipeline_id: id of the pipeline which has the pipeline run. pipeline_run_id: id of the pipeline run will be deleted. Raises: status_lib.Sta...
166,287
import collections import contextlib import copy import dataclasses import datetime import functools import itertools import os import random import threading import time from typing import Callable, Dict, List, Mapping, Optional, Sequence from absl import logging import attr from tfx import types from tfx.dsl.io impor...
Updates an active pipeline with a new pipeline IR. Initiates a pipeline update operation and waits for it to finish. Args: mlmd_handle: A handle to the MLMD db. pipeline: New pipeline IR to be applied. update_options: Selection of active nodes to be reloaded upon update. timeout_secs: Timeout in seconds to wait for the...
166,288
import collections import contextlib import copy import dataclasses import datetime import functools import itertools import os import random import threading import time from typing import Callable, Dict, List, Mapping, Optional, Sequence from absl import logging import attr from tfx import types from tfx.dsl.io impor...
Resumes a pipeline run from previously failed nodes. Upon success, MLMD is updated to signal that the pipeline must be started. Args: mlmd_handle: A handle to the MLMD db. pipeline: IR of the pipeline to resume. run_id: the run_id of the pipeline run to resume. Returns: The `PipelineState` object upon success. Raises: ...
166,289
import collections import contextlib import copy import dataclasses import datetime import functools import itertools import os import random import threading import time from typing import Callable, Dict, List, Mapping, Optional, Sequence from absl import logging import attr from tfx import types from tfx.dsl.io impor...
Revives a pipeline run from previously failed nodes. Args: mlmd_handle: A handle to the MLMD db. pipeline_id: The id (name) of the pipeline to resume. pipeline_run_id: the run_id of the pipeline run to resume. pipeline_to_update_with: Optionally an IR to update to for the revived run. Returns: The `PipelineState` objec...
166,290
import collections import contextlib import copy import dataclasses import datetime import functools import itertools import os import random import threading import time from typing import Callable, Dict, List, Mapping, Optional, Sequence from absl import logging import attr from tfx import types from tfx.dsl.io impor...
Returns filter_fn for orchestrate for the given pipeline_uid.
166,291
import collections import contextlib import copy import dataclasses import datetime import functools import itertools import os import random import threading import time from typing import Callable, Dict, List, Mapping, Optional, Sequence from absl import logging import attr from tfx import types from tfx.dsl.io impor...
Publishes an intermediate artifact. Args: mlmd_handle: A handle to the MLMD database. execution_id: The ID of the execution which generates the artifact. output_key: The output key of the artifact. properties: Properties of the artifact. custom_properties: Custom properties of the artifact. external_uri: The external U...
166,292
import base64 import contextlib import copy import dataclasses import functools import json import os import threading import time from typing import Any, Callable, Dict, Iterator, List, Mapping, Optional, Set, Tuple import uuid from absl import logging import attr from tfx import types from tfx.dsl.io import fileio fr...
null
166,293
import base64 import contextlib import copy import dataclasses import functools import json import os import threading import time from typing import Any, Callable, Dict, Iterator, List, Mapping, Optional, Set, Tuple import uuid from absl import logging import attr from tfx import types from tfx.dsl.io import fileio fr...
Records current time at the point of function call as state change time. This function may be called after any operation that changes pipeline state or node execution state that requires further processing in the next iteration of the orchestration loop. As an optimization, the orchestration loop can elide wait period ...
166,294
import base64 import contextlib import copy import dataclasses import functools import json import os import threading import time from typing import Any, Callable, Dict, Iterator, List, Mapping, Optional, Set, Tuple import uuid from absl import logging import attr from tfx import types from tfx.dsl.io import fileio fr...
null
166,295
import base64 import contextlib import copy import dataclasses import functools import json import os import threading import time from typing import Any, Callable, Dict, Iterator, List, Mapping, Optional, Set, Tuple import uuid from absl import logging import attr from tfx import types from tfx.dsl.io import fileio fr...
Returns all of the orchestrator contexts.
166,296
import base64 import contextlib import copy import dataclasses import functools import json import os import threading import time from typing import Any, Callable, Dict, Iterator, List, Mapping, Optional, Set, Tuple import uuid from absl import logging import attr from tfx import types from tfx.dsl.io import fileio fr...
Returns pipeline id from orchestrator reserved context.
166,297
import base64 import contextlib import copy import dataclasses import functools import json import os import threading import time from typing import Any, Callable, Dict, Iterator, List, Mapping, Optional, Set, Tuple import uuid from absl import logging import attr from tfx import types from tfx.dsl.io import fileio fr...
Returns `True` if the `node_uid` belongs to the given pipeline.
166,298
import base64 import contextlib import copy import dataclasses import functools import json import os import threading import time from typing import Any, Callable, Dict, Iterator, List, Mapping, Optional, Set, Tuple import uuid from absl import logging import attr from tfx import types from tfx.dsl.io import fileio fr...
null
166,299
import base64 import contextlib import copy import dataclasses import functools import json import os import threading import time from typing import Any, Callable, Dict, Iterator, List, Mapping, Optional, Set, Tuple import uuid from absl import logging import attr from tfx import types from tfx.dsl.io import fileio fr...
Returns the orchestrator context of a particular pipeline.
166,300
import base64 import contextlib import copy import dataclasses import functools import json import os import threading import time from typing import Any, Callable, Dict, Iterator, List, Mapping, Optional, Set, Tuple import uuid from absl import logging import attr from tfx import types from tfx.dsl.io import fileio fr...
null
166,301
import base64 import contextlib import copy import dataclasses import functools import json import os import threading import time from typing import Any, Callable, Dict, Iterator, List, Mapping, Optional, Set, Tuple import uuid from absl import logging import attr from tfx import types from tfx.dsl.io import fileio fr...
null
166,302
import base64 import contextlib import copy import dataclasses import functools import json import os import threading import time from typing import Any, Callable, Dict, Iterator, List, Mapping, Optional, Set, Tuple import uuid from absl import logging import attr from tfx import types from tfx.dsl.io import fileio fr...
null
166,303
import base64 import contextlib import copy import dataclasses import functools import json import os import threading import time from typing import Any, Callable, Dict, Iterator, List, Mapping, Optional, Set, Tuple import uuid from absl import logging import attr from tfx import types from tfx.dsl.io import fileio fr...
Records (previous) node states for nodes that are skipped in partial run.
166,304
import base64 import contextlib import copy import dataclasses import functools import json import os import threading import time from typing import Any, Callable, Dict, Iterator, List, Mapping, Optional, Set, Tuple import uuid from absl import logging import attr from tfx import types from tfx.dsl.io import fileio fr...
Returns pipeline execution mode given pipeline-level execution.
166,305
import base64 import contextlib import copy import dataclasses import functools import json import os import threading import time from typing import Any, Callable, Dict, Iterator, List, Mapping, Optional, Set, Tuple import uuid from absl import logging import attr from tfx import types from tfx.dsl.io import fileio fr...
null
166,306
import base64 import contextlib import copy import dataclasses import functools import json import os import threading import time from typing import Any, Callable, Dict, Iterator, List, Mapping, Optional, Set, Tuple import uuid from absl import logging import attr from tfx import types from tfx.dsl.io import fileio fr...
null
166,307
import base64 import contextlib import copy import dataclasses import functools import json import os import threading import time from typing import Any, Callable, Dict, Iterator, List, Mapping, Optional, Set, Tuple import uuid from absl import logging import attr from tfx import types from tfx.dsl.io import fileio fr...
null
166,308
import copy import threading from typing import Callable, Optional from absl import flags from absl import logging from tfx.orchestration import metadata from tfx.orchestration.experimental.core import pipeline_ops from tfx.orchestration.experimental.core import pipeline_state as pstate from tfx.orchestration.experimen...
Rewrites the subpipeline IR so that it can be run independently. Args: original_ir: Original subpipeline IR that is produced by compiler. execution_id: The ID of Subpipeline task scheduler Execution. It is used to generated a new pipeline run id. Returns: An updated subpipeline IR that can be run independently.
166,309
import collections import textwrap from typing import Callable, Dict, List, Mapping, Optional, Set from absl import logging from tfx.orchestration import node_proto_view from tfx.orchestration.experimental.core import mlmd_state from tfx.orchestration.experimental.core import pipeline_state as pstate from tfx.orchestra...
Returns the nodes that are marked as skipped in partial run or by user.
166,310
import collections import textwrap from typing import Callable, Dict, List, Mapping, Optional, Set from absl import logging from tfx.orchestration import node_proto_view from tfx.orchestration.experimental.core import mlmd_state from tfx.orchestration.experimental.core import pipeline_state as pstate from tfx.orchestra...
Returns pipeline nodes in topologically sorted layers.
166,311
import collections import textwrap from typing import Callable, Dict, List, Mapping, Optional, Set from absl import logging from tfx.orchestration import node_proto_view from tfx.orchestration.experimental.core import mlmd_state from tfx.orchestration.experimental.core import pipeline_state as pstate from tfx.orchestra...
Returns node_ids of all unrunnable descendant nodes for each member of the given failed_node_ids set.