def sample_get_model(): # Create a client client = aiplatform_v1.ModelServiceClient() # Initialize request argument(s) request = aiplatform_v1.GetModelRequest(name="name_value", ) # Make the request response = client.get_model(request=request) # Handle the response print(response)
def sample_list_models(): # Create a client client = aiplatform_v1.ModelServiceClient() # Initialize request argument(s) request = aiplatform_v1.ListModelsRequest(parent="parent_value", ) # Make the request page_result = client.list_models(request=request) # Handle the response for response in page_result: print(response)
def sample_import_model_evaluation(): # Create a client client = aiplatform_v1.ModelServiceClient() # Initialize request argument(s) request = aiplatform_v1.ImportModelEvaluationRequest( parent="parent_value", ) # Make the request response = client.import_model_evaluation(request=request) # Handle the response print(response)
def sample_update_model(): # Create a client client = aiplatform_v1.ModelServiceClient() # Initialize request argument(s) model = aiplatform_v1.Model() model.display_name = "display_name_value" request = aiplatform_v1.UpdateModelRequest(model=model, ) # Make the request response = client.update_model(request=request) # Handle the response print(response)
def sample_export_model(): # Create a client client = aiplatform_v1.ModelServiceClient() # 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 = operation.result() # Handle the response print(response)
def sample_upload_model(): # Create a client client = aiplatform_v1.ModelServiceClient() # 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 = operation.result() # Handle the response print(response)