Join the SIG TFX-Addons community and help make TFX even better!

tfx.extensions.google_cloud_ai_platform.training_clients.CAIPJobClient

Class for interacting with CAIP CMLE job.

Inherits From: AbstractJobClient

Methods

create_client

View source

Creates the discovery job client.

Multiple job requests can be done in parallel if needed, by creating an instance of the class for each job.

create_training_args

View source

Get training args for runner._launch_aip_training.

The training args contain the inputs/outputs/exec_properties to the tfx.scripts.run_executor module.

Args
input_dict Passthrough input dict for tfx.components.Trainer.executor.
output_dict Passthrough input dict for tfx.components.Trainer.executor.
exec_properties Passthrough input dict for tfx.components.Trainer.executor.
executor_class_path class path for TFX core default trainer.
training_inputs Training input argument for AI Platform training job. 'pythonModule', 'pythonVersion' and 'runtimeVersion' will be inferred. For the full set of parameters, refer to https://cloud.google.com/ml-engine/reference/rest/v1/projects.jobs#TrainingInput
job_id Job ID for AI Platform Training job. If not supplied, system-determined unique ID is given. Refer to https://cloud.google.com/ml-engine/reference/rest/v1/projects.jobs#resource-job

Returns
A dict containing the training arguments

get_job_request

View source

Gets the job request for the long-running job.

launch_job

View source

Launches a long-running job.

Args
job_id The job ID of the AI Platform training job.
parent The project name in the form of 'projects/{project_id}'
training_input Training input argument for AI Platform training job. See https://cloud.google.com/ml-engine/reference/rest/v1/projects.jobs#TrainingInput for the detailed schema.
job_labels The dict of labels that will be attached to this job.