def pipeline(): model_upload_op = ModelUploadOp( project=self._project, display_name=self._display_name, serving_container_image_uri=self._serving_container_image_uri, artifact_uri=self._artifact_uri ) endpoint_create_op = EndpointCreateOp( project=self._project, display_name=self._display_name ) model_deploy_op = ModelDeployOp( project=self._project, model=model_upload_op.outputs["model"] ) batch_predict_op = ModelBatchPredictOp( project=self._project, model=model_upload_op.outputs["model"], job_display_name=self._display_name, gcs_source=self._gcs_source, gcs_destination_prefix=self._gcs_destination_prefix )
def pipeline(): model_upload_op = ModelUploadOp( project=self._project, display_name=self._display_name, serving_container_image_uri=self._serving_container_image_uri, artifact_uri=self._artifact_uri) create_endpoint_op = EndpointCreateOp( project=self._project, location=self._location, display_name=self._display_name) model_deploy_op = ModelDeployOp( model=model_upload_op.outputs["model"], endpoint=create_endpoint_op.outputs["endpoint"], deployed_model_display_name="deployed_model_display_name", traffic_split={}, dedicated_resources_machine_type="n1-standard-4", dedicated_resources_min_replica_count=1, dedicated_resources_max_replica_count=2, dedicated_resources_accelerator_type="fake-accelerator", dedicated_resources_accelerator_count=1, automatic_resources_min_replica_count=1, automatic_resources_max_replica_count=2, service_account="fake-sa", explanation_metadata={"xai_m": "bar"}, explanation_parameters={"xai_p": "foo"}, ) _ = ModelUndeployOp( model=model_upload_op.outputs["model"], endpoint=create_endpoint_op.outputs["endpoint"], ).after(model_deploy_op)
def pipeline(): model_upload_op = ModelUploadOp( project=self._project, location=self._location, display_name=self._display_name, description="some description", serving_container_image_uri=self._serving_container_image_uri, serving_container_command=["command1", "command2"], serving_container_args=["arg1", "arg2"], serving_container_environment_variables=["env1", "env2"], serving_container_ports=["123", "456"], serving_container_predict_route= "some serving_container_predict_route", serving_container_health_route= "some serving_container_health_route", instance_schema_uri="some instance_schema_uri", parameters_schema_uri="some parameters_schema_uri", prediction_schema_uri="some prediction_schema_uri", artifact_uri="some artifact_uri", explanation_metadata={"xai_m": "bar"}, explanation_parameters={"xai_p": "foo"}, encryption_spec_key_name="some encryption_spec_key_name", labels={"foo": "bar"}) _ = ModelDeleteOp(model=model_upload_op.outputs["model"], )
def pipeline(): model_upload_op = ModelUploadOp( project=self._project, display_name=self._display_name, serving_container_image_uri=self._serving_container_image_uri, artifact_uri=self._artifact_uri) batch_predict_op = ModelBatchPredictOp( project=self._project, location=self._location, job_display_name=self._display_name, model=model_upload_op.outputs["model"], instances_format="instance_format", gcs_source_uris=[self._gcs_source], bigquery_source_input_uri="bigquery_source_input_uri", model_parameters={"foo": "bar"}, predictions_format="predictions_format", gcs_destination_output_uri_prefix=self._gcs_destination_prefix, bigquery_destination_output_uri= "bigquery_destination_output_uri", machine_type="machine_type", accelerator_type="accelerator_type", accelerator_count=1, starting_replica_count=2, max_replica_count=3, manual_batch_tuning_parameters_batch_size=4, generate_explanation=True, explanation_metadata={"xai_m": "bar"}, explanation_parameters={"xai_p": "foo"}, encryption_spec_key_name="some encryption_spec_key_name", labels={"foo": "bar"})
def pipeline(): model_upload_op = ModelUploadOp( project=self._project, display_name=self._display_name, serving_container_image_uri=self._serving_container_image_uri, artifact_uri=self._artifact_uri) model_export_op = ModelExportOp( model=model_upload_op.outputs["model"], export_format_id="export_format", artifact_destination="artifact_destination", image_destination="image_destination")