Documentation ¶
Overview ¶
Package aiplatform is an auto-generated package for the Vertex AI API.
Train high-quality custom machine learning models with minimal machine learning expertise and effort.
Example usage ¶
To get started with this package, create a client.
ctx := context.Background() c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close()
The client will use your default application credentials. Clients should be reused instead of created as needed. The methods of Client are safe for concurrent use by multiple goroutines. The returned client must be Closed when it is done being used.
Using the Client ¶
The following is an example of making an API call with the newly created client.
ctx := context.Background() c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.CreateDatasetRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateDatasetRequest. } op, err := c.CreateDataset(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp
Use of Context ¶
The ctx passed to NewClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. Individual methods on the client use the ctx given to them.
To close the open connection, use the Close() method.
For information about setting deadlines, reusing contexts, and more please visit https://pkg.go.dev/cloud.google.com/go.
Index ¶
- func DefaultAuthScopes() []string
- type AnnotationIterator
- type BatchMigrateResourcesOperation
- func (op *BatchMigrateResourcesOperation) Done() bool
- func (op *BatchMigrateResourcesOperation) Metadata() (*aiplatformpb.BatchMigrateResourcesOperationMetadata, error)
- func (op *BatchMigrateResourcesOperation) Name() string
- func (op *BatchMigrateResourcesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.BatchMigrateResourcesResponse, error)
- func (op *BatchMigrateResourcesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.BatchMigrateResourcesResponse, error)
- type BatchPredictionJobIterator
- type CheckTrialEarlyStoppingStateOperation
- func (op *CheckTrialEarlyStoppingStateOperation) Done() bool
- func (op *CheckTrialEarlyStoppingStateOperation) Metadata() (*aiplatformpb.CheckTrialEarlyStoppingStateMetatdata, error)
- func (op *CheckTrialEarlyStoppingStateOperation) Name() string
- func (op *CheckTrialEarlyStoppingStateOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.CheckTrialEarlyStoppingStateResponse, error)
- func (op *CheckTrialEarlyStoppingStateOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.CheckTrialEarlyStoppingStateResponse, error)
- type CreateDatasetOperation
- func (op *CreateDatasetOperation) Done() bool
- func (op *CreateDatasetOperation) Metadata() (*aiplatformpb.CreateDatasetOperationMetadata, error)
- func (op *CreateDatasetOperation) Name() string
- func (op *CreateDatasetOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Dataset, error)
- func (op *CreateDatasetOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Dataset, error)
- type CreateEndpointOperation
- func (op *CreateEndpointOperation) Done() bool
- func (op *CreateEndpointOperation) Metadata() (*aiplatformpb.CreateEndpointOperationMetadata, error)
- func (op *CreateEndpointOperation) Name() string
- func (op *CreateEndpointOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Endpoint, error)
- func (op *CreateEndpointOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Endpoint, error)
- type CreateIndexEndpointOperation
- func (op *CreateIndexEndpointOperation) Done() bool
- func (op *CreateIndexEndpointOperation) Metadata() (*aiplatformpb.CreateIndexEndpointOperationMetadata, error)
- func (op *CreateIndexEndpointOperation) Name() string
- func (op *CreateIndexEndpointOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.IndexEndpoint, error)
- func (op *CreateIndexEndpointOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.IndexEndpoint, error)
- type CreateIndexOperation
- func (op *CreateIndexOperation) Done() bool
- func (op *CreateIndexOperation) Metadata() (*aiplatformpb.CreateIndexOperationMetadata, error)
- func (op *CreateIndexOperation) Name() string
- func (op *CreateIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Index, error)
- func (op *CreateIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Index, error)
- type CreateSpecialistPoolOperation
- func (op *CreateSpecialistPoolOperation) Done() bool
- func (op *CreateSpecialistPoolOperation) Metadata() (*aiplatformpb.CreateSpecialistPoolOperationMetadata, error)
- func (op *CreateSpecialistPoolOperation) Name() string
- func (op *CreateSpecialistPoolOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.SpecialistPool, error)
- func (op *CreateSpecialistPoolOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.SpecialistPool, error)
- type CustomJobIterator
- type DataItemIterator
- type DataLabelingJobIterator
- type DatasetCallOptions
- type DatasetClient
- func (c *DatasetClient) Close() error
- func (c *DatasetClient) Connection() *grpc.ClientConn
- func (c *DatasetClient) CreateDataset(ctx context.Context, req *aiplatformpb.CreateDatasetRequest, ...) (*CreateDatasetOperation, error)
- func (c *DatasetClient) CreateDatasetOperation(name string) *CreateDatasetOperation
- func (c *DatasetClient) DeleteDataset(ctx context.Context, req *aiplatformpb.DeleteDatasetRequest, ...) (*DeleteDatasetOperation, error)
- func (c *DatasetClient) DeleteDatasetOperation(name string) *DeleteDatasetOperation
- func (c *DatasetClient) ExportData(ctx context.Context, req *aiplatformpb.ExportDataRequest, ...) (*ExportDataOperation, error)
- func (c *DatasetClient) ExportDataOperation(name string) *ExportDataOperation
- func (c *DatasetClient) GetAnnotationSpec(ctx context.Context, req *aiplatformpb.GetAnnotationSpecRequest, ...) (*aiplatformpb.AnnotationSpec, error)
- func (c *DatasetClient) GetDataset(ctx context.Context, req *aiplatformpb.GetDatasetRequest, ...) (*aiplatformpb.Dataset, error)
- func (c *DatasetClient) ImportData(ctx context.Context, req *aiplatformpb.ImportDataRequest, ...) (*ImportDataOperation, error)
- func (c *DatasetClient) ImportDataOperation(name string) *ImportDataOperation
- func (c *DatasetClient) ListAnnotations(ctx context.Context, req *aiplatformpb.ListAnnotationsRequest, ...) *AnnotationIterator
- func (c *DatasetClient) ListDataItems(ctx context.Context, req *aiplatformpb.ListDataItemsRequest, ...) *DataItemIterator
- func (c *DatasetClient) ListDatasets(ctx context.Context, req *aiplatformpb.ListDatasetsRequest, ...) *DatasetIterator
- func (c *DatasetClient) UpdateDataset(ctx context.Context, req *aiplatformpb.UpdateDatasetRequest, ...) (*aiplatformpb.Dataset, error)
- type DatasetIterator
- type DeleteBatchPredictionJobOperation
- func (op *DeleteBatchPredictionJobOperation) Done() bool
- func (op *DeleteBatchPredictionJobOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error)
- func (op *DeleteBatchPredictionJobOperation) Name() string
- func (op *DeleteBatchPredictionJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteBatchPredictionJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteCustomJobOperation
- func (op *DeleteCustomJobOperation) Done() bool
- func (op *DeleteCustomJobOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error)
- func (op *DeleteCustomJobOperation) Name() string
- func (op *DeleteCustomJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteCustomJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteDataLabelingJobOperation
- func (op *DeleteDataLabelingJobOperation) Done() bool
- func (op *DeleteDataLabelingJobOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error)
- func (op *DeleteDataLabelingJobOperation) Name() string
- func (op *DeleteDataLabelingJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteDataLabelingJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteDatasetOperation
- func (op *DeleteDatasetOperation) Done() bool
- func (op *DeleteDatasetOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error)
- func (op *DeleteDatasetOperation) Name() string
- func (op *DeleteDatasetOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteDatasetOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteEndpointOperation
- func (op *DeleteEndpointOperation) Done() bool
- func (op *DeleteEndpointOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error)
- func (op *DeleteEndpointOperation) Name() string
- func (op *DeleteEndpointOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteEndpointOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteHyperparameterTuningJobOperation
- func (op *DeleteHyperparameterTuningJobOperation) Done() bool
- func (op *DeleteHyperparameterTuningJobOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error)
- func (op *DeleteHyperparameterTuningJobOperation) Name() string
- func (op *DeleteHyperparameterTuningJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteHyperparameterTuningJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteIndexEndpointOperation
- func (op *DeleteIndexEndpointOperation) Done() bool
- func (op *DeleteIndexEndpointOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error)
- func (op *DeleteIndexEndpointOperation) Name() string
- func (op *DeleteIndexEndpointOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteIndexEndpointOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteIndexOperation
- func (op *DeleteIndexOperation) Done() bool
- func (op *DeleteIndexOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error)
- func (op *DeleteIndexOperation) Name() string
- func (op *DeleteIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteModelDeploymentMonitoringJobOperation
- func (op *DeleteModelDeploymentMonitoringJobOperation) Done() bool
- func (op *DeleteModelDeploymentMonitoringJobOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error)
- func (op *DeleteModelDeploymentMonitoringJobOperation) Name() string
- func (op *DeleteModelDeploymentMonitoringJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteModelDeploymentMonitoringJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteModelOperation
- func (op *DeleteModelOperation) Done() bool
- func (op *DeleteModelOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error)
- func (op *DeleteModelOperation) Name() string
- func (op *DeleteModelOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteModelOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeletePipelineJobOperation
- func (op *DeletePipelineJobOperation) Done() bool
- func (op *DeletePipelineJobOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error)
- func (op *DeletePipelineJobOperation) Name() string
- func (op *DeletePipelineJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeletePipelineJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteSpecialistPoolOperation
- func (op *DeleteSpecialistPoolOperation) Done() bool
- func (op *DeleteSpecialistPoolOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error)
- func (op *DeleteSpecialistPoolOperation) Name() string
- func (op *DeleteSpecialistPoolOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteSpecialistPoolOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteTrainingPipelineOperation
- func (op *DeleteTrainingPipelineOperation) Done() bool
- func (op *DeleteTrainingPipelineOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error)
- func (op *DeleteTrainingPipelineOperation) Name() string
- func (op *DeleteTrainingPipelineOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteTrainingPipelineOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeployIndexOperation
- func (op *DeployIndexOperation) Done() bool
- func (op *DeployIndexOperation) Metadata() (*aiplatformpb.DeployIndexOperationMetadata, error)
- func (op *DeployIndexOperation) Name() string
- func (op *DeployIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.DeployIndexResponse, error)
- func (op *DeployIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.DeployIndexResponse, error)
- type DeployModelOperation
- func (op *DeployModelOperation) Done() bool
- func (op *DeployModelOperation) Metadata() (*aiplatformpb.DeployModelOperationMetadata, error)
- func (op *DeployModelOperation) Name() string
- func (op *DeployModelOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.DeployModelResponse, error)
- func (op *DeployModelOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.DeployModelResponse, error)
- type EndpointCallOptions
- type EndpointClient
- func (c *EndpointClient) Close() error
- func (c *EndpointClient) Connection() *grpc.ClientConn
- func (c *EndpointClient) CreateEndpoint(ctx context.Context, req *aiplatformpb.CreateEndpointRequest, ...) (*CreateEndpointOperation, error)
- func (c *EndpointClient) CreateEndpointOperation(name string) *CreateEndpointOperation
- func (c *EndpointClient) DeleteEndpoint(ctx context.Context, req *aiplatformpb.DeleteEndpointRequest, ...) (*DeleteEndpointOperation, error)
- func (c *EndpointClient) DeleteEndpointOperation(name string) *DeleteEndpointOperation
- func (c *EndpointClient) DeployModel(ctx context.Context, req *aiplatformpb.DeployModelRequest, ...) (*DeployModelOperation, error)
- func (c *EndpointClient) DeployModelOperation(name string) *DeployModelOperation
- func (c *EndpointClient) GetEndpoint(ctx context.Context, req *aiplatformpb.GetEndpointRequest, ...) (*aiplatformpb.Endpoint, error)
- func (c *EndpointClient) ListEndpoints(ctx context.Context, req *aiplatformpb.ListEndpointsRequest, ...) *EndpointIterator
- func (c *EndpointClient) UndeployModel(ctx context.Context, req *aiplatformpb.UndeployModelRequest, ...) (*UndeployModelOperation, error)
- func (c *EndpointClient) UndeployModelOperation(name string) *UndeployModelOperation
- func (c *EndpointClient) UpdateEndpoint(ctx context.Context, req *aiplatformpb.UpdateEndpointRequest, ...) (*aiplatformpb.Endpoint, error)
- type EndpointIterator
- type ExportDataOperation
- func (op *ExportDataOperation) Done() bool
- func (op *ExportDataOperation) Metadata() (*aiplatformpb.ExportDataOperationMetadata, error)
- func (op *ExportDataOperation) Name() string
- func (op *ExportDataOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.ExportDataResponse, error)
- func (op *ExportDataOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.ExportDataResponse, error)
- type ExportModelOperation
- func (op *ExportModelOperation) Done() bool
- func (op *ExportModelOperation) Metadata() (*aiplatformpb.ExportModelOperationMetadata, error)
- func (op *ExportModelOperation) Name() string
- func (op *ExportModelOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.ExportModelResponse, error)
- func (op *ExportModelOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.ExportModelResponse, error)
- type HyperparameterTuningJobIterator
- type ImportDataOperation
- func (op *ImportDataOperation) Done() bool
- func (op *ImportDataOperation) Metadata() (*aiplatformpb.ImportDataOperationMetadata, error)
- func (op *ImportDataOperation) Name() string
- func (op *ImportDataOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.ImportDataResponse, error)
- func (op *ImportDataOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.ImportDataResponse, error)
- type IndexCallOptions
- type IndexClient
- func (c *IndexClient) Close() error
- func (c *IndexClient) Connection() *grpc.ClientConn
- func (c *IndexClient) CreateIndex(ctx context.Context, req *aiplatformpb.CreateIndexRequest, ...) (*CreateIndexOperation, error)
- func (c *IndexClient) CreateIndexOperation(name string) *CreateIndexOperation
- func (c *IndexClient) DeleteIndex(ctx context.Context, req *aiplatformpb.DeleteIndexRequest, ...) (*DeleteIndexOperation, error)
- func (c *IndexClient) DeleteIndexOperation(name string) *DeleteIndexOperation
- func (c *IndexClient) GetIndex(ctx context.Context, req *aiplatformpb.GetIndexRequest, opts ...gax.CallOption) (*aiplatformpb.Index, error)
- func (c *IndexClient) ListIndexes(ctx context.Context, req *aiplatformpb.ListIndexesRequest, ...) *IndexIterator
- func (c *IndexClient) UpdateIndex(ctx context.Context, req *aiplatformpb.UpdateIndexRequest, ...) (*UpdateIndexOperation, error)
- func (c *IndexClient) UpdateIndexOperation(name string) *UpdateIndexOperation
- type IndexEndpointCallOptions
- type IndexEndpointClient
- func (c *IndexEndpointClient) Close() error
- func (c *IndexEndpointClient) Connection() *grpc.ClientConn
- func (c *IndexEndpointClient) CreateIndexEndpoint(ctx context.Context, req *aiplatformpb.CreateIndexEndpointRequest, ...) (*CreateIndexEndpointOperation, error)
- func (c *IndexEndpointClient) CreateIndexEndpointOperation(name string) *CreateIndexEndpointOperation
- func (c *IndexEndpointClient) DeleteIndexEndpoint(ctx context.Context, req *aiplatformpb.DeleteIndexEndpointRequest, ...) (*DeleteIndexEndpointOperation, error)
- func (c *IndexEndpointClient) DeleteIndexEndpointOperation(name string) *DeleteIndexEndpointOperation
- func (c *IndexEndpointClient) DeployIndex(ctx context.Context, req *aiplatformpb.DeployIndexRequest, ...) (*DeployIndexOperation, error)
- func (c *IndexEndpointClient) DeployIndexOperation(name string) *DeployIndexOperation
- func (c *IndexEndpointClient) GetIndexEndpoint(ctx context.Context, req *aiplatformpb.GetIndexEndpointRequest, ...) (*aiplatformpb.IndexEndpoint, error)
- func (c *IndexEndpointClient) ListIndexEndpoints(ctx context.Context, req *aiplatformpb.ListIndexEndpointsRequest, ...) *IndexEndpointIterator
- func (c *IndexEndpointClient) UndeployIndex(ctx context.Context, req *aiplatformpb.UndeployIndexRequest, ...) (*UndeployIndexOperation, error)
- func (c *IndexEndpointClient) UndeployIndexOperation(name string) *UndeployIndexOperation
- func (c *IndexEndpointClient) UpdateIndexEndpoint(ctx context.Context, req *aiplatformpb.UpdateIndexEndpointRequest, ...) (*aiplatformpb.IndexEndpoint, error)
- type IndexEndpointIterator
- type IndexIterator
- type JobCallOptions
- type JobClient
- func (c *JobClient) CancelBatchPredictionJob(ctx context.Context, req *aiplatformpb.CancelBatchPredictionJobRequest, ...) error
- func (c *JobClient) CancelCustomJob(ctx context.Context, req *aiplatformpb.CancelCustomJobRequest, ...) error
- func (c *JobClient) CancelDataLabelingJob(ctx context.Context, req *aiplatformpb.CancelDataLabelingJobRequest, ...) error
- func (c *JobClient) CancelHyperparameterTuningJob(ctx context.Context, req *aiplatformpb.CancelHyperparameterTuningJobRequest, ...) error
- func (c *JobClient) Close() error
- func (c *JobClient) Connection() *grpc.ClientConn
- func (c *JobClient) CreateBatchPredictionJob(ctx context.Context, req *aiplatformpb.CreateBatchPredictionJobRequest, ...) (*aiplatformpb.BatchPredictionJob, error)
- func (c *JobClient) CreateCustomJob(ctx context.Context, req *aiplatformpb.CreateCustomJobRequest, ...) (*aiplatformpb.CustomJob, error)
- func (c *JobClient) CreateDataLabelingJob(ctx context.Context, req *aiplatformpb.CreateDataLabelingJobRequest, ...) (*aiplatformpb.DataLabelingJob, error)
- func (c *JobClient) CreateHyperparameterTuningJob(ctx context.Context, req *aiplatformpb.CreateHyperparameterTuningJobRequest, ...) (*aiplatformpb.HyperparameterTuningJob, error)
- func (c *JobClient) CreateModelDeploymentMonitoringJob(ctx context.Context, ...) (*aiplatformpb.ModelDeploymentMonitoringJob, error)
- func (c *JobClient) DeleteBatchPredictionJob(ctx context.Context, req *aiplatformpb.DeleteBatchPredictionJobRequest, ...) (*DeleteBatchPredictionJobOperation, error)
- func (c *JobClient) DeleteBatchPredictionJobOperation(name string) *DeleteBatchPredictionJobOperation
- func (c *JobClient) DeleteCustomJob(ctx context.Context, req *aiplatformpb.DeleteCustomJobRequest, ...) (*DeleteCustomJobOperation, error)
- func (c *JobClient) DeleteCustomJobOperation(name string) *DeleteCustomJobOperation
- func (c *JobClient) DeleteDataLabelingJob(ctx context.Context, req *aiplatformpb.DeleteDataLabelingJobRequest, ...) (*DeleteDataLabelingJobOperation, error)
- func (c *JobClient) DeleteDataLabelingJobOperation(name string) *DeleteDataLabelingJobOperation
- func (c *JobClient) DeleteHyperparameterTuningJob(ctx context.Context, req *aiplatformpb.DeleteHyperparameterTuningJobRequest, ...) (*DeleteHyperparameterTuningJobOperation, error)
- func (c *JobClient) DeleteHyperparameterTuningJobOperation(name string) *DeleteHyperparameterTuningJobOperation
- func (c *JobClient) DeleteModelDeploymentMonitoringJob(ctx context.Context, ...) (*DeleteModelDeploymentMonitoringJobOperation, error)
- func (c *JobClient) DeleteModelDeploymentMonitoringJobOperation(name string) *DeleteModelDeploymentMonitoringJobOperation
- func (c *JobClient) GetBatchPredictionJob(ctx context.Context, req *aiplatformpb.GetBatchPredictionJobRequest, ...) (*aiplatformpb.BatchPredictionJob, error)
- func (c *JobClient) GetCustomJob(ctx context.Context, req *aiplatformpb.GetCustomJobRequest, ...) (*aiplatformpb.CustomJob, error)
- func (c *JobClient) GetDataLabelingJob(ctx context.Context, req *aiplatformpb.GetDataLabelingJobRequest, ...) (*aiplatformpb.DataLabelingJob, error)
- func (c *JobClient) GetHyperparameterTuningJob(ctx context.Context, req *aiplatformpb.GetHyperparameterTuningJobRequest, ...) (*aiplatformpb.HyperparameterTuningJob, error)
- func (c *JobClient) GetModelDeploymentMonitoringJob(ctx context.Context, req *aiplatformpb.GetModelDeploymentMonitoringJobRequest, ...) (*aiplatformpb.ModelDeploymentMonitoringJob, error)
- func (c *JobClient) ListBatchPredictionJobs(ctx context.Context, req *aiplatformpb.ListBatchPredictionJobsRequest, ...) *BatchPredictionJobIterator
- func (c *JobClient) ListCustomJobs(ctx context.Context, req *aiplatformpb.ListCustomJobsRequest, ...) *CustomJobIterator
- func (c *JobClient) ListDataLabelingJobs(ctx context.Context, req *aiplatformpb.ListDataLabelingJobsRequest, ...) *DataLabelingJobIterator
- func (c *JobClient) ListHyperparameterTuningJobs(ctx context.Context, req *aiplatformpb.ListHyperparameterTuningJobsRequest, ...) *HyperparameterTuningJobIterator
- func (c *JobClient) ListModelDeploymentMonitoringJobs(ctx context.Context, ...) *ModelDeploymentMonitoringJobIterator
- func (c *JobClient) PauseModelDeploymentMonitoringJob(ctx context.Context, ...) error
- func (c *JobClient) ResumeModelDeploymentMonitoringJob(ctx context.Context, ...) error
- func (c *JobClient) SearchModelDeploymentMonitoringStatsAnomalies(ctx context.Context, ...) *ModelMonitoringStatsAnomaliesIterator
- func (c *JobClient) UpdateModelDeploymentMonitoringJob(ctx context.Context, ...) (*UpdateModelDeploymentMonitoringJobOperation, error)
- func (c *JobClient) UpdateModelDeploymentMonitoringJobOperation(name string) *UpdateModelDeploymentMonitoringJobOperation
- type MigratableResourceIterator
- type MigrationCallOptions
- type MigrationClient
- func (c *MigrationClient) BatchMigrateResources(ctx context.Context, req *aiplatformpb.BatchMigrateResourcesRequest, ...) (*BatchMigrateResourcesOperation, error)
- func (c *MigrationClient) BatchMigrateResourcesOperation(name string) *BatchMigrateResourcesOperation
- func (c *MigrationClient) Close() error
- func (c *MigrationClient) Connection() *grpc.ClientConn
- func (c *MigrationClient) SearchMigratableResources(ctx context.Context, req *aiplatformpb.SearchMigratableResourcesRequest, ...) *MigratableResourceIterator
- type ModelCallOptions
- type ModelClient
- func (c *ModelClient) Close() error
- func (c *ModelClient) Connection() *grpc.ClientConn
- func (c *ModelClient) DeleteModel(ctx context.Context, req *aiplatformpb.DeleteModelRequest, ...) (*DeleteModelOperation, error)
- func (c *ModelClient) DeleteModelOperation(name string) *DeleteModelOperation
- func (c *ModelClient) ExportModel(ctx context.Context, req *aiplatformpb.ExportModelRequest, ...) (*ExportModelOperation, error)
- func (c *ModelClient) ExportModelOperation(name string) *ExportModelOperation
- func (c *ModelClient) GetModel(ctx context.Context, req *aiplatformpb.GetModelRequest, opts ...gax.CallOption) (*aiplatformpb.Model, error)
- func (c *ModelClient) GetModelEvaluation(ctx context.Context, req *aiplatformpb.GetModelEvaluationRequest, ...) (*aiplatformpb.ModelEvaluation, error)
- func (c *ModelClient) GetModelEvaluationSlice(ctx context.Context, req *aiplatformpb.GetModelEvaluationSliceRequest, ...) (*aiplatformpb.ModelEvaluationSlice, error)
- func (c *ModelClient) ListModelEvaluationSlices(ctx context.Context, req *aiplatformpb.ListModelEvaluationSlicesRequest, ...) *ModelEvaluationSliceIterator
- func (c *ModelClient) ListModelEvaluations(ctx context.Context, req *aiplatformpb.ListModelEvaluationsRequest, ...) *ModelEvaluationIterator
- func (c *ModelClient) ListModels(ctx context.Context, req *aiplatformpb.ListModelsRequest, ...) *ModelIterator
- func (c *ModelClient) UpdateModel(ctx context.Context, req *aiplatformpb.UpdateModelRequest, ...) (*aiplatformpb.Model, error)
- func (c *ModelClient) UploadModel(ctx context.Context, req *aiplatformpb.UploadModelRequest, ...) (*UploadModelOperation, error)
- func (c *ModelClient) UploadModelOperation(name string) *UploadModelOperation
- type ModelDeploymentMonitoringJobIterator
- type ModelEvaluationIterator
- type ModelEvaluationSliceIterator
- type ModelIterator
- type ModelMonitoringStatsAnomaliesIterator
- type PipelineCallOptions
- type PipelineClient
- func (c *PipelineClient) CancelPipelineJob(ctx context.Context, req *aiplatformpb.CancelPipelineJobRequest, ...) error
- func (c *PipelineClient) CancelTrainingPipeline(ctx context.Context, req *aiplatformpb.CancelTrainingPipelineRequest, ...) error
- func (c *PipelineClient) Close() error
- func (c *PipelineClient) Connection() *grpc.ClientConn
- func (c *PipelineClient) CreatePipelineJob(ctx context.Context, req *aiplatformpb.CreatePipelineJobRequest, ...) (*aiplatformpb.PipelineJob, error)
- func (c *PipelineClient) CreateTrainingPipeline(ctx context.Context, req *aiplatformpb.CreateTrainingPipelineRequest, ...) (*aiplatformpb.TrainingPipeline, error)
- func (c *PipelineClient) DeletePipelineJob(ctx context.Context, req *aiplatformpb.DeletePipelineJobRequest, ...) (*DeletePipelineJobOperation, error)
- func (c *PipelineClient) DeletePipelineJobOperation(name string) *DeletePipelineJobOperation
- func (c *PipelineClient) DeleteTrainingPipeline(ctx context.Context, req *aiplatformpb.DeleteTrainingPipelineRequest, ...) (*DeleteTrainingPipelineOperation, error)
- func (c *PipelineClient) DeleteTrainingPipelineOperation(name string) *DeleteTrainingPipelineOperation
- func (c *PipelineClient) GetPipelineJob(ctx context.Context, req *aiplatformpb.GetPipelineJobRequest, ...) (*aiplatformpb.PipelineJob, error)
- func (c *PipelineClient) GetTrainingPipeline(ctx context.Context, req *aiplatformpb.GetTrainingPipelineRequest, ...) (*aiplatformpb.TrainingPipeline, error)
- func (c *PipelineClient) ListPipelineJobs(ctx context.Context, req *aiplatformpb.ListPipelineJobsRequest, ...) *PipelineJobIterator
- func (c *PipelineClient) ListTrainingPipelines(ctx context.Context, req *aiplatformpb.ListTrainingPipelinesRequest, ...) *TrainingPipelineIterator
- type PipelineJobIterator
- type PredictionCallOptions
- type PredictionClient
- func (c *PredictionClient) Close() error
- func (c *PredictionClient) Connection() *grpc.ClientConn
- func (c *PredictionClient) Explain(ctx context.Context, req *aiplatformpb.ExplainRequest, opts ...gax.CallOption) (*aiplatformpb.ExplainResponse, error)
- func (c *PredictionClient) Predict(ctx context.Context, req *aiplatformpb.PredictRequest, opts ...gax.CallOption) (*aiplatformpb.PredictResponse, error)
- func (c *PredictionClient) RawPredict(ctx context.Context, req *aiplatformpb.RawPredictRequest, ...) (*httpbodypb.HttpBody, error)
- type SpecialistPoolCallOptions
- type SpecialistPoolClient
- func (c *SpecialistPoolClient) Close() error
- func (c *SpecialistPoolClient) Connection() *grpc.ClientConn
- func (c *SpecialistPoolClient) CreateSpecialistPool(ctx context.Context, req *aiplatformpb.CreateSpecialistPoolRequest, ...) (*CreateSpecialistPoolOperation, error)
- func (c *SpecialistPoolClient) CreateSpecialistPoolOperation(name string) *CreateSpecialistPoolOperation
- func (c *SpecialistPoolClient) DeleteSpecialistPool(ctx context.Context, req *aiplatformpb.DeleteSpecialistPoolRequest, ...) (*DeleteSpecialistPoolOperation, error)
- func (c *SpecialistPoolClient) DeleteSpecialistPoolOperation(name string) *DeleteSpecialistPoolOperation
- func (c *SpecialistPoolClient) GetSpecialistPool(ctx context.Context, req *aiplatformpb.GetSpecialistPoolRequest, ...) (*aiplatformpb.SpecialistPool, error)
- func (c *SpecialistPoolClient) ListSpecialistPools(ctx context.Context, req *aiplatformpb.ListSpecialistPoolsRequest, ...) *SpecialistPoolIterator
- func (c *SpecialistPoolClient) UpdateSpecialistPool(ctx context.Context, req *aiplatformpb.UpdateSpecialistPoolRequest, ...) (*UpdateSpecialistPoolOperation, error)
- func (c *SpecialistPoolClient) UpdateSpecialistPoolOperation(name string) *UpdateSpecialistPoolOperation
- type SpecialistPoolIterator
- type StudyIterator
- type SuggestTrialsOperation
- func (op *SuggestTrialsOperation) Done() bool
- func (op *SuggestTrialsOperation) Metadata() (*aiplatformpb.SuggestTrialsMetadata, error)
- func (op *SuggestTrialsOperation) Name() string
- func (op *SuggestTrialsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.SuggestTrialsResponse, error)
- func (op *SuggestTrialsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.SuggestTrialsResponse, error)
- type TrainingPipelineIterator
- type TrialIterator
- type UndeployIndexOperation
- func (op *UndeployIndexOperation) Done() bool
- func (op *UndeployIndexOperation) Metadata() (*aiplatformpb.UndeployIndexOperationMetadata, error)
- func (op *UndeployIndexOperation) Name() string
- func (op *UndeployIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.UndeployIndexResponse, error)
- func (op *UndeployIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.UndeployIndexResponse, error)
- type UndeployModelOperation
- func (op *UndeployModelOperation) Done() bool
- func (op *UndeployModelOperation) Metadata() (*aiplatformpb.UndeployModelOperationMetadata, error)
- func (op *UndeployModelOperation) Name() string
- func (op *UndeployModelOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.UndeployModelResponse, error)
- func (op *UndeployModelOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.UndeployModelResponse, error)
- type UpdateIndexOperation
- func (op *UpdateIndexOperation) Done() bool
- func (op *UpdateIndexOperation) Metadata() (*aiplatformpb.UpdateIndexOperationMetadata, error)
- func (op *UpdateIndexOperation) Name() string
- func (op *UpdateIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Index, error)
- func (op *UpdateIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Index, error)
- type UpdateModelDeploymentMonitoringJobOperation
- func (op *UpdateModelDeploymentMonitoringJobOperation) Done() bool
- func (op *UpdateModelDeploymentMonitoringJobOperation) Metadata() (*aiplatformpb.UpdateModelDeploymentMonitoringJobOperationMetadata, error)
- func (op *UpdateModelDeploymentMonitoringJobOperation) Name() string
- func (op *UpdateModelDeploymentMonitoringJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.ModelDeploymentMonitoringJob, error)
- func (op *UpdateModelDeploymentMonitoringJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.ModelDeploymentMonitoringJob, error)
- type UpdateSpecialistPoolOperation
- func (op *UpdateSpecialistPoolOperation) Done() bool
- func (op *UpdateSpecialistPoolOperation) Metadata() (*aiplatformpb.UpdateSpecialistPoolOperationMetadata, error)
- func (op *UpdateSpecialistPoolOperation) Name() string
- func (op *UpdateSpecialistPoolOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.SpecialistPool, error)
- func (op *UpdateSpecialistPoolOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.SpecialistPool, error)
- type UploadModelOperation
- func (op *UploadModelOperation) Done() bool
- func (op *UploadModelOperation) Metadata() (*aiplatformpb.UploadModelOperationMetadata, error)
- func (op *UploadModelOperation) Name() string
- func (op *UploadModelOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.UploadModelResponse, error)
- func (op *UploadModelOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.UploadModelResponse, error)
- type VizierCallOptions
- type VizierClient
- func (c *VizierClient) AddTrialMeasurement(ctx context.Context, req *aiplatformpb.AddTrialMeasurementRequest, ...) (*aiplatformpb.Trial, error)
- func (c *VizierClient) CheckTrialEarlyStoppingState(ctx context.Context, req *aiplatformpb.CheckTrialEarlyStoppingStateRequest, ...) (*CheckTrialEarlyStoppingStateOperation, error)
- func (c *VizierClient) CheckTrialEarlyStoppingStateOperation(name string) *CheckTrialEarlyStoppingStateOperation
- func (c *VizierClient) Close() error
- func (c *VizierClient) CompleteTrial(ctx context.Context, req *aiplatformpb.CompleteTrialRequest, ...) (*aiplatformpb.Trial, error)
- func (c *VizierClient) Connection() *grpc.ClientConn
- func (c *VizierClient) CreateStudy(ctx context.Context, req *aiplatformpb.CreateStudyRequest, ...) (*aiplatformpb.Study, error)
- func (c *VizierClient) CreateTrial(ctx context.Context, req *aiplatformpb.CreateTrialRequest, ...) (*aiplatformpb.Trial, error)
- func (c *VizierClient) DeleteStudy(ctx context.Context, req *aiplatformpb.DeleteStudyRequest, ...) error
- func (c *VizierClient) DeleteTrial(ctx context.Context, req *aiplatformpb.DeleteTrialRequest, ...) error
- func (c *VizierClient) GetStudy(ctx context.Context, req *aiplatformpb.GetStudyRequest, opts ...gax.CallOption) (*aiplatformpb.Study, error)
- func (c *VizierClient) GetTrial(ctx context.Context, req *aiplatformpb.GetTrialRequest, opts ...gax.CallOption) (*aiplatformpb.Trial, error)
- func (c *VizierClient) ListOptimalTrials(ctx context.Context, req *aiplatformpb.ListOptimalTrialsRequest, ...) (*aiplatformpb.ListOptimalTrialsResponse, error)
- func (c *VizierClient) ListStudies(ctx context.Context, req *aiplatformpb.ListStudiesRequest, ...) *StudyIterator
- func (c *VizierClient) ListTrials(ctx context.Context, req *aiplatformpb.ListTrialsRequest, ...) *TrialIterator
- func (c *VizierClient) LookupStudy(ctx context.Context, req *aiplatformpb.LookupStudyRequest, ...) (*aiplatformpb.Study, error)
- func (c *VizierClient) StopTrial(ctx context.Context, req *aiplatformpb.StopTrialRequest, ...) (*aiplatformpb.Trial, error)
- func (c *VizierClient) SuggestTrials(ctx context.Context, req *aiplatformpb.SuggestTrialsRequest, ...) (*SuggestTrialsOperation, error)
- func (c *VizierClient) SuggestTrialsOperation(name string) *SuggestTrialsOperation
Examples ¶
- DatasetClient.CreateDataset
- DatasetClient.DeleteDataset
- DatasetClient.ExportData
- DatasetClient.GetAnnotationSpec
- DatasetClient.GetDataset
- DatasetClient.ImportData
- DatasetClient.ListAnnotations
- DatasetClient.ListDataItems
- DatasetClient.ListDatasets
- DatasetClient.UpdateDataset
- EndpointClient.CreateEndpoint
- EndpointClient.DeleteEndpoint
- EndpointClient.DeployModel
- EndpointClient.GetEndpoint
- EndpointClient.ListEndpoints
- EndpointClient.UndeployModel
- EndpointClient.UpdateEndpoint
- IndexClient.CreateIndex
- IndexClient.DeleteIndex
- IndexClient.GetIndex
- IndexClient.ListIndexes
- IndexClient.UpdateIndex
- IndexEndpointClient.CreateIndexEndpoint
- IndexEndpointClient.DeleteIndexEndpoint
- IndexEndpointClient.DeployIndex
- IndexEndpointClient.GetIndexEndpoint
- IndexEndpointClient.ListIndexEndpoints
- IndexEndpointClient.UndeployIndex
- IndexEndpointClient.UpdateIndexEndpoint
- JobClient.CancelBatchPredictionJob
- JobClient.CancelCustomJob
- JobClient.CancelDataLabelingJob
- JobClient.CancelHyperparameterTuningJob
- JobClient.CreateBatchPredictionJob
- JobClient.CreateCustomJob
- JobClient.CreateDataLabelingJob
- JobClient.CreateHyperparameterTuningJob
- JobClient.CreateModelDeploymentMonitoringJob
- JobClient.DeleteBatchPredictionJob
- JobClient.DeleteCustomJob
- JobClient.DeleteDataLabelingJob
- JobClient.DeleteHyperparameterTuningJob
- JobClient.DeleteModelDeploymentMonitoringJob
- JobClient.GetBatchPredictionJob
- JobClient.GetCustomJob
- JobClient.GetDataLabelingJob
- JobClient.GetHyperparameterTuningJob
- JobClient.GetModelDeploymentMonitoringJob
- JobClient.ListBatchPredictionJobs
- JobClient.ListCustomJobs
- JobClient.ListDataLabelingJobs
- JobClient.ListHyperparameterTuningJobs
- JobClient.ListModelDeploymentMonitoringJobs
- JobClient.PauseModelDeploymentMonitoringJob
- JobClient.ResumeModelDeploymentMonitoringJob
- JobClient.SearchModelDeploymentMonitoringStatsAnomalies
- JobClient.UpdateModelDeploymentMonitoringJob
- MigrationClient.BatchMigrateResources
- MigrationClient.SearchMigratableResources
- ModelClient.DeleteModel
- ModelClient.ExportModel
- ModelClient.GetModel
- ModelClient.GetModelEvaluation
- ModelClient.GetModelEvaluationSlice
- ModelClient.ListModelEvaluationSlices
- ModelClient.ListModelEvaluations
- ModelClient.ListModels
- ModelClient.UpdateModel
- ModelClient.UploadModel
- NewDatasetClient
- NewEndpointClient
- NewIndexClient
- NewIndexEndpointClient
- NewJobClient
- NewMigrationClient
- NewModelClient
- NewPipelineClient
- NewPredictionClient
- NewSpecialistPoolClient
- NewVizierClient
- PipelineClient.CancelPipelineJob
- PipelineClient.CancelTrainingPipeline
- PipelineClient.CreatePipelineJob
- PipelineClient.CreateTrainingPipeline
- PipelineClient.DeletePipelineJob
- PipelineClient.DeleteTrainingPipeline
- PipelineClient.GetPipelineJob
- PipelineClient.GetTrainingPipeline
- PipelineClient.ListPipelineJobs
- PipelineClient.ListTrainingPipelines
- PredictionClient.Explain
- PredictionClient.Predict
- PredictionClient.RawPredict
- SpecialistPoolClient.CreateSpecialistPool
- SpecialistPoolClient.DeleteSpecialistPool
- SpecialistPoolClient.GetSpecialistPool
- SpecialistPoolClient.ListSpecialistPools
- SpecialistPoolClient.UpdateSpecialistPool
- VizierClient.AddTrialMeasurement
- VizierClient.CheckTrialEarlyStoppingState
- VizierClient.CompleteTrial
- VizierClient.CreateStudy
- VizierClient.CreateTrial
- VizierClient.DeleteStudy
- VizierClient.DeleteTrial
- VizierClient.GetStudy
- VizierClient.GetTrial
- VizierClient.ListOptimalTrials
- VizierClient.ListStudies
- VizierClient.ListTrials
- VizierClient.LookupStudy
- VizierClient.StopTrial
- VizierClient.SuggestTrials
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultAuthScopes ¶
func DefaultAuthScopes() []string
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
Types ¶
type AnnotationIterator ¶
type AnnotationIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*aiplatformpb.Annotation, nextPageToken string, err error) // contains filtered or unexported fields }
AnnotationIterator manages a stream of *aiplatformpb.Annotation.
func (*AnnotationIterator) Next ¶
func (it *AnnotationIterator) Next() (*aiplatformpb.Annotation, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*AnnotationIterator) PageInfo ¶
func (it *AnnotationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type BatchMigrateResourcesOperation ¶
type BatchMigrateResourcesOperation struct {
// contains filtered or unexported fields
}
BatchMigrateResourcesOperation manages a long-running operation from BatchMigrateResources.
func (*BatchMigrateResourcesOperation) Done ¶
func (op *BatchMigrateResourcesOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*BatchMigrateResourcesOperation) Metadata ¶
func (op *BatchMigrateResourcesOperation) Metadata() (*aiplatformpb.BatchMigrateResourcesOperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*BatchMigrateResourcesOperation) Name ¶
func (op *BatchMigrateResourcesOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*BatchMigrateResourcesOperation) Poll ¶
func (op *BatchMigrateResourcesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.BatchMigrateResourcesResponse, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*BatchMigrateResourcesOperation) Wait ¶
func (op *BatchMigrateResourcesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.BatchMigrateResourcesResponse, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type BatchPredictionJobIterator ¶
type BatchPredictionJobIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*aiplatformpb.BatchPredictionJob, nextPageToken string, err error) // contains filtered or unexported fields }
BatchPredictionJobIterator manages a stream of *aiplatformpb.BatchPredictionJob.
func (*BatchPredictionJobIterator) Next ¶
func (it *BatchPredictionJobIterator) Next() (*aiplatformpb.BatchPredictionJob, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*BatchPredictionJobIterator) PageInfo ¶
func (it *BatchPredictionJobIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type CheckTrialEarlyStoppingStateOperation ¶ added in v0.2.0
type CheckTrialEarlyStoppingStateOperation struct {
// contains filtered or unexported fields
}
CheckTrialEarlyStoppingStateOperation manages a long-running operation from CheckTrialEarlyStoppingState.
func (*CheckTrialEarlyStoppingStateOperation) Done ¶ added in v0.2.0
func (op *CheckTrialEarlyStoppingStateOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CheckTrialEarlyStoppingStateOperation) Metadata ¶ added in v0.2.0
func (op *CheckTrialEarlyStoppingStateOperation) Metadata() (*aiplatformpb.CheckTrialEarlyStoppingStateMetatdata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CheckTrialEarlyStoppingStateOperation) Name ¶ added in v0.2.0
func (op *CheckTrialEarlyStoppingStateOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CheckTrialEarlyStoppingStateOperation) Poll ¶ added in v0.2.0
func (op *CheckTrialEarlyStoppingStateOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.CheckTrialEarlyStoppingStateResponse, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CheckTrialEarlyStoppingStateOperation) Wait ¶ added in v0.2.0
func (op *CheckTrialEarlyStoppingStateOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.CheckTrialEarlyStoppingStateResponse, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type CreateDatasetOperation ¶
type CreateDatasetOperation struct {
// contains filtered or unexported fields
}
CreateDatasetOperation manages a long-running operation from CreateDataset.
func (*CreateDatasetOperation) Done ¶
func (op *CreateDatasetOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateDatasetOperation) Metadata ¶
func (op *CreateDatasetOperation) Metadata() (*aiplatformpb.CreateDatasetOperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateDatasetOperation) Name ¶
func (op *CreateDatasetOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateDatasetOperation) Poll ¶
func (op *CreateDatasetOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Dataset, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateDatasetOperation) Wait ¶
func (op *CreateDatasetOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Dataset, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type CreateEndpointOperation ¶
type CreateEndpointOperation struct {
// contains filtered or unexported fields
}
CreateEndpointOperation manages a long-running operation from CreateEndpoint.
func (*CreateEndpointOperation) Done ¶
func (op *CreateEndpointOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateEndpointOperation) Metadata ¶
func (op *CreateEndpointOperation) Metadata() (*aiplatformpb.CreateEndpointOperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateEndpointOperation) Name ¶
func (op *CreateEndpointOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateEndpointOperation) Poll ¶
func (op *CreateEndpointOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Endpoint, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateEndpointOperation) Wait ¶
func (op *CreateEndpointOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Endpoint, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type CreateIndexEndpointOperation ¶ added in v0.2.0
type CreateIndexEndpointOperation struct {
// contains filtered or unexported fields
}
CreateIndexEndpointOperation manages a long-running operation from CreateIndexEndpoint.
func (*CreateIndexEndpointOperation) Done ¶ added in v0.2.0
func (op *CreateIndexEndpointOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateIndexEndpointOperation) Metadata ¶ added in v0.2.0
func (op *CreateIndexEndpointOperation) Metadata() (*aiplatformpb.CreateIndexEndpointOperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateIndexEndpointOperation) Name ¶ added in v0.2.0
func (op *CreateIndexEndpointOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateIndexEndpointOperation) Poll ¶ added in v0.2.0
func (op *CreateIndexEndpointOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.IndexEndpoint, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateIndexEndpointOperation) Wait ¶ added in v0.2.0
func (op *CreateIndexEndpointOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.IndexEndpoint, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type CreateIndexOperation ¶ added in v0.2.0
type CreateIndexOperation struct {
// contains filtered or unexported fields
}
CreateIndexOperation manages a long-running operation from CreateIndex.
func (*CreateIndexOperation) Done ¶ added in v0.2.0
func (op *CreateIndexOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateIndexOperation) Metadata ¶ added in v0.2.0
func (op *CreateIndexOperation) Metadata() (*aiplatformpb.CreateIndexOperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateIndexOperation) Name ¶ added in v0.2.0
func (op *CreateIndexOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateIndexOperation) Poll ¶ added in v0.2.0
func (op *CreateIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Index, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateIndexOperation) Wait ¶ added in v0.2.0
func (op *CreateIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Index, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type CreateSpecialistPoolOperation ¶
type CreateSpecialistPoolOperation struct {
// contains filtered or unexported fields
}
CreateSpecialistPoolOperation manages a long-running operation from CreateSpecialistPool.
func (*CreateSpecialistPoolOperation) Done ¶
func (op *CreateSpecialistPoolOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateSpecialistPoolOperation) Metadata ¶
func (op *CreateSpecialistPoolOperation) Metadata() (*aiplatformpb.CreateSpecialistPoolOperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateSpecialistPoolOperation) Name ¶
func (op *CreateSpecialistPoolOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateSpecialistPoolOperation) Poll ¶
func (op *CreateSpecialistPoolOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.SpecialistPool, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateSpecialistPoolOperation) Wait ¶
func (op *CreateSpecialistPoolOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.SpecialistPool, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type CustomJobIterator ¶
type CustomJobIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*aiplatformpb.CustomJob, nextPageToken string, err error) // contains filtered or unexported fields }
CustomJobIterator manages a stream of *aiplatformpb.CustomJob.
func (*CustomJobIterator) Next ¶
func (it *CustomJobIterator) Next() (*aiplatformpb.CustomJob, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*CustomJobIterator) PageInfo ¶
func (it *CustomJobIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type DataItemIterator ¶
type DataItemIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*aiplatformpb.DataItem, nextPageToken string, err error) // contains filtered or unexported fields }
DataItemIterator manages a stream of *aiplatformpb.DataItem.
func (*DataItemIterator) Next ¶
func (it *DataItemIterator) Next() (*aiplatformpb.DataItem, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*DataItemIterator) PageInfo ¶
func (it *DataItemIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type DataLabelingJobIterator ¶
type DataLabelingJobIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*aiplatformpb.DataLabelingJob, nextPageToken string, err error) // contains filtered or unexported fields }
DataLabelingJobIterator manages a stream of *aiplatformpb.DataLabelingJob.
func (*DataLabelingJobIterator) Next ¶
func (it *DataLabelingJobIterator) Next() (*aiplatformpb.DataLabelingJob, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*DataLabelingJobIterator) PageInfo ¶
func (it *DataLabelingJobIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type DatasetCallOptions ¶
type DatasetCallOptions struct { CreateDataset []gax.CallOption GetDataset []gax.CallOption UpdateDataset []gax.CallOption ListDatasets []gax.CallOption DeleteDataset []gax.CallOption ImportData []gax.CallOption ExportData []gax.CallOption ListDataItems []gax.CallOption GetAnnotationSpec []gax.CallOption ListAnnotations []gax.CallOption }
DatasetCallOptions contains the retry settings for each method of DatasetClient.
type DatasetClient ¶
type DatasetClient struct { // The call options for this service. CallOptions *DatasetCallOptions // LROClient is used internally to handle long-running operations. // It is exposed so that its CallOptions can be modified if required. // Users should not Close this client. LROClient *lroauto.OperationsClient // contains filtered or unexported fields }
DatasetClient is a client for interacting with Vertex AI API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The service that handles the CRUD of Vertex AI Dataset and its child resources.
func NewDatasetClient ¶
func NewDatasetClient(ctx context.Context, opts ...option.ClientOption) (*DatasetClient, error)
NewDatasetClient creates a new dataset service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
The service that handles the CRUD of Vertex AI Dataset and its child resources.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" ) func main() { ctx := context.Background() c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*DatasetClient) Close ¶
func (c *DatasetClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*DatasetClient) Connection ¶
func (c *DatasetClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*DatasetClient) CreateDataset ¶
func (c *DatasetClient) CreateDataset(ctx context.Context, req *aiplatformpb.CreateDatasetRequest, opts ...gax.CallOption) (*CreateDatasetOperation, error)
CreateDataset creates a Dataset.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.CreateDatasetRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateDatasetRequest. } op, err := c.CreateDataset(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*DatasetClient) CreateDatasetOperation ¶
func (c *DatasetClient) CreateDatasetOperation(name string) *CreateDatasetOperation
CreateDatasetOperation returns a new CreateDatasetOperation from a given name. The name must be that of a previously created CreateDatasetOperation, possibly from a different process.
func (*DatasetClient) DeleteDataset ¶
func (c *DatasetClient) DeleteDataset(ctx context.Context, req *aiplatformpb.DeleteDatasetRequest, opts ...gax.CallOption) (*DeleteDatasetOperation, error)
DeleteDataset deletes a Dataset.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.DeleteDatasetRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteDatasetRequest. } op, err := c.DeleteDataset(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*DatasetClient) DeleteDatasetOperation ¶
func (c *DatasetClient) DeleteDatasetOperation(name string) *DeleteDatasetOperation
DeleteDatasetOperation returns a new DeleteDatasetOperation from a given name. The name must be that of a previously created DeleteDatasetOperation, possibly from a different process.
func (*DatasetClient) ExportData ¶
func (c *DatasetClient) ExportData(ctx context.Context, req *aiplatformpb.ExportDataRequest, opts ...gax.CallOption) (*ExportDataOperation, error)
ExportData exports data from a Dataset.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.ExportDataRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ExportDataRequest. } op, err := c.ExportData(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*DatasetClient) ExportDataOperation ¶
func (c *DatasetClient) ExportDataOperation(name string) *ExportDataOperation
ExportDataOperation returns a new ExportDataOperation from a given name. The name must be that of a previously created ExportDataOperation, possibly from a different process.
func (*DatasetClient) GetAnnotationSpec ¶
func (c *DatasetClient) GetAnnotationSpec(ctx context.Context, req *aiplatformpb.GetAnnotationSpecRequest, opts ...gax.CallOption) (*aiplatformpb.AnnotationSpec, error)
GetAnnotationSpec gets an AnnotationSpec.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.GetAnnotationSpecRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetAnnotationSpecRequest. } resp, err := c.GetAnnotationSpec(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*DatasetClient) GetDataset ¶
func (c *DatasetClient) GetDataset(ctx context.Context, req *aiplatformpb.GetDatasetRequest, opts ...gax.CallOption) (*aiplatformpb.Dataset, error)
GetDataset gets a Dataset.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.GetDatasetRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetDatasetRequest. } resp, err := c.GetDataset(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*DatasetClient) ImportData ¶
func (c *DatasetClient) ImportData(ctx context.Context, req *aiplatformpb.ImportDataRequest, opts ...gax.CallOption) (*ImportDataOperation, error)
ImportData imports data into a Dataset.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.ImportDataRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ImportDataRequest. } op, err := c.ImportData(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*DatasetClient) ImportDataOperation ¶
func (c *DatasetClient) ImportDataOperation(name string) *ImportDataOperation
ImportDataOperation returns a new ImportDataOperation from a given name. The name must be that of a previously created ImportDataOperation, possibly from a different process.
func (*DatasetClient) ListAnnotations ¶
func (c *DatasetClient) ListAnnotations(ctx context.Context, req *aiplatformpb.ListAnnotationsRequest, opts ...gax.CallOption) *AnnotationIterator
ListAnnotations lists Annotations belongs to a dataitem
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" "google.golang.org/api/iterator" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.ListAnnotationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListAnnotationsRequest. } it := c.ListAnnotations(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*DatasetClient) ListDataItems ¶
func (c *DatasetClient) ListDataItems(ctx context.Context, req *aiplatformpb.ListDataItemsRequest, opts ...gax.CallOption) *DataItemIterator
ListDataItems lists DataItems in a Dataset.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" "google.golang.org/api/iterator" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.ListDataItemsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListDataItemsRequest. } it := c.ListDataItems(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*DatasetClient) ListDatasets ¶
func (c *DatasetClient) ListDatasets(ctx context.Context, req *aiplatformpb.ListDatasetsRequest, opts ...gax.CallOption) *DatasetIterator
ListDatasets lists Datasets in a Location.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" "google.golang.org/api/iterator" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.ListDatasetsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListDatasetsRequest. } it := c.ListDatasets(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*DatasetClient) UpdateDataset ¶
func (c *DatasetClient) UpdateDataset(ctx context.Context, req *aiplatformpb.UpdateDatasetRequest, opts ...gax.CallOption) (*aiplatformpb.Dataset, error)
UpdateDataset updates a Dataset.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.UpdateDatasetRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UpdateDatasetRequest. } resp, err := c.UpdateDataset(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type DatasetIterator ¶
type DatasetIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*aiplatformpb.Dataset, nextPageToken string, err error) // contains filtered or unexported fields }
DatasetIterator manages a stream of *aiplatformpb.Dataset.
func (*DatasetIterator) Next ¶
func (it *DatasetIterator) Next() (*aiplatformpb.Dataset, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*DatasetIterator) PageInfo ¶
func (it *DatasetIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type DeleteBatchPredictionJobOperation ¶
type DeleteBatchPredictionJobOperation struct {
// contains filtered or unexported fields
}
DeleteBatchPredictionJobOperation manages a long-running operation from DeleteBatchPredictionJob.
func (*DeleteBatchPredictionJobOperation) Done ¶
func (op *DeleteBatchPredictionJobOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteBatchPredictionJobOperation) Metadata ¶
func (op *DeleteBatchPredictionJobOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteBatchPredictionJobOperation) Name ¶
func (op *DeleteBatchPredictionJobOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteBatchPredictionJobOperation) Poll ¶
func (op *DeleteBatchPredictionJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteBatchPredictionJobOperation) Wait ¶
func (op *DeleteBatchPredictionJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteCustomJobOperation ¶
type DeleteCustomJobOperation struct {
// contains filtered or unexported fields
}
DeleteCustomJobOperation manages a long-running operation from DeleteCustomJob.
func (*DeleteCustomJobOperation) Done ¶
func (op *DeleteCustomJobOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteCustomJobOperation) Metadata ¶
func (op *DeleteCustomJobOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteCustomJobOperation) Name ¶
func (op *DeleteCustomJobOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteCustomJobOperation) Poll ¶
func (op *DeleteCustomJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteCustomJobOperation) Wait ¶
func (op *DeleteCustomJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteDataLabelingJobOperation ¶
type DeleteDataLabelingJobOperation struct {
// contains filtered or unexported fields
}
DeleteDataLabelingJobOperation manages a long-running operation from DeleteDataLabelingJob.
func (*DeleteDataLabelingJobOperation) Done ¶
func (op *DeleteDataLabelingJobOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteDataLabelingJobOperation) Metadata ¶
func (op *DeleteDataLabelingJobOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteDataLabelingJobOperation) Name ¶
func (op *DeleteDataLabelingJobOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteDataLabelingJobOperation) Poll ¶
func (op *DeleteDataLabelingJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteDataLabelingJobOperation) Wait ¶
func (op *DeleteDataLabelingJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteDatasetOperation ¶
type DeleteDatasetOperation struct {
// contains filtered or unexported fields
}
DeleteDatasetOperation manages a long-running operation from DeleteDataset.
func (*DeleteDatasetOperation) Done ¶
func (op *DeleteDatasetOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteDatasetOperation) Metadata ¶
func (op *DeleteDatasetOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteDatasetOperation) Name ¶
func (op *DeleteDatasetOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteDatasetOperation) Poll ¶
func (op *DeleteDatasetOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteDatasetOperation) Wait ¶
func (op *DeleteDatasetOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteEndpointOperation ¶
type DeleteEndpointOperation struct {
// contains filtered or unexported fields
}
DeleteEndpointOperation manages a long-running operation from DeleteEndpoint.
func (*DeleteEndpointOperation) Done ¶
func (op *DeleteEndpointOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteEndpointOperation) Metadata ¶
func (op *DeleteEndpointOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteEndpointOperation) Name ¶
func (op *DeleteEndpointOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteEndpointOperation) Poll ¶
func (op *DeleteEndpointOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteEndpointOperation) Wait ¶
func (op *DeleteEndpointOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteHyperparameterTuningJobOperation ¶
type DeleteHyperparameterTuningJobOperation struct {
// contains filtered or unexported fields
}
DeleteHyperparameterTuningJobOperation manages a long-running operation from DeleteHyperparameterTuningJob.
func (*DeleteHyperparameterTuningJobOperation) Done ¶
func (op *DeleteHyperparameterTuningJobOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteHyperparameterTuningJobOperation) Metadata ¶
func (op *DeleteHyperparameterTuningJobOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteHyperparameterTuningJobOperation) Name ¶
func (op *DeleteHyperparameterTuningJobOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteHyperparameterTuningJobOperation) Poll ¶
func (op *DeleteHyperparameterTuningJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteHyperparameterTuningJobOperation) Wait ¶
func (op *DeleteHyperparameterTuningJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteIndexEndpointOperation ¶ added in v0.2.0
type DeleteIndexEndpointOperation struct {
// contains filtered or unexported fields
}
DeleteIndexEndpointOperation manages a long-running operation from DeleteIndexEndpoint.
func (*DeleteIndexEndpointOperation) Done ¶ added in v0.2.0
func (op *DeleteIndexEndpointOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteIndexEndpointOperation) Metadata ¶ added in v0.2.0
func (op *DeleteIndexEndpointOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteIndexEndpointOperation) Name ¶ added in v0.2.0
func (op *DeleteIndexEndpointOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteIndexEndpointOperation) Poll ¶ added in v0.2.0
func (op *DeleteIndexEndpointOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteIndexEndpointOperation) Wait ¶ added in v0.2.0
func (op *DeleteIndexEndpointOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteIndexOperation ¶ added in v0.2.0
type DeleteIndexOperation struct {
// contains filtered or unexported fields
}
DeleteIndexOperation manages a long-running operation from DeleteIndex.
func (*DeleteIndexOperation) Done ¶ added in v0.2.0
func (op *DeleteIndexOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteIndexOperation) Metadata ¶ added in v0.2.0
func (op *DeleteIndexOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteIndexOperation) Name ¶ added in v0.2.0
func (op *DeleteIndexOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteIndexOperation) Poll ¶ added in v0.2.0
func (op *DeleteIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteIndexOperation) Wait ¶ added in v0.2.0
func (op *DeleteIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteModelDeploymentMonitoringJobOperation ¶ added in v0.2.0
type DeleteModelDeploymentMonitoringJobOperation struct {
// contains filtered or unexported fields
}
DeleteModelDeploymentMonitoringJobOperation manages a long-running operation from DeleteModelDeploymentMonitoringJob.
func (*DeleteModelDeploymentMonitoringJobOperation) Done ¶ added in v0.2.0
func (op *DeleteModelDeploymentMonitoringJobOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteModelDeploymentMonitoringJobOperation) Metadata ¶ added in v0.2.0
func (op *DeleteModelDeploymentMonitoringJobOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteModelDeploymentMonitoringJobOperation) Name ¶ added in v0.2.0
func (op *DeleteModelDeploymentMonitoringJobOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteModelDeploymentMonitoringJobOperation) Poll ¶ added in v0.2.0
func (op *DeleteModelDeploymentMonitoringJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteModelDeploymentMonitoringJobOperation) Wait ¶ added in v0.2.0
func (op *DeleteModelDeploymentMonitoringJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteModelOperation ¶
type DeleteModelOperation struct {
// contains filtered or unexported fields
}
DeleteModelOperation manages a long-running operation from DeleteModel.
func (*DeleteModelOperation) Done ¶
func (op *DeleteModelOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteModelOperation) Metadata ¶
func (op *DeleteModelOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteModelOperation) Name ¶
func (op *DeleteModelOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteModelOperation) Poll ¶
func (op *DeleteModelOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteModelOperation) Wait ¶
func (op *DeleteModelOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeletePipelineJobOperation ¶
type DeletePipelineJobOperation struct {
// contains filtered or unexported fields
}
DeletePipelineJobOperation manages a long-running operation from DeletePipelineJob.
func (*DeletePipelineJobOperation) Done ¶
func (op *DeletePipelineJobOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeletePipelineJobOperation) Metadata ¶
func (op *DeletePipelineJobOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeletePipelineJobOperation) Name ¶
func (op *DeletePipelineJobOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeletePipelineJobOperation) Poll ¶
func (op *DeletePipelineJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeletePipelineJobOperation) Wait ¶
func (op *DeletePipelineJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteSpecialistPoolOperation ¶
type DeleteSpecialistPoolOperation struct {
// contains filtered or unexported fields
}
DeleteSpecialistPoolOperation manages a long-running operation from DeleteSpecialistPool.
func (*DeleteSpecialistPoolOperation) Done ¶
func (op *DeleteSpecialistPoolOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteSpecialistPoolOperation) Metadata ¶
func (op *DeleteSpecialistPoolOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteSpecialistPoolOperation) Name ¶
func (op *DeleteSpecialistPoolOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteSpecialistPoolOperation) Poll ¶
func (op *DeleteSpecialistPoolOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteSpecialistPoolOperation) Wait ¶
func (op *DeleteSpecialistPoolOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteTrainingPipelineOperation ¶
type DeleteTrainingPipelineOperation struct {
// contains filtered or unexported fields
}
DeleteTrainingPipelineOperation manages a long-running operation from DeleteTrainingPipeline.
func (*DeleteTrainingPipelineOperation) Done ¶
func (op *DeleteTrainingPipelineOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteTrainingPipelineOperation) Metadata ¶
func (op *DeleteTrainingPipelineOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteTrainingPipelineOperation) Name ¶
func (op *DeleteTrainingPipelineOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteTrainingPipelineOperation) Poll ¶
func (op *DeleteTrainingPipelineOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteTrainingPipelineOperation) Wait ¶
func (op *DeleteTrainingPipelineOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeployIndexOperation ¶ added in v0.2.0
type DeployIndexOperation struct {
// contains filtered or unexported fields
}
DeployIndexOperation manages a long-running operation from DeployIndex.
func (*DeployIndexOperation) Done ¶ added in v0.2.0
func (op *DeployIndexOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeployIndexOperation) Metadata ¶ added in v0.2.0
func (op *DeployIndexOperation) Metadata() (*aiplatformpb.DeployIndexOperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeployIndexOperation) Name ¶ added in v0.2.0
func (op *DeployIndexOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeployIndexOperation) Poll ¶ added in v0.2.0
func (op *DeployIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.DeployIndexResponse, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeployIndexOperation) Wait ¶ added in v0.2.0
func (op *DeployIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.DeployIndexResponse, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeployModelOperation ¶
type DeployModelOperation struct {
// contains filtered or unexported fields
}
DeployModelOperation manages a long-running operation from DeployModel.
func (*DeployModelOperation) Done ¶
func (op *DeployModelOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeployModelOperation) Metadata ¶
func (op *DeployModelOperation) Metadata() (*aiplatformpb.DeployModelOperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeployModelOperation) Name ¶
func (op *DeployModelOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeployModelOperation) Poll ¶
func (op *DeployModelOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.DeployModelResponse, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeployModelOperation) Wait ¶
func (op *DeployModelOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.DeployModelResponse, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type EndpointCallOptions ¶
type EndpointCallOptions struct { CreateEndpoint []gax.CallOption GetEndpoint []gax.CallOption ListEndpoints []gax.CallOption UpdateEndpoint []gax.CallOption DeleteEndpoint []gax.CallOption DeployModel []gax.CallOption UndeployModel []gax.CallOption }
EndpointCallOptions contains the retry settings for each method of EndpointClient.
type EndpointClient ¶
type EndpointClient struct { // The call options for this service. CallOptions *EndpointCallOptions // LROClient is used internally to handle long-running operations. // It is exposed so that its CallOptions can be modified if required. // Users should not Close this client. LROClient *lroauto.OperationsClient // contains filtered or unexported fields }
EndpointClient is a client for interacting with Vertex AI API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
A service for managing Vertex AI’s Endpoints.
func NewEndpointClient ¶
func NewEndpointClient(ctx context.Context, opts ...option.ClientOption) (*EndpointClient, error)
NewEndpointClient creates a new endpoint service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
A service for managing Vertex AI’s Endpoints.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" ) func main() { ctx := context.Background() c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*EndpointClient) Close ¶
func (c *EndpointClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*EndpointClient) Connection ¶
func (c *EndpointClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*EndpointClient) CreateEndpoint ¶
func (c *EndpointClient) CreateEndpoint(ctx context.Context, req *aiplatformpb.CreateEndpointRequest, opts ...gax.CallOption) (*CreateEndpointOperation, error)
CreateEndpoint creates an Endpoint.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.CreateEndpointRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateEndpointRequest. } op, err := c.CreateEndpoint(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*EndpointClient) CreateEndpointOperation ¶
func (c *EndpointClient) CreateEndpointOperation(name string) *CreateEndpointOperation
CreateEndpointOperation returns a new CreateEndpointOperation from a given name. The name must be that of a previously created CreateEndpointOperation, possibly from a different process.
func (*EndpointClient) DeleteEndpoint ¶
func (c *EndpointClient) DeleteEndpoint(ctx context.Context, req *aiplatformpb.DeleteEndpointRequest, opts ...gax.CallOption) (*DeleteEndpointOperation, error)
DeleteEndpoint deletes an Endpoint.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.DeleteEndpointRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteEndpointRequest. } op, err := c.DeleteEndpoint(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*EndpointClient) DeleteEndpointOperation ¶
func (c *EndpointClient) DeleteEndpointOperation(name string) *DeleteEndpointOperation
DeleteEndpointOperation returns a new DeleteEndpointOperation from a given name. The name must be that of a previously created DeleteEndpointOperation, possibly from a different process.
func (*EndpointClient) DeployModel ¶
func (c *EndpointClient) DeployModel(ctx context.Context, req *aiplatformpb.DeployModelRequest, opts ...gax.CallOption) (*DeployModelOperation, error)
DeployModel deploys a Model into this Endpoint, creating a DeployedModel within it.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.DeployModelRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeployModelRequest. } op, err := c.DeployModel(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*EndpointClient) DeployModelOperation ¶
func (c *EndpointClient) DeployModelOperation(name string) *DeployModelOperation
DeployModelOperation returns a new DeployModelOperation from a given name. The name must be that of a previously created DeployModelOperation, possibly from a different process.
func (*EndpointClient) GetEndpoint ¶
func (c *EndpointClient) GetEndpoint(ctx context.Context, req *aiplatformpb.GetEndpointRequest, opts ...gax.CallOption) (*aiplatformpb.Endpoint, error)
GetEndpoint gets an Endpoint.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.GetEndpointRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetEndpointRequest. } resp, err := c.GetEndpoint(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*EndpointClient) ListEndpoints ¶
func (c *EndpointClient) ListEndpoints(ctx context.Context, req *aiplatformpb.ListEndpointsRequest, opts ...gax.CallOption) *EndpointIterator
ListEndpoints lists Endpoints in a Location.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" "google.golang.org/api/iterator" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.ListEndpointsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListEndpointsRequest. } it := c.ListEndpoints(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*EndpointClient) UndeployModel ¶
func (c *EndpointClient) UndeployModel(ctx context.Context, req *aiplatformpb.UndeployModelRequest, opts ...gax.CallOption) (*UndeployModelOperation, error)
UndeployModel undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources it’s using.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.UndeployModelRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UndeployModelRequest. } op, err := c.UndeployModel(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*EndpointClient) UndeployModelOperation ¶
func (c *EndpointClient) UndeployModelOperation(name string) *UndeployModelOperation
UndeployModelOperation returns a new UndeployModelOperation from a given name. The name must be that of a previously created UndeployModelOperation, possibly from a different process.
func (*EndpointClient) UpdateEndpoint ¶
func (c *EndpointClient) UpdateEndpoint(ctx context.Context, req *aiplatformpb.UpdateEndpointRequest, opts ...gax.CallOption) (*aiplatformpb.Endpoint, error)
UpdateEndpoint updates an Endpoint.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.UpdateEndpointRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UpdateEndpointRequest. } resp, err := c.UpdateEndpoint(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type EndpointIterator ¶
type EndpointIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*aiplatformpb.Endpoint, nextPageToken string, err error) // contains filtered or unexported fields }
EndpointIterator manages a stream of *aiplatformpb.Endpoint.
func (*EndpointIterator) Next ¶
func (it *EndpointIterator) Next() (*aiplatformpb.Endpoint, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*EndpointIterator) PageInfo ¶
func (it *EndpointIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type ExportDataOperation ¶
type ExportDataOperation struct {
// contains filtered or unexported fields
}
ExportDataOperation manages a long-running operation from ExportData.
func (*ExportDataOperation) Done ¶
func (op *ExportDataOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*ExportDataOperation) Metadata ¶
func (op *ExportDataOperation) Metadata() (*aiplatformpb.ExportDataOperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*ExportDataOperation) Name ¶
func (op *ExportDataOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*ExportDataOperation) Poll ¶
func (op *ExportDataOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.ExportDataResponse, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*ExportDataOperation) Wait ¶
func (op *ExportDataOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.ExportDataResponse, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type ExportModelOperation ¶
type ExportModelOperation struct {
// contains filtered or unexported fields
}
ExportModelOperation manages a long-running operation from ExportModel.
func (*ExportModelOperation) Done ¶
func (op *ExportModelOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*ExportModelOperation) Metadata ¶
func (op *ExportModelOperation) Metadata() (*aiplatformpb.ExportModelOperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*ExportModelOperation) Name ¶
func (op *ExportModelOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*ExportModelOperation) Poll ¶
func (op *ExportModelOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.ExportModelResponse, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*ExportModelOperation) Wait ¶
func (op *ExportModelOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.ExportModelResponse, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type HyperparameterTuningJobIterator ¶
type HyperparameterTuningJobIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*aiplatformpb.HyperparameterTuningJob, nextPageToken string, err error) // contains filtered or unexported fields }
HyperparameterTuningJobIterator manages a stream of *aiplatformpb.HyperparameterTuningJob.
func (*HyperparameterTuningJobIterator) Next ¶
func (it *HyperparameterTuningJobIterator) Next() (*aiplatformpb.HyperparameterTuningJob, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*HyperparameterTuningJobIterator) PageInfo ¶
func (it *HyperparameterTuningJobIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type ImportDataOperation ¶
type ImportDataOperation struct {
// contains filtered or unexported fields
}
ImportDataOperation manages a long-running operation from ImportData.
func (*ImportDataOperation) Done ¶
func (op *ImportDataOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*ImportDataOperation) Metadata ¶
func (op *ImportDataOperation) Metadata() (*aiplatformpb.ImportDataOperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*ImportDataOperation) Name ¶
func (op *ImportDataOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*ImportDataOperation) Poll ¶
func (op *ImportDataOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.ImportDataResponse, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*ImportDataOperation) Wait ¶
func (op *ImportDataOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.ImportDataResponse, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type IndexCallOptions ¶ added in v0.2.0
type IndexCallOptions struct { CreateIndex []gax.CallOption GetIndex []gax.CallOption ListIndexes []gax.CallOption UpdateIndex []gax.CallOption DeleteIndex []gax.CallOption }
IndexCallOptions contains the retry settings for each method of IndexClient.
type IndexClient ¶ added in v0.2.0
type IndexClient struct { // The call options for this service. CallOptions *IndexCallOptions // LROClient is used internally to handle long-running operations. // It is exposed so that its CallOptions can be modified if required. // Users should not Close this client. LROClient *lroauto.OperationsClient // contains filtered or unexported fields }
IndexClient is a client for interacting with Vertex AI API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
A service for creating and managing Vertex AI’s Index resources.
func NewIndexClient ¶ added in v0.2.0
func NewIndexClient(ctx context.Context, opts ...option.ClientOption) (*IndexClient, error)
NewIndexClient creates a new index service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
A service for creating and managing Vertex AI’s Index resources.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" ) func main() { ctx := context.Background() c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*IndexClient) Close ¶ added in v0.2.0
func (c *IndexClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*IndexClient) Connection ¶ added in v0.2.0
func (c *IndexClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*IndexClient) CreateIndex ¶ added in v0.2.0
func (c *IndexClient) CreateIndex(ctx context.Context, req *aiplatformpb.CreateIndexRequest, opts ...gax.CallOption) (*CreateIndexOperation, error)
CreateIndex creates an Index.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.CreateIndexRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateIndexRequest. } op, err := c.CreateIndex(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*IndexClient) CreateIndexOperation ¶ added in v0.2.0
func (c *IndexClient) CreateIndexOperation(name string) *CreateIndexOperation
CreateIndexOperation returns a new CreateIndexOperation from a given name. The name must be that of a previously created CreateIndexOperation, possibly from a different process.
func (*IndexClient) DeleteIndex ¶ added in v0.2.0
func (c *IndexClient) DeleteIndex(ctx context.Context, req *aiplatformpb.DeleteIndexRequest, opts ...gax.CallOption) (*DeleteIndexOperation, error)
DeleteIndex deletes an Index. An Index can only be deleted when all its DeployedIndexes had been undeployed.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.DeleteIndexRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteIndexRequest. } op, err := c.DeleteIndex(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*IndexClient) DeleteIndexOperation ¶ added in v0.2.0
func (c *IndexClient) DeleteIndexOperation(name string) *DeleteIndexOperation
DeleteIndexOperation returns a new DeleteIndexOperation from a given name. The name must be that of a previously created DeleteIndexOperation, possibly from a different process.
func (*IndexClient) GetIndex ¶ added in v0.2.0
func (c *IndexClient) GetIndex(ctx context.Context, req *aiplatformpb.GetIndexRequest, opts ...gax.CallOption) (*aiplatformpb.Index, error)
GetIndex gets an Index.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.GetIndexRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetIndexRequest. } resp, err := c.GetIndex(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*IndexClient) ListIndexes ¶ added in v0.2.0
func (c *IndexClient) ListIndexes(ctx context.Context, req *aiplatformpb.ListIndexesRequest, opts ...gax.CallOption) *IndexIterator
ListIndexes lists Indexes in a Location.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" "google.golang.org/api/iterator" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.ListIndexesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListIndexesRequest. } it := c.ListIndexes(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*IndexClient) UpdateIndex ¶ added in v0.2.0
func (c *IndexClient) UpdateIndex(ctx context.Context, req *aiplatformpb.UpdateIndexRequest, opts ...gax.CallOption) (*UpdateIndexOperation, error)
UpdateIndex updates an Index.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.UpdateIndexRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UpdateIndexRequest. } op, err := c.UpdateIndex(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*IndexClient) UpdateIndexOperation ¶ added in v0.2.0
func (c *IndexClient) UpdateIndexOperation(name string) *UpdateIndexOperation
UpdateIndexOperation returns a new UpdateIndexOperation from a given name. The name must be that of a previously created UpdateIndexOperation, possibly from a different process.
type IndexEndpointCallOptions ¶ added in v0.2.0
type IndexEndpointCallOptions struct { CreateIndexEndpoint []gax.CallOption GetIndexEndpoint []gax.CallOption ListIndexEndpoints []gax.CallOption UpdateIndexEndpoint []gax.CallOption DeleteIndexEndpoint []gax.CallOption DeployIndex []gax.CallOption UndeployIndex []gax.CallOption }
IndexEndpointCallOptions contains the retry settings for each method of IndexEndpointClient.
type IndexEndpointClient ¶ added in v0.2.0
type IndexEndpointClient struct { // The call options for this service. CallOptions *IndexEndpointCallOptions // LROClient is used internally to handle long-running operations. // It is exposed so that its CallOptions can be modified if required. // Users should not Close this client. LROClient *lroauto.OperationsClient // contains filtered or unexported fields }
IndexEndpointClient is a client for interacting with Vertex AI API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
A service for managing Vertex AI’s IndexEndpoints.
func NewIndexEndpointClient ¶ added in v0.2.0
func NewIndexEndpointClient(ctx context.Context, opts ...option.ClientOption) (*IndexEndpointClient, error)
NewIndexEndpointClient creates a new index endpoint service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
A service for managing Vertex AI’s IndexEndpoints.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" ) func main() { ctx := context.Background() c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*IndexEndpointClient) Close ¶ added in v0.2.0
func (c *IndexEndpointClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*IndexEndpointClient) Connection ¶ added in v0.2.0
func (c *IndexEndpointClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*IndexEndpointClient) CreateIndexEndpoint ¶ added in v0.2.0
func (c *IndexEndpointClient) CreateIndexEndpoint(ctx context.Context, req *aiplatformpb.CreateIndexEndpointRequest, opts ...gax.CallOption) (*CreateIndexEndpointOperation, error)
CreateIndexEndpoint creates an IndexEndpoint.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.CreateIndexEndpointRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateIndexEndpointRequest. } op, err := c.CreateIndexEndpoint(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*IndexEndpointClient) CreateIndexEndpointOperation ¶ added in v0.2.0
func (c *IndexEndpointClient) CreateIndexEndpointOperation(name string) *CreateIndexEndpointOperation
CreateIndexEndpointOperation returns a new CreateIndexEndpointOperation from a given name. The name must be that of a previously created CreateIndexEndpointOperation, possibly from a different process.
func (*IndexEndpointClient) DeleteIndexEndpoint ¶ added in v0.2.0
func (c *IndexEndpointClient) DeleteIndexEndpoint(ctx context.Context, req *aiplatformpb.DeleteIndexEndpointRequest, opts ...gax.CallOption) (*DeleteIndexEndpointOperation, error)
DeleteIndexEndpoint deletes an IndexEndpoint.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.DeleteIndexEndpointRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteIndexEndpointRequest. } op, err := c.DeleteIndexEndpoint(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*IndexEndpointClient) DeleteIndexEndpointOperation ¶ added in v0.2.0
func (c *IndexEndpointClient) DeleteIndexEndpointOperation(name string) *DeleteIndexEndpointOperation
DeleteIndexEndpointOperation returns a new DeleteIndexEndpointOperation from a given name. The name must be that of a previously created DeleteIndexEndpointOperation, possibly from a different process.
func (*IndexEndpointClient) DeployIndex ¶ added in v0.2.0
func (c *IndexEndpointClient) DeployIndex(ctx context.Context, req *aiplatformpb.DeployIndexRequest, opts ...gax.CallOption) (*DeployIndexOperation, error)
DeployIndex deploys an Index into this IndexEndpoint, creating a DeployedIndex within it. Only non-empty Indexes can be deployed.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.DeployIndexRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeployIndexRequest. } op, err := c.DeployIndex(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*IndexEndpointClient) DeployIndexOperation ¶ added in v0.2.0
func (c *IndexEndpointClient) DeployIndexOperation(name string) *DeployIndexOperation
DeployIndexOperation returns a new DeployIndexOperation from a given name. The name must be that of a previously created DeployIndexOperation, possibly from a different process.
func (*IndexEndpointClient) GetIndexEndpoint ¶ added in v0.2.0
func (c *IndexEndpointClient) GetIndexEndpoint(ctx context.Context, req *aiplatformpb.GetIndexEndpointRequest, opts ...gax.CallOption) (*aiplatformpb.IndexEndpoint, error)
GetIndexEndpoint gets an IndexEndpoint.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.GetIndexEndpointRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetIndexEndpointRequest. } resp, err := c.GetIndexEndpoint(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*IndexEndpointClient) ListIndexEndpoints ¶ added in v0.2.0
func (c *IndexEndpointClient) ListIndexEndpoints(ctx context.Context, req *aiplatformpb.ListIndexEndpointsRequest, opts ...gax.CallOption) *IndexEndpointIterator
ListIndexEndpoints lists IndexEndpoints in a Location.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" "google.golang.org/api/iterator" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.ListIndexEndpointsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListIndexEndpointsRequest. } it := c.ListIndexEndpoints(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*IndexEndpointClient) UndeployIndex ¶ added in v0.2.0
func (c *IndexEndpointClient) UndeployIndex(ctx context.Context, req *aiplatformpb.UndeployIndexRequest, opts ...gax.CallOption) (*UndeployIndexOperation, error)
UndeployIndex undeploys an Index from an IndexEndpoint, removing a DeployedIndex from it, and freeing all resources it’s using.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.UndeployIndexRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UndeployIndexRequest. } op, err := c.UndeployIndex(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*IndexEndpointClient) UndeployIndexOperation ¶ added in v0.2.0
func (c *IndexEndpointClient) UndeployIndexOperation(name string) *UndeployIndexOperation
UndeployIndexOperation returns a new UndeployIndexOperation from a given name. The name must be that of a previously created UndeployIndexOperation, possibly from a different process.
func (*IndexEndpointClient) UpdateIndexEndpoint ¶ added in v0.2.0
func (c *IndexEndpointClient) UpdateIndexEndpoint(ctx context.Context, req *aiplatformpb.UpdateIndexEndpointRequest, opts ...gax.CallOption) (*aiplatformpb.IndexEndpoint, error)
UpdateIndexEndpoint updates an IndexEndpoint.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.UpdateIndexEndpointRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UpdateIndexEndpointRequest. } resp, err := c.UpdateIndexEndpoint(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type IndexEndpointIterator ¶ added in v0.2.0
type IndexEndpointIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*aiplatformpb.IndexEndpoint, nextPageToken string, err error) // contains filtered or unexported fields }
IndexEndpointIterator manages a stream of *aiplatformpb.IndexEndpoint.
func (*IndexEndpointIterator) Next ¶ added in v0.2.0
func (it *IndexEndpointIterator) Next() (*aiplatformpb.IndexEndpoint, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*IndexEndpointIterator) PageInfo ¶ added in v0.2.0
func (it *IndexEndpointIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type IndexIterator ¶ added in v0.2.0
type IndexIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*aiplatformpb.Index, nextPageToken string, err error) // contains filtered or unexported fields }
IndexIterator manages a stream of *aiplatformpb.Index.
func (*IndexIterator) Next ¶ added in v0.2.0
func (it *IndexIterator) Next() (*aiplatformpb.Index, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*IndexIterator) PageInfo ¶ added in v0.2.0
func (it *IndexIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type JobCallOptions ¶
type JobCallOptions struct { CreateCustomJob []gax.CallOption GetCustomJob []gax.CallOption ListCustomJobs []gax.CallOption DeleteCustomJob []gax.CallOption CancelCustomJob []gax.CallOption CreateDataLabelingJob []gax.CallOption GetDataLabelingJob []gax.CallOption ListDataLabelingJobs []gax.CallOption DeleteDataLabelingJob []gax.CallOption CancelDataLabelingJob []gax.CallOption CreateHyperparameterTuningJob []gax.CallOption GetHyperparameterTuningJob []gax.CallOption ListHyperparameterTuningJobs []gax.CallOption DeleteHyperparameterTuningJob []gax.CallOption CancelHyperparameterTuningJob []gax.CallOption CreateBatchPredictionJob []gax.CallOption GetBatchPredictionJob []gax.CallOption ListBatchPredictionJobs []gax.CallOption DeleteBatchPredictionJob []gax.CallOption CancelBatchPredictionJob []gax.CallOption CreateModelDeploymentMonitoringJob []gax.CallOption SearchModelDeploymentMonitoringStatsAnomalies []gax.CallOption GetModelDeploymentMonitoringJob []gax.CallOption ListModelDeploymentMonitoringJobs []gax.CallOption UpdateModelDeploymentMonitoringJob []gax.CallOption DeleteModelDeploymentMonitoringJob []gax.CallOption PauseModelDeploymentMonitoringJob []gax.CallOption ResumeModelDeploymentMonitoringJob []gax.CallOption }
JobCallOptions contains the retry settings for each method of JobClient.
type JobClient ¶
type JobClient struct { // The call options for this service. CallOptions *JobCallOptions // LROClient is used internally to handle long-running operations. // It is exposed so that its CallOptions can be modified if required. // Users should not Close this client. LROClient *lroauto.OperationsClient // contains filtered or unexported fields }
JobClient is a client for interacting with Vertex AI API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
A service for creating and managing Vertex AI’s jobs.
func NewJobClient ¶
NewJobClient creates a new job service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
A service for creating and managing Vertex AI’s jobs.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" ) func main() { ctx := context.Background() c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*JobClient) CancelBatchPredictionJob ¶
func (c *JobClient) CancelBatchPredictionJob(ctx context.Context, req *aiplatformpb.CancelBatchPredictionJobRequest, opts ...gax.CallOption) error
CancelBatchPredictionJob cancels a BatchPredictionJob.
Starts asynchronous cancellation on the BatchPredictionJob. The server makes the best effort to cancel the job, but success is not guaranteed. Clients can use JobService.GetBatchPredictionJob or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On a successful cancellation, the BatchPredictionJob is not deleted;instead its BatchPredictionJob.state is set to CANCELLED. Any files already outputted by the job are not deleted.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.CancelBatchPredictionJobRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CancelBatchPredictionJobRequest. } err = c.CancelBatchPredictionJob(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*JobClient) CancelCustomJob ¶
func (c *JobClient) CancelCustomJob(ctx context.Context, req *aiplatformpb.CancelCustomJobRequest, opts ...gax.CallOption) error
CancelCustomJob cancels a CustomJob. Starts asynchronous cancellation on the CustomJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use JobService.GetCustomJob or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the CustomJob is not deleted; instead it becomes a job with a CustomJob.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED, and CustomJob.state is set to CANCELLED.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.CancelCustomJobRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CancelCustomJobRequest. } err = c.CancelCustomJob(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*JobClient) CancelDataLabelingJob ¶
func (c *JobClient) CancelDataLabelingJob(ctx context.Context, req *aiplatformpb.CancelDataLabelingJobRequest, opts ...gax.CallOption) error
CancelDataLabelingJob cancels a DataLabelingJob. Success of cancellation is not guaranteed.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.CancelDataLabelingJobRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CancelDataLabelingJobRequest. } err = c.CancelDataLabelingJob(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*JobClient) CancelHyperparameterTuningJob ¶
func (c *JobClient) CancelHyperparameterTuningJob(ctx context.Context, req *aiplatformpb.CancelHyperparameterTuningJobRequest, opts ...gax.CallOption) error
CancelHyperparameterTuningJob cancels a HyperparameterTuningJob. Starts asynchronous cancellation on the HyperparameterTuningJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use JobService.GetHyperparameterTuningJob or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the HyperparameterTuningJob is not deleted; instead it becomes a job with a HyperparameterTuningJob.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED, and HyperparameterTuningJob.state is set to CANCELLED.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.CancelHyperparameterTuningJobRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CancelHyperparameterTuningJobRequest. } err = c.CancelHyperparameterTuningJob(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*JobClient) Close ¶
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*JobClient) Connection ¶
func (c *JobClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*JobClient) CreateBatchPredictionJob ¶
func (c *JobClient) CreateBatchPredictionJob(ctx context.Context, req *aiplatformpb.CreateBatchPredictionJobRequest, opts ...gax.CallOption) (*aiplatformpb.BatchPredictionJob, error)
CreateBatchPredictionJob creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to start.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.CreateBatchPredictionJobRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateBatchPredictionJobRequest. } resp, err := c.CreateBatchPredictionJob(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*JobClient) CreateCustomJob ¶
func (c *JobClient) CreateCustomJob(ctx context.Context, req *aiplatformpb.CreateCustomJobRequest, opts ...gax.CallOption) (*aiplatformpb.CustomJob, error)
CreateCustomJob creates a CustomJob. A created CustomJob right away will be attempted to be run.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.CreateCustomJobRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateCustomJobRequest. } resp, err := c.CreateCustomJob(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*JobClient) CreateDataLabelingJob ¶
func (c *JobClient) CreateDataLabelingJob(ctx context.Context, req *aiplatformpb.CreateDataLabelingJobRequest, opts ...gax.CallOption) (*aiplatformpb.DataLabelingJob, error)
CreateDataLabelingJob creates a DataLabelingJob.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.CreateDataLabelingJobRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateDataLabelingJobRequest. } resp, err := c.CreateDataLabelingJob(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*JobClient) CreateHyperparameterTuningJob ¶
func (c *JobClient) CreateHyperparameterTuningJob(ctx context.Context, req *aiplatformpb.CreateHyperparameterTuningJobRequest, opts ...gax.CallOption) (*aiplatformpb.HyperparameterTuningJob, error)
CreateHyperparameterTuningJob creates a HyperparameterTuningJob
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.CreateHyperparameterTuningJobRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateHyperparameterTuningJobRequest. } resp, err := c.CreateHyperparameterTuningJob(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*JobClient) CreateModelDeploymentMonitoringJob ¶ added in v0.2.0
func (c *JobClient) CreateModelDeploymentMonitoringJob(ctx context.Context, req *aiplatformpb.CreateModelDeploymentMonitoringJobRequest, opts ...gax.CallOption) (*aiplatformpb.ModelDeploymentMonitoringJob, error)
CreateModelDeploymentMonitoringJob creates a ModelDeploymentMonitoringJob. It will run periodically on a configured interval.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.CreateModelDeploymentMonitoringJobRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateModelDeploymentMonitoringJobRequest. } resp, err := c.CreateModelDeploymentMonitoringJob(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*JobClient) DeleteBatchPredictionJob ¶
func (c *JobClient) DeleteBatchPredictionJob(ctx context.Context, req *aiplatformpb.DeleteBatchPredictionJobRequest, opts ...gax.CallOption) (*DeleteBatchPredictionJobOperation, error)
DeleteBatchPredictionJob deletes a BatchPredictionJob. Can only be called on jobs that already finished.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.DeleteBatchPredictionJobRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteBatchPredictionJobRequest. } op, err := c.DeleteBatchPredictionJob(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*JobClient) DeleteBatchPredictionJobOperation ¶
func (c *JobClient) DeleteBatchPredictionJobOperation(name string) *DeleteBatchPredictionJobOperation
DeleteBatchPredictionJobOperation returns a new DeleteBatchPredictionJobOperation from a given name. The name must be that of a previously created DeleteBatchPredictionJobOperation, possibly from a different process.
func (*JobClient) DeleteCustomJob ¶
func (c *JobClient) DeleteCustomJob(ctx context.Context, req *aiplatformpb.DeleteCustomJobRequest, opts ...gax.CallOption) (*DeleteCustomJobOperation, error)
DeleteCustomJob deletes a CustomJob.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.DeleteCustomJobRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteCustomJobRequest. } op, err := c.DeleteCustomJob(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*JobClient) DeleteCustomJobOperation ¶
func (c *JobClient) DeleteCustomJobOperation(name string) *DeleteCustomJobOperation
DeleteCustomJobOperation returns a new DeleteCustomJobOperation from a given name. The name must be that of a previously created DeleteCustomJobOperation, possibly from a different process.
func (*JobClient) DeleteDataLabelingJob ¶
func (c *JobClient) DeleteDataLabelingJob(ctx context.Context, req *aiplatformpb.DeleteDataLabelingJobRequest, opts ...gax.CallOption) (*DeleteDataLabelingJobOperation, error)
DeleteDataLabelingJob deletes a DataLabelingJob.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.DeleteDataLabelingJobRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteDataLabelingJobRequest. } op, err := c.DeleteDataLabelingJob(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*JobClient) DeleteDataLabelingJobOperation ¶
func (c *JobClient) DeleteDataLabelingJobOperation(name string) *DeleteDataLabelingJobOperation
DeleteDataLabelingJobOperation returns a new DeleteDataLabelingJobOperation from a given name. The name must be that of a previously created DeleteDataLabelingJobOperation, possibly from a different process.
func (*JobClient) DeleteHyperparameterTuningJob ¶
func (c *JobClient) DeleteHyperparameterTuningJob(ctx context.Context, req *aiplatformpb.DeleteHyperparameterTuningJobRequest, opts ...gax.CallOption) (*DeleteHyperparameterTuningJobOperation, error)
DeleteHyperparameterTuningJob deletes a HyperparameterTuningJob.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.DeleteHyperparameterTuningJobRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteHyperparameterTuningJobRequest. } op, err := c.DeleteHyperparameterTuningJob(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*JobClient) DeleteHyperparameterTuningJobOperation ¶
func (c *JobClient) DeleteHyperparameterTuningJobOperation(name string) *DeleteHyperparameterTuningJobOperation
DeleteHyperparameterTuningJobOperation returns a new DeleteHyperparameterTuningJobOperation from a given name. The name must be that of a previously created DeleteHyperparameterTuningJobOperation, possibly from a different process.
func (*JobClient) DeleteModelDeploymentMonitoringJob ¶ added in v0.2.0
func (c *JobClient) DeleteModelDeploymentMonitoringJob(ctx context.Context, req *aiplatformpb.DeleteModelDeploymentMonitoringJobRequest, opts ...gax.CallOption) (*DeleteModelDeploymentMonitoringJobOperation, error)
DeleteModelDeploymentMonitoringJob deletes a ModelDeploymentMonitoringJob.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.DeleteModelDeploymentMonitoringJobRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteModelDeploymentMonitoringJobRequest. } op, err := c.DeleteModelDeploymentMonitoringJob(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*JobClient) DeleteModelDeploymentMonitoringJobOperation ¶ added in v0.2.0
func (c *JobClient) DeleteModelDeploymentMonitoringJobOperation(name string) *DeleteModelDeploymentMonitoringJobOperation
DeleteModelDeploymentMonitoringJobOperation returns a new DeleteModelDeploymentMonitoringJobOperation from a given name. The name must be that of a previously created DeleteModelDeploymentMonitoringJobOperation, possibly from a different process.
func (*JobClient) GetBatchPredictionJob ¶
func (c *JobClient) GetBatchPredictionJob(ctx context.Context, req *aiplatformpb.GetBatchPredictionJobRequest, opts ...gax.CallOption) (*aiplatformpb.BatchPredictionJob, error)
GetBatchPredictionJob gets a BatchPredictionJob
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.GetBatchPredictionJobRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetBatchPredictionJobRequest. } resp, err := c.GetBatchPredictionJob(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*JobClient) GetCustomJob ¶
func (c *JobClient) GetCustomJob(ctx context.Context, req *aiplatformpb.GetCustomJobRequest, opts ...gax.CallOption) (*aiplatformpb.CustomJob, error)
GetCustomJob gets a CustomJob.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.GetCustomJobRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetCustomJobRequest. } resp, err := c.GetCustomJob(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*JobClient) GetDataLabelingJob ¶
func (c *JobClient) GetDataLabelingJob(ctx context.Context, req *aiplatformpb.GetDataLabelingJobRequest, opts ...gax.CallOption) (*aiplatformpb.DataLabelingJob, error)
GetDataLabelingJob gets a DataLabelingJob.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.GetDataLabelingJobRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetDataLabelingJobRequest. } resp, err := c.GetDataLabelingJob(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*JobClient) GetHyperparameterTuningJob ¶
func (c *JobClient) GetHyperparameterTuningJob(ctx context.Context, req *aiplatformpb.GetHyperparameterTuningJobRequest, opts ...gax.CallOption) (*aiplatformpb.HyperparameterTuningJob, error)
GetHyperparameterTuningJob gets a HyperparameterTuningJob
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.GetHyperparameterTuningJobRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetHyperparameterTuningJobRequest. } resp, err := c.GetHyperparameterTuningJob(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*JobClient) GetModelDeploymentMonitoringJob ¶ added in v0.2.0
func (c *JobClient) GetModelDeploymentMonitoringJob(ctx context.Context, req *aiplatformpb.GetModelDeploymentMonitoringJobRequest, opts ...gax.CallOption) (*aiplatformpb.ModelDeploymentMonitoringJob, error)
GetModelDeploymentMonitoringJob gets a ModelDeploymentMonitoringJob.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.GetModelDeploymentMonitoringJobRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetModelDeploymentMonitoringJobRequest. } resp, err := c.GetModelDeploymentMonitoringJob(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*JobClient) ListBatchPredictionJobs ¶
func (c *JobClient) ListBatchPredictionJobs(ctx context.Context, req *aiplatformpb.ListBatchPredictionJobsRequest, opts ...gax.CallOption) *BatchPredictionJobIterator
ListBatchPredictionJobs lists BatchPredictionJobs in a Location.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" "google.golang.org/api/iterator" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.ListBatchPredictionJobsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListBatchPredictionJobsRequest. } it := c.ListBatchPredictionJobs(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*JobClient) ListCustomJobs ¶
func (c *JobClient) ListCustomJobs(ctx context.Context, req *aiplatformpb.ListCustomJobsRequest, opts ...gax.CallOption) *CustomJobIterator
ListCustomJobs lists CustomJobs in a Location.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" "google.golang.org/api/iterator" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.ListCustomJobsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListCustomJobsRequest. } it := c.ListCustomJobs(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*JobClient) ListDataLabelingJobs ¶
func (c *JobClient) ListDataLabelingJobs(ctx context.Context, req *aiplatformpb.ListDataLabelingJobsRequest, opts ...gax.CallOption) *DataLabelingJobIterator
ListDataLabelingJobs lists DataLabelingJobs in a Location.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" "google.golang.org/api/iterator" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.ListDataLabelingJobsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListDataLabelingJobsRequest. } it := c.ListDataLabelingJobs(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*JobClient) ListHyperparameterTuningJobs ¶
func (c *JobClient) ListHyperparameterTuningJobs(ctx context.Context, req *aiplatformpb.ListHyperparameterTuningJobsRequest, opts ...gax.CallOption) *HyperparameterTuningJobIterator
ListHyperparameterTuningJobs lists HyperparameterTuningJobs in a Location.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" "google.golang.org/api/iterator" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.ListHyperparameterTuningJobsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListHyperparameterTuningJobsRequest. } it := c.ListHyperparameterTuningJobs(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*JobClient) ListModelDeploymentMonitoringJobs ¶ added in v0.2.0
func (c *JobClient) ListModelDeploymentMonitoringJobs(ctx context.Context, req *aiplatformpb.ListModelDeploymentMonitoringJobsRequest, opts ...gax.CallOption) *ModelDeploymentMonitoringJobIterator
ListModelDeploymentMonitoringJobs lists ModelDeploymentMonitoringJobs in a Location.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" "google.golang.org/api/iterator" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.ListModelDeploymentMonitoringJobsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListModelDeploymentMonitoringJobsRequest. } it := c.ListModelDeploymentMonitoringJobs(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*JobClient) PauseModelDeploymentMonitoringJob ¶ added in v0.2.0
func (c *JobClient) PauseModelDeploymentMonitoringJob(ctx context.Context, req *aiplatformpb.PauseModelDeploymentMonitoringJobRequest, opts ...gax.CallOption) error
PauseModelDeploymentMonitoringJob pauses a ModelDeploymentMonitoringJob. If the job is running, the server makes a best effort to cancel the job. Will mark ModelDeploymentMonitoringJob.state to ‘PAUSED’.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.PauseModelDeploymentMonitoringJobRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#PauseModelDeploymentMonitoringJobRequest. } err = c.PauseModelDeploymentMonitoringJob(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*JobClient) ResumeModelDeploymentMonitoringJob ¶ added in v0.2.0
func (c *JobClient) ResumeModelDeploymentMonitoringJob(ctx context.Context, req *aiplatformpb.ResumeModelDeploymentMonitoringJobRequest, opts ...gax.CallOption) error
ResumeModelDeploymentMonitoringJob resumes a paused ModelDeploymentMonitoringJob. It will start to run from next scheduled time. A deleted ModelDeploymentMonitoringJob can’t be resumed.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.ResumeModelDeploymentMonitoringJobRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ResumeModelDeploymentMonitoringJobRequest. } err = c.ResumeModelDeploymentMonitoringJob(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*JobClient) SearchModelDeploymentMonitoringStatsAnomalies ¶ added in v0.2.0
func (c *JobClient) SearchModelDeploymentMonitoringStatsAnomalies(ctx context.Context, req *aiplatformpb.SearchModelDeploymentMonitoringStatsAnomaliesRequest, opts ...gax.CallOption) *ModelMonitoringStatsAnomaliesIterator
SearchModelDeploymentMonitoringStatsAnomalies searches Model Monitoring Statistics generated within a given time window.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" "google.golang.org/api/iterator" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.SearchModelDeploymentMonitoringStatsAnomaliesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#SearchModelDeploymentMonitoringStatsAnomaliesRequest. } it := c.SearchModelDeploymentMonitoringStatsAnomalies(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*JobClient) UpdateModelDeploymentMonitoringJob ¶ added in v0.2.0
func (c *JobClient) UpdateModelDeploymentMonitoringJob(ctx context.Context, req *aiplatformpb.UpdateModelDeploymentMonitoringJobRequest, opts ...gax.CallOption) (*UpdateModelDeploymentMonitoringJobOperation, error)
UpdateModelDeploymentMonitoringJob updates a ModelDeploymentMonitoringJob.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.UpdateModelDeploymentMonitoringJobRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UpdateModelDeploymentMonitoringJobRequest. } op, err := c.UpdateModelDeploymentMonitoringJob(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*JobClient) UpdateModelDeploymentMonitoringJobOperation ¶ added in v0.2.0
func (c *JobClient) UpdateModelDeploymentMonitoringJobOperation(name string) *UpdateModelDeploymentMonitoringJobOperation
UpdateModelDeploymentMonitoringJobOperation returns a new UpdateModelDeploymentMonitoringJobOperation from a given name. The name must be that of a previously created UpdateModelDeploymentMonitoringJobOperation, possibly from a different process.
type MigratableResourceIterator ¶
type MigratableResourceIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*aiplatformpb.MigratableResource, nextPageToken string, err error) // contains filtered or unexported fields }
MigratableResourceIterator manages a stream of *aiplatformpb.MigratableResource.
func (*MigratableResourceIterator) Next ¶
func (it *MigratableResourceIterator) Next() (*aiplatformpb.MigratableResource, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*MigratableResourceIterator) PageInfo ¶
func (it *MigratableResourceIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type MigrationCallOptions ¶
type MigrationCallOptions struct { SearchMigratableResources []gax.CallOption BatchMigrateResources []gax.CallOption }
MigrationCallOptions contains the retry settings for each method of MigrationClient.
type MigrationClient ¶
type MigrationClient struct { // The call options for this service. CallOptions *MigrationCallOptions // LROClient is used internally to handle long-running operations. // It is exposed so that its CallOptions can be modified if required. // Users should not Close this client. LROClient *lroauto.OperationsClient // contains filtered or unexported fields }
MigrationClient is a client for interacting with Vertex AI API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
A service that migrates resources from automl.googleapis.com (at http://automl.googleapis.com), datalabeling.googleapis.com (at http://datalabeling.googleapis.com) and ml.googleapis.com (at http://ml.googleapis.com) to Vertex AI.
func NewMigrationClient ¶
func NewMigrationClient(ctx context.Context, opts ...option.ClientOption) (*MigrationClient, error)
NewMigrationClient creates a new migration service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
A service that migrates resources from automl.googleapis.com (at http://automl.googleapis.com), datalabeling.googleapis.com (at http://datalabeling.googleapis.com) and ml.googleapis.com (at http://ml.googleapis.com) to Vertex AI.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" ) func main() { ctx := context.Background() c, err := aiplatform.NewMigrationClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*MigrationClient) BatchMigrateResources ¶
func (c *MigrationClient) BatchMigrateResources(ctx context.Context, req *aiplatformpb.BatchMigrateResourcesRequest, opts ...gax.CallOption) (*BatchMigrateResourcesOperation, error)
BatchMigrateResources batch migrates resources from ml.googleapis.com (at http://ml.googleapis.com), automl.googleapis.com (at http://automl.googleapis.com), and datalabeling.googleapis.com (at http://datalabeling.googleapis.com) to Vertex AI.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewMigrationClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.BatchMigrateResourcesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#BatchMigrateResourcesRequest. } op, err := c.BatchMigrateResources(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*MigrationClient) BatchMigrateResourcesOperation ¶
func (c *MigrationClient) BatchMigrateResourcesOperation(name string) *BatchMigrateResourcesOperation
BatchMigrateResourcesOperation returns a new BatchMigrateResourcesOperation from a given name. The name must be that of a previously created BatchMigrateResourcesOperation, possibly from a different process.
func (*MigrationClient) Close ¶
func (c *MigrationClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*MigrationClient) Connection ¶
func (c *MigrationClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*MigrationClient) SearchMigratableResources ¶
func (c *MigrationClient) SearchMigratableResources(ctx context.Context, req *aiplatformpb.SearchMigratableResourcesRequest, opts ...gax.CallOption) *MigratableResourceIterator
SearchMigratableResources searches all of the resources in automl.googleapis.com (at http://automl.googleapis.com), datalabeling.googleapis.com (at http://datalabeling.googleapis.com) and ml.googleapis.com (at http://ml.googleapis.com) that can be migrated to Vertex AI’s given location.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" "google.golang.org/api/iterator" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewMigrationClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.SearchMigratableResourcesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#SearchMigratableResourcesRequest. } it := c.SearchMigratableResources(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
type ModelCallOptions ¶
type ModelCallOptions struct { UploadModel []gax.CallOption GetModel []gax.CallOption ListModels []gax.CallOption UpdateModel []gax.CallOption DeleteModel []gax.CallOption ExportModel []gax.CallOption GetModelEvaluation []gax.CallOption ListModelEvaluations []gax.CallOption GetModelEvaluationSlice []gax.CallOption ListModelEvaluationSlices []gax.CallOption }
ModelCallOptions contains the retry settings for each method of ModelClient.
type ModelClient ¶
type ModelClient struct { // The call options for this service. CallOptions *ModelCallOptions // LROClient is used internally to handle long-running operations. // It is exposed so that its CallOptions can be modified if required. // Users should not Close this client. LROClient *lroauto.OperationsClient // contains filtered or unexported fields }
ModelClient is a client for interacting with Vertex AI API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
A service for managing Vertex AI’s machine learning Models.
func NewModelClient ¶
func NewModelClient(ctx context.Context, opts ...option.ClientOption) (*ModelClient, error)
NewModelClient creates a new model service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
A service for managing Vertex AI’s machine learning Models.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" ) func main() { ctx := context.Background() c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*ModelClient) Close ¶
func (c *ModelClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*ModelClient) Connection ¶
func (c *ModelClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*ModelClient) DeleteModel ¶
func (c *ModelClient) DeleteModel(ctx context.Context, req *aiplatformpb.DeleteModelRequest, opts ...gax.CallOption) (*DeleteModelOperation, error)
DeleteModel deletes a Model. Note: Model can only be deleted if there are no DeployedModels created from it.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.DeleteModelRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteModelRequest. } op, err := c.DeleteModel(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*ModelClient) DeleteModelOperation ¶
func (c *ModelClient) DeleteModelOperation(name string) *DeleteModelOperation
DeleteModelOperation returns a new DeleteModelOperation from a given name. The name must be that of a previously created DeleteModelOperation, possibly from a different process.
func (*ModelClient) ExportModel ¶
func (c *ModelClient) ExportModel(ctx context.Context, req *aiplatformpb.ExportModelRequest, opts ...gax.CallOption) (*ExportModelOperation, error)
ExportModel exports a trained, exportable, Model to a location specified by the user. A Model is considered to be exportable if it has at least one [supported export format][google.cloud.aiplatform.v1.Model.supported_export_formats].
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.ExportModelRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ExportModelRequest. } op, err := c.ExportModel(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ModelClient) ExportModelOperation ¶
func (c *ModelClient) ExportModelOperation(name string) *ExportModelOperation
ExportModelOperation returns a new ExportModelOperation from a given name. The name must be that of a previously created ExportModelOperation, possibly from a different process.
func (*ModelClient) GetModel ¶
func (c *ModelClient) GetModel(ctx context.Context, req *aiplatformpb.GetModelRequest, opts ...gax.CallOption) (*aiplatformpb.Model, error)
GetModel gets a Model.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.GetModelRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetModelRequest. } resp, err := c.GetModel(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ModelClient) GetModelEvaluation ¶
func (c *ModelClient) GetModelEvaluation(ctx context.Context, req *aiplatformpb.GetModelEvaluationRequest, opts ...gax.CallOption) (*aiplatformpb.ModelEvaluation, error)
GetModelEvaluation gets a ModelEvaluation.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.GetModelEvaluationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetModelEvaluationRequest. } resp, err := c.GetModelEvaluation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ModelClient) GetModelEvaluationSlice ¶
func (c *ModelClient) GetModelEvaluationSlice(ctx context.Context, req *aiplatformpb.GetModelEvaluationSliceRequest, opts ...gax.CallOption) (*aiplatformpb.ModelEvaluationSlice, error)
GetModelEvaluationSlice gets a ModelEvaluationSlice.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.GetModelEvaluationSliceRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetModelEvaluationSliceRequest. } resp, err := c.GetModelEvaluationSlice(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ModelClient) ListModelEvaluationSlices ¶
func (c *ModelClient) ListModelEvaluationSlices(ctx context.Context, req *aiplatformpb.ListModelEvaluationSlicesRequest, opts ...gax.CallOption) *ModelEvaluationSliceIterator
ListModelEvaluationSlices lists ModelEvaluationSlices in a ModelEvaluation.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" "google.golang.org/api/iterator" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.ListModelEvaluationSlicesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListModelEvaluationSlicesRequest. } it := c.ListModelEvaluationSlices(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*ModelClient) ListModelEvaluations ¶
func (c *ModelClient) ListModelEvaluations(ctx context.Context, req *aiplatformpb.ListModelEvaluationsRequest, opts ...gax.CallOption) *ModelEvaluationIterator
ListModelEvaluations lists ModelEvaluations in a Model.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" "google.golang.org/api/iterator" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.ListModelEvaluationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListModelEvaluationsRequest. } it := c.ListModelEvaluations(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*ModelClient) ListModels ¶
func (c *ModelClient) ListModels(ctx context.Context, req *aiplatformpb.ListModelsRequest, opts ...gax.CallOption) *ModelIterator
ListModels lists Models in a Location.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" "google.golang.org/api/iterator" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.ListModelsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListModelsRequest. } it := c.ListModels(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*ModelClient) UpdateModel ¶
func (c *ModelClient) UpdateModel(ctx context.Context, req *aiplatformpb.UpdateModelRequest, opts ...gax.CallOption) (*aiplatformpb.Model, error)
UpdateModel updates a Model.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.UpdateModelRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UpdateModelRequest. } resp, err := c.UpdateModel(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ModelClient) UploadModel ¶
func (c *ModelClient) UploadModel(ctx context.Context, req *aiplatformpb.UploadModelRequest, opts ...gax.CallOption) (*UploadModelOperation, error)
UploadModel uploads a Model artifact into Vertex AI.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.UploadModelRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UploadModelRequest. } op, err := c.UploadModel(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*ModelClient) UploadModelOperation ¶
func (c *ModelClient) UploadModelOperation(name string) *UploadModelOperation
UploadModelOperation returns a new UploadModelOperation from a given name. The name must be that of a previously created UploadModelOperation, possibly from a different process.
type ModelDeploymentMonitoringJobIterator ¶ added in v0.2.0
type ModelDeploymentMonitoringJobIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*aiplatformpb.ModelDeploymentMonitoringJob, nextPageToken string, err error) // contains filtered or unexported fields }
ModelDeploymentMonitoringJobIterator manages a stream of *aiplatformpb.ModelDeploymentMonitoringJob.
func (*ModelDeploymentMonitoringJobIterator) Next ¶ added in v0.2.0
func (it *ModelDeploymentMonitoringJobIterator) Next() (*aiplatformpb.ModelDeploymentMonitoringJob, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*ModelDeploymentMonitoringJobIterator) PageInfo ¶ added in v0.2.0
func (it *ModelDeploymentMonitoringJobIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type ModelEvaluationIterator ¶
type ModelEvaluationIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*aiplatformpb.ModelEvaluation, nextPageToken string, err error) // contains filtered or unexported fields }
ModelEvaluationIterator manages a stream of *aiplatformpb.ModelEvaluation.
func (*ModelEvaluationIterator) Next ¶
func (it *ModelEvaluationIterator) Next() (*aiplatformpb.ModelEvaluation, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*ModelEvaluationIterator) PageInfo ¶
func (it *ModelEvaluationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type ModelEvaluationSliceIterator ¶
type ModelEvaluationSliceIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*aiplatformpb.ModelEvaluationSlice, nextPageToken string, err error) // contains filtered or unexported fields }
ModelEvaluationSliceIterator manages a stream of *aiplatformpb.ModelEvaluationSlice.
func (*ModelEvaluationSliceIterator) Next ¶
func (it *ModelEvaluationSliceIterator) Next() (*aiplatformpb.ModelEvaluationSlice, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*ModelEvaluationSliceIterator) PageInfo ¶
func (it *ModelEvaluationSliceIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type ModelIterator ¶
type ModelIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*aiplatformpb.Model, nextPageToken string, err error) // contains filtered or unexported fields }
ModelIterator manages a stream of *aiplatformpb.Model.
func (*ModelIterator) Next ¶
func (it *ModelIterator) Next() (*aiplatformpb.Model, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*ModelIterator) PageInfo ¶
func (it *ModelIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type ModelMonitoringStatsAnomaliesIterator ¶ added in v0.2.0
type ModelMonitoringStatsAnomaliesIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*aiplatformpb.ModelMonitoringStatsAnomalies, nextPageToken string, err error) // contains filtered or unexported fields }
ModelMonitoringStatsAnomaliesIterator manages a stream of *aiplatformpb.ModelMonitoringStatsAnomalies.
func (*ModelMonitoringStatsAnomaliesIterator) Next ¶ added in v0.2.0
func (it *ModelMonitoringStatsAnomaliesIterator) Next() (*aiplatformpb.ModelMonitoringStatsAnomalies, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*ModelMonitoringStatsAnomaliesIterator) PageInfo ¶ added in v0.2.0
func (it *ModelMonitoringStatsAnomaliesIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type PipelineCallOptions ¶
type PipelineCallOptions struct { CreateTrainingPipeline []gax.CallOption GetTrainingPipeline []gax.CallOption ListTrainingPipelines []gax.CallOption DeleteTrainingPipeline []gax.CallOption CancelTrainingPipeline []gax.CallOption CreatePipelineJob []gax.CallOption GetPipelineJob []gax.CallOption ListPipelineJobs []gax.CallOption DeletePipelineJob []gax.CallOption CancelPipelineJob []gax.CallOption }
PipelineCallOptions contains the retry settings for each method of PipelineClient.
type PipelineClient ¶
type PipelineClient struct { // The call options for this service. CallOptions *PipelineCallOptions // LROClient is used internally to handle long-running operations. // It is exposed so that its CallOptions can be modified if required. // Users should not Close this client. LROClient *lroauto.OperationsClient // contains filtered or unexported fields }
PipelineClient is a client for interacting with Vertex AI API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
A service for creating and managing Vertex AI’s pipelines. This includes both TrainingPipeline resources (used for AutoML and custom training) and PipelineJob resources (used for Vertex Pipelines).
func NewPipelineClient ¶
func NewPipelineClient(ctx context.Context, opts ...option.ClientOption) (*PipelineClient, error)
NewPipelineClient creates a new pipeline service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
A service for creating and managing Vertex AI’s pipelines. This includes both TrainingPipeline resources (used for AutoML and custom training) and PipelineJob resources (used for Vertex Pipelines).
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" ) func main() { ctx := context.Background() c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*PipelineClient) CancelPipelineJob ¶
func (c *PipelineClient) CancelPipelineJob(ctx context.Context, req *aiplatformpb.CancelPipelineJobRequest, opts ...gax.CallOption) error
CancelPipelineJob cancels a PipelineJob. Starts asynchronous cancellation on the PipelineJob. The server makes a best effort to cancel the pipeline, but success is not guaranteed. Clients can use PipelineService.GetPipelineJob or other methods to check whether the cancellation succeeded or whether the pipeline completed despite cancellation. On successful cancellation, the PipelineJob is not deleted; instead it becomes a pipeline with a PipelineJob.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED, and PipelineJob.state is set to CANCELLED.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.CancelPipelineJobRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CancelPipelineJobRequest. } err = c.CancelPipelineJob(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*PipelineClient) CancelTrainingPipeline ¶
func (c *PipelineClient) CancelTrainingPipeline(ctx context.Context, req *aiplatformpb.CancelTrainingPipelineRequest, opts ...gax.CallOption) error
CancelTrainingPipeline cancels a TrainingPipeline. Starts asynchronous cancellation on the TrainingPipeline. The server makes a best effort to cancel the pipeline, but success is not guaranteed. Clients can use PipelineService.GetTrainingPipeline or other methods to check whether the cancellation succeeded or whether the pipeline completed despite cancellation. On successful cancellation, the TrainingPipeline is not deleted; instead it becomes a pipeline with a TrainingPipeline.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED, and TrainingPipeline.state is set to CANCELLED.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.CancelTrainingPipelineRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CancelTrainingPipelineRequest. } err = c.CancelTrainingPipeline(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*PipelineClient) Close ¶
func (c *PipelineClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*PipelineClient) Connection ¶
func (c *PipelineClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*PipelineClient) CreatePipelineJob ¶
func (c *PipelineClient) CreatePipelineJob(ctx context.Context, req *aiplatformpb.CreatePipelineJobRequest, opts ...gax.CallOption) (*aiplatformpb.PipelineJob, error)
CreatePipelineJob creates a PipelineJob. A PipelineJob will run immediately when created.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.CreatePipelineJobRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreatePipelineJobRequest. } resp, err := c.CreatePipelineJob(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*PipelineClient) CreateTrainingPipeline ¶
func (c *PipelineClient) CreateTrainingPipeline(ctx context.Context, req *aiplatformpb.CreateTrainingPipelineRequest, opts ...gax.CallOption) (*aiplatformpb.TrainingPipeline, error)
CreateTrainingPipeline creates a TrainingPipeline. A created TrainingPipeline right away will be attempted to be run.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.CreateTrainingPipelineRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateTrainingPipelineRequest. } resp, err := c.CreateTrainingPipeline(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*PipelineClient) DeletePipelineJob ¶
func (c *PipelineClient) DeletePipelineJob(ctx context.Context, req *aiplatformpb.DeletePipelineJobRequest, opts ...gax.CallOption) (*DeletePipelineJobOperation, error)
DeletePipelineJob deletes a PipelineJob.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.DeletePipelineJobRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeletePipelineJobRequest. } op, err := c.DeletePipelineJob(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*PipelineClient) DeletePipelineJobOperation ¶
func (c *PipelineClient) DeletePipelineJobOperation(name string) *DeletePipelineJobOperation
DeletePipelineJobOperation returns a new DeletePipelineJobOperation from a given name. The name must be that of a previously created DeletePipelineJobOperation, possibly from a different process.
func (*PipelineClient) DeleteTrainingPipeline ¶
func (c *PipelineClient) DeleteTrainingPipeline(ctx context.Context, req *aiplatformpb.DeleteTrainingPipelineRequest, opts ...gax.CallOption) (*DeleteTrainingPipelineOperation, error)
DeleteTrainingPipeline deletes a TrainingPipeline.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.DeleteTrainingPipelineRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteTrainingPipelineRequest. } op, err := c.DeleteTrainingPipeline(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*PipelineClient) DeleteTrainingPipelineOperation ¶
func (c *PipelineClient) DeleteTrainingPipelineOperation(name string) *DeleteTrainingPipelineOperation
DeleteTrainingPipelineOperation returns a new DeleteTrainingPipelineOperation from a given name. The name must be that of a previously created DeleteTrainingPipelineOperation, possibly from a different process.
func (*PipelineClient) GetPipelineJob ¶
func (c *PipelineClient) GetPipelineJob(ctx context.Context, req *aiplatformpb.GetPipelineJobRequest, opts ...gax.CallOption) (*aiplatformpb.PipelineJob, error)
GetPipelineJob gets a PipelineJob.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.GetPipelineJobRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetPipelineJobRequest. } resp, err := c.GetPipelineJob(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*PipelineClient) GetTrainingPipeline ¶
func (c *PipelineClient) GetTrainingPipeline(ctx context.Context, req *aiplatformpb.GetTrainingPipelineRequest, opts ...gax.CallOption) (*aiplatformpb.TrainingPipeline, error)
GetTrainingPipeline gets a TrainingPipeline.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.GetTrainingPipelineRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetTrainingPipelineRequest. } resp, err := c.GetTrainingPipeline(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*PipelineClient) ListPipelineJobs ¶
func (c *PipelineClient) ListPipelineJobs(ctx context.Context, req *aiplatformpb.ListPipelineJobsRequest, opts ...gax.CallOption) *PipelineJobIterator
ListPipelineJobs lists PipelineJobs in a Location.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" "google.golang.org/api/iterator" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.ListPipelineJobsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListPipelineJobsRequest. } it := c.ListPipelineJobs(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*PipelineClient) ListTrainingPipelines ¶
func (c *PipelineClient) ListTrainingPipelines(ctx context.Context, req *aiplatformpb.ListTrainingPipelinesRequest, opts ...gax.CallOption) *TrainingPipelineIterator
ListTrainingPipelines lists TrainingPipelines in a Location.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" "google.golang.org/api/iterator" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.ListTrainingPipelinesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListTrainingPipelinesRequest. } it := c.ListTrainingPipelines(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
type PipelineJobIterator ¶
type PipelineJobIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*aiplatformpb.PipelineJob, nextPageToken string, err error) // contains filtered or unexported fields }
PipelineJobIterator manages a stream of *aiplatformpb.PipelineJob.
func (*PipelineJobIterator) Next ¶
func (it *PipelineJobIterator) Next() (*aiplatformpb.PipelineJob, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*PipelineJobIterator) PageInfo ¶
func (it *PipelineJobIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type PredictionCallOptions ¶
type PredictionCallOptions struct { Predict []gax.CallOption RawPredict []gax.CallOption Explain []gax.CallOption }
PredictionCallOptions contains the retry settings for each method of PredictionClient.
type PredictionClient ¶
type PredictionClient struct { // The call options for this service. CallOptions *PredictionCallOptions // contains filtered or unexported fields }
PredictionClient is a client for interacting with Vertex AI API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
A service for online predictions and explanations.
func NewPredictionClient ¶
func NewPredictionClient(ctx context.Context, opts ...option.ClientOption) (*PredictionClient, error)
NewPredictionClient creates a new prediction service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
A service for online predictions and explanations.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" ) func main() { ctx := context.Background() c, err := aiplatform.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*PredictionClient) Close ¶
func (c *PredictionClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*PredictionClient) Connection ¶
func (c *PredictionClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*PredictionClient) Explain ¶ added in v0.2.0
func (c *PredictionClient) Explain(ctx context.Context, req *aiplatformpb.ExplainRequest, opts ...gax.CallOption) (*aiplatformpb.ExplainResponse, error)
Explain perform an online explanation.
If deployed_model_id is specified, the corresponding DeployModel must have explanation_spec populated. If deployed_model_id is not specified, all DeployedModels must have explanation_spec populated. Only deployed AutoML tabular Models have explanation_spec.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.ExplainRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ExplainRequest. } resp, err := c.Explain(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*PredictionClient) Predict ¶
func (c *PredictionClient) Predict(ctx context.Context, req *aiplatformpb.PredictRequest, opts ...gax.CallOption) (*aiplatformpb.PredictResponse, error)
Predict perform an online prediction.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.PredictRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#PredictRequest. } resp, err := c.Predict(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*PredictionClient) RawPredict ¶ added in v0.2.0
func (c *PredictionClient) RawPredict(ctx context.Context, req *aiplatformpb.RawPredictRequest, opts ...gax.CallOption) (*httpbodypb.HttpBody, error)
RawPredict perform an online prediction with arbitrary http payload.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.RawPredictRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#RawPredictRequest. } resp, err := c.RawPredict(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type SpecialistPoolCallOptions ¶
type SpecialistPoolCallOptions struct { CreateSpecialistPool []gax.CallOption GetSpecialistPool []gax.CallOption ListSpecialistPools []gax.CallOption DeleteSpecialistPool []gax.CallOption UpdateSpecialistPool []gax.CallOption }
SpecialistPoolCallOptions contains the retry settings for each method of SpecialistPoolClient.
type SpecialistPoolClient ¶
type SpecialistPoolClient struct { // The call options for this service. CallOptions *SpecialistPoolCallOptions // LROClient is used internally to handle long-running operations. // It is exposed so that its CallOptions can be modified if required. // Users should not Close this client. LROClient *lroauto.OperationsClient // contains filtered or unexported fields }
SpecialistPoolClient is a client for interacting with Vertex AI API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
A service for creating and managing Customer SpecialistPools. When customers start Data Labeling jobs, they can reuse/create Specialist Pools to bring their own Specialists to label the data. Customers can add/remove Managers for the Specialist Pool on Cloud console, then Managers will get email notifications to manage Specialists and tasks on CrowdCompute console.
func NewSpecialistPoolClient ¶
func NewSpecialistPoolClient(ctx context.Context, opts ...option.ClientOption) (*SpecialistPoolClient, error)
NewSpecialistPoolClient creates a new specialist pool service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
A service for creating and managing Customer SpecialistPools. When customers start Data Labeling jobs, they can reuse/create Specialist Pools to bring their own Specialists to label the data. Customers can add/remove Managers for the Specialist Pool on Cloud console, then Managers will get email notifications to manage Specialists and tasks on CrowdCompute console.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" ) func main() { ctx := context.Background() c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*SpecialistPoolClient) Close ¶
func (c *SpecialistPoolClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*SpecialistPoolClient) Connection ¶
func (c *SpecialistPoolClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*SpecialistPoolClient) CreateSpecialistPool ¶
func (c *SpecialistPoolClient) CreateSpecialistPool(ctx context.Context, req *aiplatformpb.CreateSpecialistPoolRequest, opts ...gax.CallOption) (*CreateSpecialistPoolOperation, error)
CreateSpecialistPool creates a SpecialistPool.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.CreateSpecialistPoolRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateSpecialistPoolRequest. } op, err := c.CreateSpecialistPool(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SpecialistPoolClient) CreateSpecialistPoolOperation ¶
func (c *SpecialistPoolClient) CreateSpecialistPoolOperation(name string) *CreateSpecialistPoolOperation
CreateSpecialistPoolOperation returns a new CreateSpecialistPoolOperation from a given name. The name must be that of a previously created CreateSpecialistPoolOperation, possibly from a different process.
func (*SpecialistPoolClient) DeleteSpecialistPool ¶
func (c *SpecialistPoolClient) DeleteSpecialistPool(ctx context.Context, req *aiplatformpb.DeleteSpecialistPoolRequest, opts ...gax.CallOption) (*DeleteSpecialistPoolOperation, error)
DeleteSpecialistPool deletes a SpecialistPool as well as all Specialists in the pool.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.DeleteSpecialistPoolRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteSpecialistPoolRequest. } op, err := c.DeleteSpecialistPool(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*SpecialistPoolClient) DeleteSpecialistPoolOperation ¶
func (c *SpecialistPoolClient) DeleteSpecialistPoolOperation(name string) *DeleteSpecialistPoolOperation
DeleteSpecialistPoolOperation returns a new DeleteSpecialistPoolOperation from a given name. The name must be that of a previously created DeleteSpecialistPoolOperation, possibly from a different process.
func (*SpecialistPoolClient) GetSpecialistPool ¶
func (c *SpecialistPoolClient) GetSpecialistPool(ctx context.Context, req *aiplatformpb.GetSpecialistPoolRequest, opts ...gax.CallOption) (*aiplatformpb.SpecialistPool, error)
GetSpecialistPool gets a SpecialistPool.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.GetSpecialistPoolRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetSpecialistPoolRequest. } resp, err := c.GetSpecialistPool(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SpecialistPoolClient) ListSpecialistPools ¶
func (c *SpecialistPoolClient) ListSpecialistPools(ctx context.Context, req *aiplatformpb.ListSpecialistPoolsRequest, opts ...gax.CallOption) *SpecialistPoolIterator
ListSpecialistPools lists SpecialistPools in a Location.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" "google.golang.org/api/iterator" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.ListSpecialistPoolsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListSpecialistPoolsRequest. } it := c.ListSpecialistPools(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*SpecialistPoolClient) UpdateSpecialistPool ¶
func (c *SpecialistPoolClient) UpdateSpecialistPool(ctx context.Context, req *aiplatformpb.UpdateSpecialistPoolRequest, opts ...gax.CallOption) (*UpdateSpecialistPoolOperation, error)
UpdateSpecialistPool updates a SpecialistPool.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.UpdateSpecialistPoolRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UpdateSpecialistPoolRequest. } op, err := c.UpdateSpecialistPool(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*SpecialistPoolClient) UpdateSpecialistPoolOperation ¶
func (c *SpecialistPoolClient) UpdateSpecialistPoolOperation(name string) *UpdateSpecialistPoolOperation
UpdateSpecialistPoolOperation returns a new UpdateSpecialistPoolOperation from a given name. The name must be that of a previously created UpdateSpecialistPoolOperation, possibly from a different process.
type SpecialistPoolIterator ¶
type SpecialistPoolIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*aiplatformpb.SpecialistPool, nextPageToken string, err error) // contains filtered or unexported fields }
SpecialistPoolIterator manages a stream of *aiplatformpb.SpecialistPool.
func (*SpecialistPoolIterator) Next ¶
func (it *SpecialistPoolIterator) Next() (*aiplatformpb.SpecialistPool, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*SpecialistPoolIterator) PageInfo ¶
func (it *SpecialistPoolIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type StudyIterator ¶ added in v0.2.0
type StudyIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*aiplatformpb.Study, nextPageToken string, err error) // contains filtered or unexported fields }
StudyIterator manages a stream of *aiplatformpb.Study.
func (*StudyIterator) Next ¶ added in v0.2.0
func (it *StudyIterator) Next() (*aiplatformpb.Study, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*StudyIterator) PageInfo ¶ added in v0.2.0
func (it *StudyIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type SuggestTrialsOperation ¶ added in v0.2.0
type SuggestTrialsOperation struct {
// contains filtered or unexported fields
}
SuggestTrialsOperation manages a long-running operation from SuggestTrials.
func (*SuggestTrialsOperation) Done ¶ added in v0.2.0
func (op *SuggestTrialsOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*SuggestTrialsOperation) Metadata ¶ added in v0.2.0
func (op *SuggestTrialsOperation) Metadata() (*aiplatformpb.SuggestTrialsMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*SuggestTrialsOperation) Name ¶ added in v0.2.0
func (op *SuggestTrialsOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*SuggestTrialsOperation) Poll ¶ added in v0.2.0
func (op *SuggestTrialsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.SuggestTrialsResponse, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*SuggestTrialsOperation) Wait ¶ added in v0.2.0
func (op *SuggestTrialsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.SuggestTrialsResponse, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type TrainingPipelineIterator ¶
type TrainingPipelineIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*aiplatformpb.TrainingPipeline, nextPageToken string, err error) // contains filtered or unexported fields }
TrainingPipelineIterator manages a stream of *aiplatformpb.TrainingPipeline.
func (*TrainingPipelineIterator) Next ¶
func (it *TrainingPipelineIterator) Next() (*aiplatformpb.TrainingPipeline, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*TrainingPipelineIterator) PageInfo ¶
func (it *TrainingPipelineIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type TrialIterator ¶ added in v0.2.0
type TrialIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*aiplatformpb.Trial, nextPageToken string, err error) // contains filtered or unexported fields }
TrialIterator manages a stream of *aiplatformpb.Trial.
func (*TrialIterator) Next ¶ added in v0.2.0
func (it *TrialIterator) Next() (*aiplatformpb.Trial, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*TrialIterator) PageInfo ¶ added in v0.2.0
func (it *TrialIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type UndeployIndexOperation ¶ added in v0.2.0
type UndeployIndexOperation struct {
// contains filtered or unexported fields
}
UndeployIndexOperation manages a long-running operation from UndeployIndex.
func (*UndeployIndexOperation) Done ¶ added in v0.2.0
func (op *UndeployIndexOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UndeployIndexOperation) Metadata ¶ added in v0.2.0
func (op *UndeployIndexOperation) Metadata() (*aiplatformpb.UndeployIndexOperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*UndeployIndexOperation) Name ¶ added in v0.2.0
func (op *UndeployIndexOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UndeployIndexOperation) Poll ¶ added in v0.2.0
func (op *UndeployIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.UndeployIndexResponse, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UndeployIndexOperation) Wait ¶ added in v0.2.0
func (op *UndeployIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.UndeployIndexResponse, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type UndeployModelOperation ¶
type UndeployModelOperation struct {
// contains filtered or unexported fields
}
UndeployModelOperation manages a long-running operation from UndeployModel.
func (*UndeployModelOperation) Done ¶
func (op *UndeployModelOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UndeployModelOperation) Metadata ¶
func (op *UndeployModelOperation) Metadata() (*aiplatformpb.UndeployModelOperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*UndeployModelOperation) Name ¶
func (op *UndeployModelOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UndeployModelOperation) Poll ¶
func (op *UndeployModelOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.UndeployModelResponse, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UndeployModelOperation) Wait ¶
func (op *UndeployModelOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.UndeployModelResponse, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type UpdateIndexOperation ¶ added in v0.2.0
type UpdateIndexOperation struct {
// contains filtered or unexported fields
}
UpdateIndexOperation manages a long-running operation from UpdateIndex.
func (*UpdateIndexOperation) Done ¶ added in v0.2.0
func (op *UpdateIndexOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateIndexOperation) Metadata ¶ added in v0.2.0
func (op *UpdateIndexOperation) Metadata() (*aiplatformpb.UpdateIndexOperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateIndexOperation) Name ¶ added in v0.2.0
func (op *UpdateIndexOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateIndexOperation) Poll ¶ added in v0.2.0
func (op *UpdateIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Index, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateIndexOperation) Wait ¶ added in v0.2.0
func (op *UpdateIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Index, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type UpdateModelDeploymentMonitoringJobOperation ¶ added in v0.2.0
type UpdateModelDeploymentMonitoringJobOperation struct {
// contains filtered or unexported fields
}
UpdateModelDeploymentMonitoringJobOperation manages a long-running operation from UpdateModelDeploymentMonitoringJob.
func (*UpdateModelDeploymentMonitoringJobOperation) Done ¶ added in v0.2.0
func (op *UpdateModelDeploymentMonitoringJobOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateModelDeploymentMonitoringJobOperation) Metadata ¶ added in v0.2.0
func (op *UpdateModelDeploymentMonitoringJobOperation) Metadata() (*aiplatformpb.UpdateModelDeploymentMonitoringJobOperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateModelDeploymentMonitoringJobOperation) Name ¶ added in v0.2.0
func (op *UpdateModelDeploymentMonitoringJobOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateModelDeploymentMonitoringJobOperation) Poll ¶ added in v0.2.0
func (op *UpdateModelDeploymentMonitoringJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.ModelDeploymentMonitoringJob, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateModelDeploymentMonitoringJobOperation) Wait ¶ added in v0.2.0
func (op *UpdateModelDeploymentMonitoringJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.ModelDeploymentMonitoringJob, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type UpdateSpecialistPoolOperation ¶
type UpdateSpecialistPoolOperation struct {
// contains filtered or unexported fields
}
UpdateSpecialistPoolOperation manages a long-running operation from UpdateSpecialistPool.
func (*UpdateSpecialistPoolOperation) Done ¶
func (op *UpdateSpecialistPoolOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateSpecialistPoolOperation) Metadata ¶
func (op *UpdateSpecialistPoolOperation) Metadata() (*aiplatformpb.UpdateSpecialistPoolOperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateSpecialistPoolOperation) Name ¶
func (op *UpdateSpecialistPoolOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateSpecialistPoolOperation) Poll ¶
func (op *UpdateSpecialistPoolOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.SpecialistPool, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateSpecialistPoolOperation) Wait ¶
func (op *UpdateSpecialistPoolOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.SpecialistPool, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type UploadModelOperation ¶
type UploadModelOperation struct {
// contains filtered or unexported fields
}
UploadModelOperation manages a long-running operation from UploadModel.
func (*UploadModelOperation) Done ¶
func (op *UploadModelOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UploadModelOperation) Metadata ¶
func (op *UploadModelOperation) Metadata() (*aiplatformpb.UploadModelOperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*UploadModelOperation) Name ¶
func (op *UploadModelOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UploadModelOperation) Poll ¶
func (op *UploadModelOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.UploadModelResponse, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UploadModelOperation) Wait ¶
func (op *UploadModelOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.UploadModelResponse, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type VizierCallOptions ¶ added in v0.2.0
type VizierCallOptions struct { CreateStudy []gax.CallOption GetStudy []gax.CallOption ListStudies []gax.CallOption DeleteStudy []gax.CallOption LookupStudy []gax.CallOption SuggestTrials []gax.CallOption CreateTrial []gax.CallOption GetTrial []gax.CallOption ListTrials []gax.CallOption AddTrialMeasurement []gax.CallOption CompleteTrial []gax.CallOption DeleteTrial []gax.CallOption CheckTrialEarlyStoppingState []gax.CallOption StopTrial []gax.CallOption ListOptimalTrials []gax.CallOption }
VizierCallOptions contains the retry settings for each method of VizierClient.
type VizierClient ¶ added in v0.2.0
type VizierClient struct { // The call options for this service. CallOptions *VizierCallOptions // LROClient is used internally to handle long-running operations. // It is exposed so that its CallOptions can be modified if required. // Users should not Close this client. LROClient *lroauto.OperationsClient // contains filtered or unexported fields }
VizierClient is a client for interacting with Vertex AI API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Vertex Vizier API.
Vizier service is a GCP service to solve blackbox optimization problems, such as tuning machine learning hyperparameters and searching over deep learning architectures.
func NewVizierClient ¶ added in v0.2.0
func NewVizierClient(ctx context.Context, opts ...option.ClientOption) (*VizierClient, error)
NewVizierClient creates a new vizier service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Vertex Vizier API.
Vizier service is a GCP service to solve blackbox optimization problems, such as tuning machine learning hyperparameters and searching over deep learning architectures.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" ) func main() { ctx := context.Background() c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*VizierClient) AddTrialMeasurement ¶ added in v0.2.0
func (c *VizierClient) AddTrialMeasurement(ctx context.Context, req *aiplatformpb.AddTrialMeasurementRequest, opts ...gax.CallOption) (*aiplatformpb.Trial, error)
AddTrialMeasurement adds a measurement of the objective metrics to a Trial. This measurement is assumed to have been taken before the Trial is complete.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.AddTrialMeasurementRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#AddTrialMeasurementRequest. } resp, err := c.AddTrialMeasurement(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*VizierClient) CheckTrialEarlyStoppingState ¶ added in v0.2.0
func (c *VizierClient) CheckTrialEarlyStoppingState(ctx context.Context, req *aiplatformpb.CheckTrialEarlyStoppingStateRequest, opts ...gax.CallOption) (*CheckTrialEarlyStoppingStateOperation, error)
CheckTrialEarlyStoppingState checks whether a Trial should stop or not. Returns a long-running operation. When the operation is successful, it will contain a CheckTrialEarlyStoppingStateResponse.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.CheckTrialEarlyStoppingStateRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CheckTrialEarlyStoppingStateRequest. } op, err := c.CheckTrialEarlyStoppingState(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*VizierClient) CheckTrialEarlyStoppingStateOperation ¶ added in v0.2.0
func (c *VizierClient) CheckTrialEarlyStoppingStateOperation(name string) *CheckTrialEarlyStoppingStateOperation
CheckTrialEarlyStoppingStateOperation returns a new CheckTrialEarlyStoppingStateOperation from a given name. The name must be that of a previously created CheckTrialEarlyStoppingStateOperation, possibly from a different process.
func (*VizierClient) Close ¶ added in v0.2.0
func (c *VizierClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*VizierClient) CompleteTrial ¶ added in v0.2.0
func (c *VizierClient) CompleteTrial(ctx context.Context, req *aiplatformpb.CompleteTrialRequest, opts ...gax.CallOption) (*aiplatformpb.Trial, error)
CompleteTrial marks a Trial as complete.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.CompleteTrialRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CompleteTrialRequest. } resp, err := c.CompleteTrial(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*VizierClient) Connection ¶ added in v0.2.0
func (c *VizierClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*VizierClient) CreateStudy ¶ added in v0.2.0
func (c *VizierClient) CreateStudy(ctx context.Context, req *aiplatformpb.CreateStudyRequest, opts ...gax.CallOption) (*aiplatformpb.Study, error)
CreateStudy creates a Study. A resource name will be generated after creation of the Study.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.CreateStudyRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateStudyRequest. } resp, err := c.CreateStudy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*VizierClient) CreateTrial ¶ added in v0.2.0
func (c *VizierClient) CreateTrial(ctx context.Context, req *aiplatformpb.CreateTrialRequest, opts ...gax.CallOption) (*aiplatformpb.Trial, error)
CreateTrial adds a user provided Trial to a Study.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.CreateTrialRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateTrialRequest. } resp, err := c.CreateTrial(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*VizierClient) DeleteStudy ¶ added in v0.2.0
func (c *VizierClient) DeleteStudy(ctx context.Context, req *aiplatformpb.DeleteStudyRequest, opts ...gax.CallOption) error
DeleteStudy deletes a Study.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.DeleteStudyRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteStudyRequest. } err = c.DeleteStudy(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*VizierClient) DeleteTrial ¶ added in v0.2.0
func (c *VizierClient) DeleteTrial(ctx context.Context, req *aiplatformpb.DeleteTrialRequest, opts ...gax.CallOption) error
DeleteTrial deletes a Trial.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.DeleteTrialRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteTrialRequest. } err = c.DeleteTrial(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*VizierClient) GetStudy ¶ added in v0.2.0
func (c *VizierClient) GetStudy(ctx context.Context, req *aiplatformpb.GetStudyRequest, opts ...gax.CallOption) (*aiplatformpb.Study, error)
GetStudy gets a Study by name.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.GetStudyRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetStudyRequest. } resp, err := c.GetStudy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*VizierClient) GetTrial ¶ added in v0.2.0
func (c *VizierClient) GetTrial(ctx context.Context, req *aiplatformpb.GetTrialRequest, opts ...gax.CallOption) (*aiplatformpb.Trial, error)
GetTrial gets a Trial.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.GetTrialRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetTrialRequest. } resp, err := c.GetTrial(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*VizierClient) ListOptimalTrials ¶ added in v0.2.0
func (c *VizierClient) ListOptimalTrials(ctx context.Context, req *aiplatformpb.ListOptimalTrialsRequest, opts ...gax.CallOption) (*aiplatformpb.ListOptimalTrialsResponse, error)
ListOptimalTrials lists the pareto-optimal Trials for multi-objective Study or the optimal Trials for single-objective Study. The definition of pareto-optimal can be checked in wiki page. https://en.wikipedia.org/wiki/Pareto_efficiency (at https://en.wikipedia.org/wiki/Pareto_efficiency)
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.ListOptimalTrialsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListOptimalTrialsRequest. } resp, err := c.ListOptimalTrials(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*VizierClient) ListStudies ¶ added in v0.2.0
func (c *VizierClient) ListStudies(ctx context.Context, req *aiplatformpb.ListStudiesRequest, opts ...gax.CallOption) *StudyIterator
ListStudies lists all the studies in a region for an associated project.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" "google.golang.org/api/iterator" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.ListStudiesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListStudiesRequest. } it := c.ListStudies(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*VizierClient) ListTrials ¶ added in v0.2.0
func (c *VizierClient) ListTrials(ctx context.Context, req *aiplatformpb.ListTrialsRequest, opts ...gax.CallOption) *TrialIterator
ListTrials lists the Trials associated with a Study.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" "google.golang.org/api/iterator" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.ListTrialsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListTrialsRequest. } it := c.ListTrials(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*VizierClient) LookupStudy ¶ added in v0.2.0
func (c *VizierClient) LookupStudy(ctx context.Context, req *aiplatformpb.LookupStudyRequest, opts ...gax.CallOption) (*aiplatformpb.Study, error)
LookupStudy looks a study up using the user-defined display_name field instead of the fully qualified resource name.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.LookupStudyRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#LookupStudyRequest. } resp, err := c.LookupStudy(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*VizierClient) StopTrial ¶ added in v0.2.0
func (c *VizierClient) StopTrial(ctx context.Context, req *aiplatformpb.StopTrialRequest, opts ...gax.CallOption) (*aiplatformpb.Trial, error)
StopTrial stops a Trial.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.StopTrialRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#StopTrialRequest. } resp, err := c.StopTrial(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*VizierClient) SuggestTrials ¶ added in v0.2.0
func (c *VizierClient) SuggestTrials(ctx context.Context, req *aiplatformpb.SuggestTrialsRequest, opts ...gax.CallOption) (*SuggestTrialsOperation, error)
SuggestTrials adds one or more Trials to a Study, with parameter values suggested by Vertex Vizier. Returns a long-running operation associated with the generation of Trial suggestions. When this long-running operation succeeds, it will contain a SuggestTrialsResponse.
Example ¶
package main import ( "context" aiplatform "cloud.google.com/go/aiplatform/apiv1" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" ) func main() { ctx := context.Background() c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &aiplatformpb.SuggestTrialsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#SuggestTrialsRequest. } op, err := c.SuggestTrials(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*VizierClient) SuggestTrialsOperation ¶ added in v0.2.0
func (c *VizierClient) SuggestTrialsOperation(name string) *SuggestTrialsOperation
SuggestTrialsOperation returns a new SuggestTrialsOperation from a given name. The name must be that of a previously created SuggestTrialsOperation, possibly from a different process.