![]() |
A specification of a container.
Inherits From: ExecutorSpec
tfx.dsl.components.base.executor_spec.ExecutorContainerSpec(
image: Text,
command: List[Text] = None,
args: List[Text] = None
)
The spec includes image, command line entrypoint and arguments for a container. For example:
spec = ExecutorContainerSpec( image='docker/whalesay', command=['cowsay'], args=['hello wolrd'])
Attributes | |
---|---|
image
|
Container image that has executor application. Assumption is that this container image is separately release-managed, and tagged/versioned accordingly. |
command
|
Container entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. The Jinja templating mechanism is used for constructing a user-specified command-line invocation based on input and output metadata at runtime. |
args
|
Arguments to the container entrypoint. The docker image's CMD is used if this is not provided. The Jinja templating mechanism is used for constructing a user-specified command-line invocation based on input and output metadata at runtime. |
Methods
copy
copy() -> "ExecutorSpec"
Makes a copy of the ExecutorSpec.
An abstract method to implement to make a copy of the ExecutorSpec instance. Deepcopy is preferred in the implementation. But if for any reason a deepcopy is not able to be made because of some fields are not deepcopyable, it is OK to make a shallow copy as long as the subfield is consider globally immutable.
Returns | |
---|---|
A copy of ExecutorSpec. |
encode
encode(
component_spec: Optional[tfx.types.ComponentSpec
] = None
) -> message.Message
Encodes ExecutorSpec into an IR proto for compiling.
This method will be used by DSL compiler to generate the corresponding IR.
Args | |
---|---|
component_spec
|
Optional. The ComponentSpec to help with the encoding. |
Returns | |
---|---|
An executor spec proto. |
from_json_dict
@classmethod
from_json_dict( dict_data: Dict[Text, Any] ) -> Any
Convert from dictionary data to an object.
to_json_dict
to_json_dict() -> Dict[Text, Any]
Convert from an object to a JSON serializable dictionary.