async def sample_get_model(): # Create a client client = aiplatform_v1.ModelServiceAsyncClient() # Initialize request argument(s) request = aiplatform_v1.GetModelRequest(name="name_value", ) # Make the request response = await client.get_model(request=request) # Handle the response print(response)
async def sample_list_models(): # Create a client client = aiplatform_v1.ModelServiceAsyncClient() # Initialize request argument(s) request = aiplatform_v1.ListModelsRequest(parent="parent_value", ) # Make the request page_result = client.list_models(request=request) # Handle the response async for response in page_result: print(response)
async def sample_import_model_evaluation(): # Create a client client = aiplatform_v1.ModelServiceAsyncClient() # Initialize request argument(s) request = aiplatform_v1.ImportModelEvaluationRequest( parent="parent_value", ) # Make the request response = await client.import_model_evaluation(request=request) # Handle the response print(response)
async def sample_update_model(): # Create a client client = aiplatform_v1.ModelServiceAsyncClient() # Initialize request argument(s) model = aiplatform_v1.Model() model.display_name = "display_name_value" request = aiplatform_v1.UpdateModelRequest(model=model, ) # Make the request response = await client.update_model(request=request) # Handle the response print(response)
async def sample_export_model(): # Create a client client = aiplatform_v1.ModelServiceAsyncClient() # Initialize request argument(s) request = aiplatform_v1.ExportModelRequest(name="name_value", ) # Make the request operation = client.export_model(request=request) print("Waiting for operation to complete...") response = await operation.result() # Handle the response print(response)
async def sample_upload_model(): # Create a client client = aiplatform_v1.ModelServiceAsyncClient() # Initialize request argument(s) model = aiplatform_v1.Model() model.display_name = "display_name_value" request = aiplatform_v1.UploadModelRequest( parent="parent_value", model=model, ) # Make the request operation = client.upload_model(request=request) print("Waiting for operation to complete...") response = await operation.result() # Handle the response print(response)