Beispiel #1
0
def sample_get_dataset():
    # Create a client
    client = aiplatform_v1beta1.DatasetServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1beta1.GetDatasetRequest(name="name_value", )

    # Make the request
    response = client.get_dataset(request=request)

    # Handle the response
    print(response)
def sample_list_data_items():
    # Create a client
    client = aiplatform_v1beta1.DatasetServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1beta1.ListDataItemsRequest(parent="parent_value", )

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

    # Handle the response
    for response in page_result:
        print(response)
Beispiel #3
0
def sample_delete_dataset():
    # Create a client
    client = aiplatform_v1beta1.DatasetServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1beta1.DeleteDatasetRequest(name="name_value", )

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

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

    response = operation.result()

    # Handle the response
    print(response)
def sample_update_dataset():
    # Create a client
    client = aiplatform_v1beta1.DatasetServiceClient()

    # Initialize request argument(s)
    dataset = aiplatform_v1beta1.Dataset()
    dataset.display_name = "display_name_value"
    dataset.metadata_schema_uri = "metadata_schema_uri_value"
    dataset.metadata.null_value = "NULL_VALUE"

    request = aiplatform_v1beta1.UpdateDatasetRequest(dataset=dataset, )

    # Make the request
    response = client.update_dataset(request=request)

    # Handle the response
    print(response)
def sample_export_data():
    # Create a client
    client = aiplatform_v1beta1.DatasetServiceClient()

    # Initialize request argument(s)
    export_config = aiplatform_v1beta1.ExportDataConfig()
    export_config.gcs_destination.output_uri_prefix = "output_uri_prefix_value"

    request = aiplatform_v1beta1.ExportDataRequest(
        name="name_value",
        export_config=export_config,
    )

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

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

    response = operation.result()

    # Handle the response
    print(response)
Beispiel #6
0
def sample_import_data():
    # Create a client
    client = aiplatform_v1beta1.DatasetServiceClient()

    # Initialize request argument(s)
    import_configs = aiplatform_v1beta1.ImportDataConfig()
    import_configs.gcs_source.uris = ['uris_value_1', 'uris_value_2']
    import_configs.import_schema_uri = "import_schema_uri_value"

    request = aiplatform_v1beta1.ImportDataRequest(
        name="name_value",
        import_configs=import_configs,
    )

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

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

    response = operation.result()

    # Handle the response
    print(response)
Beispiel #7
0
def sample_create_dataset():
    # Create a client
    client = aiplatform_v1beta1.DatasetServiceClient()

    # Initialize request argument(s)
    dataset = aiplatform_v1beta1.Dataset()
    dataset.display_name = "display_name_value"
    dataset.metadata_schema_uri = "metadata_schema_uri_value"
    dataset.metadata.null_value = "NULL_VALUE"

    request = aiplatform_v1beta1.CreateDatasetRequest(
        parent="parent_value",
        dataset=dataset,
    )

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

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

    response = operation.result()

    # Handle the response
    print(response)