![]() |
Class for interacting with CAIP CMLE job.
Inherits From: AbstractJobClient
tfx.extensions.google_cloud_ai_platform.training_clients.CAIPJobClient()
Methods
create_client
create_client() -> None
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
create_training_args(
input_dict: Dict[Text, List[types.Artifact]],
output_dict: Dict[Text, List[types.Artifact]],
exec_properties: Dict[Text, Any],
executor_class_path: Text,
training_inputs: Dict[Text, Any],
job_id: Optional[Text]
) -> Dict[Text, Any]
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
get_job_request() -> http.HttpRequest
Gets the job request for the long-running job.
launch_job
launch_job(
job_id: Text,
parent: Text,
training_input: Dict[Text, Any],
job_labels: Optional[Dict[Text, Text]] = None
) -> None
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. |