コード例 #1
0
async def sample_cancel_training_pipeline():
    # Create a client
    client = aiplatform_v1.PipelineServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.CancelTrainingPipelineRequest(name="name_value", )

    # Make the request
    await client.cancel_training_pipeline(request=request)
async def sample_get_pipeline_job():
    # Create a client
    client = aiplatform_v1.PipelineServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.GetPipelineJobRequest(name="name_value", )

    # Make the request
    response = await client.get_pipeline_job(request=request)

    # Handle the response
    print(response)
async def sample_create_pipeline_job():
    # Create a client
    client = aiplatform_v1.PipelineServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.CreatePipelineJobRequest(parent="parent_value", )

    # Make the request
    response = await client.create_pipeline_job(request=request)

    # Handle the response
    print(response)
async def sample_list_pipeline_jobs():
    # Create a client
    client = aiplatform_v1.PipelineServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.ListPipelineJobsRequest(parent="parent_value", )

    # Make the request
    page_result = client.list_pipeline_jobs(request=request)

    # Handle the response
    async for response in page_result:
        print(response)
async def sample_delete_training_pipeline():
    # Create a client
    client = aiplatform_v1.PipelineServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.DeleteTrainingPipelineRequest(name="name_value", )

    # Make the request
    operation = client.delete_training_pipeline(request=request)

    print("Waiting for operation to complete...")

    response = await operation.result()

    # Handle the response
    print(response)
コード例 #6
0
async def sample_create_training_pipeline():
    # Create a client
    client = aiplatform_v1.PipelineServiceAsyncClient()

    # Initialize request argument(s)
    training_pipeline = aiplatform_v1.TrainingPipeline()
    training_pipeline.display_name = "display_name_value"
    training_pipeline.training_task_definition = "training_task_definition_value"
    training_pipeline.training_task_inputs.null_value = "NULL_VALUE"

    request = aiplatform_v1.CreateTrainingPipelineRequest(
        parent="parent_value",
        training_pipeline=training_pipeline,
    )

    # Make the request
    response = await client.create_training_pipeline(request=request)

    # Handle the response
    print(response)