Documentation ¶
Overview ¶
These APIs allow you to manage Experiments, M Lflow Artifacts, M Lflow Databricks, M Lflow Metrics, M Lflow Runs, Model Version Comments, Model Versions, Registered Models, Registry Webhooks, Transition Requests, etc.
Index ¶
- type Activity
- type ActivityAction
- type ActivityType
- type ApproveResponse
- type ApproveTransitionRequest
- type CommentActivityAction
- type CommentObject
- type CreateComment
- type CreateExperiment
- type CreateExperimentResponse
- type CreateModelVersionRequest
- type CreateModelVersionResponse
- type CreateRegisteredModelRequest
- type CreateRegisteredModelResponse
- type CreateRegistryWebhook
- type CreateResponse
- type CreateRun
- type CreateRunResponse
- type CreateTransitionRequest
- type DeleteExperiment
- type DeleteModelVersionCommentRequest
- type DeleteModelVersionRequest
- type DeleteModelVersionTagRequest
- type DeleteRegisteredModelRequest
- type DeleteRegisteredModelTagRequest
- type DeleteRegistryWebhookRequest
- type DeleteRun
- type DeleteTag
- type DeleteTransitionRequestRequest
- type Experiment
- type ExperimentTag
- type ExperimentsAPI
- func (a *ExperimentsAPI) Create(ctx context.Context, request CreateExperiment) (*CreateExperimentResponse, error)
- func (a *ExperimentsAPI) Delete(ctx context.Context, request DeleteExperiment) error
- func (a *ExperimentsAPI) DeleteByExperimentId(ctx context.Context, experimentId string) error
- func (a *ExperimentsAPI) Get(ctx context.Context, request GetExperimentRequest) (*Experiment, error)
- func (a *ExperimentsAPI) GetByExperimentId(ctx context.Context, experimentId string) (*Experiment, error)
- func (a *ExperimentsAPI) GetByName(ctx context.Context, request GetByNameRequest) (*GetExperimentByNameResponse, error)
- func (a *ExperimentsAPI) GetByNameByExperimentName(ctx context.Context, experimentName string) (*GetExperimentByNameResponse, error)
- func (a *ExperimentsAPI) Impl() ExperimentsService
- func (a *ExperimentsAPI) ListAll(ctx context.Context, request ListExperimentsRequest) ([]Experiment, error)
- func (a *ExperimentsAPI) Restore(ctx context.Context, request RestoreExperiment) error
- func (a *ExperimentsAPI) RestoreByExperimentId(ctx context.Context, experimentId string) error
- func (a *ExperimentsAPI) SearchAll(ctx context.Context, request SearchExperiments) ([]Experiment, error)
- func (a *ExperimentsAPI) SetExperimentTag(ctx context.Context, request SetExperimentTag) error
- func (a *ExperimentsAPI) Update(ctx context.Context, request UpdateExperiment) error
- func (a *ExperimentsAPI) WithImpl(impl ExperimentsService) *ExperimentsAPI
- type ExperimentsService
- type FileInfo
- type GetByNameRequest
- type GetExperimentByNameResponse
- type GetExperimentRequest
- type GetHistoryRequest
- type GetLatestVersionsRequest
- type GetLatestVersionsResponse
- type GetMLflowDatabrickRequest
- type GetMetricHistoryResponse
- type GetModelVersionDownloadUriRequest
- type GetModelVersionDownloadUriResponse
- type GetModelVersionRequest
- type GetModelVersionResponse
- type GetRegisteredModelRequest
- type GetRegisteredModelResponse
- type GetResponse
- type GetRunRequest
- type GetRunResponse
- type HttpUrlSpec
- type HttpUrlSpecWithoutSecret
- type JobSpec
- type JobSpecWithoutSecret
- type ListArtifactsRequest
- type ListArtifactsResponse
- type ListExperimentsRequest
- type ListExperimentsResponse
- type ListRegisteredModelsRequest
- type ListRegisteredModelsResponse
- type ListRegistryWebhooks
- type ListRegistryWebhooksRequest
- type ListResponse
- type ListTransitionRequestsRequest
- type LogBatch
- type LogMetric
- type LogModel
- type LogParam
- type MLflowArtifactsAPI
- type MLflowArtifactsService
- type MLflowDatabricksAPI
- func (a *MLflowDatabricksAPI) Get(ctx context.Context, request GetMLflowDatabrickRequest) (*GetResponse, error)
- func (a *MLflowDatabricksAPI) GetByName(ctx context.Context, name string) (*GetResponse, error)
- func (a *MLflowDatabricksAPI) Impl() MLflowDatabricksService
- func (a *MLflowDatabricksAPI) TransitionStage(ctx context.Context, request TransitionModelVersionStageDatabricks) (*TransitionStageResponse, error)
- func (a *MLflowDatabricksAPI) WithImpl(impl MLflowDatabricksService) *MLflowDatabricksAPI
- type MLflowDatabricksService
- type MLflowMetricsAPI
- type MLflowMetricsService
- type MLflowRunsAPI
- func (a *MLflowRunsAPI) Create(ctx context.Context, request CreateRun) (*CreateRunResponse, error)
- func (a *MLflowRunsAPI) Delete(ctx context.Context, request DeleteRun) error
- func (a *MLflowRunsAPI) DeleteByRunId(ctx context.Context, runId string) error
- func (a *MLflowRunsAPI) DeleteTag(ctx context.Context, request DeleteTag) error
- func (a *MLflowRunsAPI) Get(ctx context.Context, request GetRunRequest) (*GetRunResponse, error)
- func (a *MLflowRunsAPI) Impl() MLflowRunsService
- func (a *MLflowRunsAPI) LogBatch(ctx context.Context, request LogBatch) error
- func (a *MLflowRunsAPI) LogMetric(ctx context.Context, request LogMetric) error
- func (a *MLflowRunsAPI) LogModel(ctx context.Context, request LogModel) error
- func (a *MLflowRunsAPI) LogParameter(ctx context.Context, request LogParam) error
- func (a *MLflowRunsAPI) Restore(ctx context.Context, request RestoreRun) error
- func (a *MLflowRunsAPI) RestoreByRunId(ctx context.Context, runId string) error
- func (a *MLflowRunsAPI) SearchAll(ctx context.Context, request SearchRuns) ([]Run, error)
- func (a *MLflowRunsAPI) SetTag(ctx context.Context, request SetTag) error
- func (a *MLflowRunsAPI) Update(ctx context.Context, request UpdateRun) (*UpdateRunResponse, error)
- func (a *MLflowRunsAPI) WithImpl(impl MLflowRunsService) *MLflowRunsAPI
- type MLflowRunsService
- type Metric
- type ModelVersion
- type ModelVersionCommentsAPI
- func (a *ModelVersionCommentsAPI) Create(ctx context.Context, request CreateComment) (*CreateResponse, error)
- func (a *ModelVersionCommentsAPI) Delete(ctx context.Context, request DeleteModelVersionCommentRequest) error
- func (a *ModelVersionCommentsAPI) DeleteById(ctx context.Context, id string) error
- func (a *ModelVersionCommentsAPI) Impl() ModelVersionCommentsService
- func (a *ModelVersionCommentsAPI) Update(ctx context.Context, request UpdateComment) (*UpdateResponse, error)
- func (a *ModelVersionCommentsAPI) WithImpl(impl ModelVersionCommentsService) *ModelVersionCommentsAPI
- type ModelVersionCommentsService
- type ModelVersionDatabricks
- type ModelVersionStatus
- type ModelVersionTag
- type ModelVersionsAPI
- func (a *ModelVersionsAPI) Create(ctx context.Context, request CreateModelVersionRequest) (*CreateModelVersionResponse, error)
- func (a *ModelVersionsAPI) Delete(ctx context.Context, request DeleteModelVersionRequest) error
- func (a *ModelVersionsAPI) DeleteTag(ctx context.Context, request DeleteModelVersionTagRequest) error
- func (a *ModelVersionsAPI) Get(ctx context.Context, request GetModelVersionRequest) (*GetModelVersionResponse, error)
- func (a *ModelVersionsAPI) GetDownloadUri(ctx context.Context, request GetModelVersionDownloadUriRequest) (*GetModelVersionDownloadUriResponse, error)
- func (a *ModelVersionsAPI) Impl() ModelVersionsService
- func (a *ModelVersionsAPI) SearchAll(ctx context.Context, request SearchModelVersionsRequest) ([]ModelVersion, error)
- func (a *ModelVersionsAPI) SetTag(ctx context.Context, request SetModelVersionTagRequest) error
- func (a *ModelVersionsAPI) TransitionStage(ctx context.Context, request TransitionModelVersionStage) (*TransitionModelVersionStageResponse, error)
- func (a *ModelVersionsAPI) Update(ctx context.Context, request UpdateModelVersionRequest) error
- func (a *ModelVersionsAPI) WithImpl(impl ModelVersionsService) *ModelVersionsAPI
- type ModelVersionsService
- type Param
- type PermissionLevel
- type RegisteredModel
- type RegisteredModelDatabricks
- type RegisteredModelTag
- type RegisteredModelsAPI
- func (a *RegisteredModelsAPI) Create(ctx context.Context, request CreateRegisteredModelRequest) (*CreateRegisteredModelResponse, error)
- func (a *RegisteredModelsAPI) Delete(ctx context.Context, request DeleteRegisteredModelRequest) error
- func (a *RegisteredModelsAPI) DeleteByName(ctx context.Context, name string) error
- func (a *RegisteredModelsAPI) DeleteTag(ctx context.Context, request DeleteRegisteredModelTagRequest) error
- func (a *RegisteredModelsAPI) Get(ctx context.Context, request GetRegisteredModelRequest) (*GetRegisteredModelResponse, error)
- func (a *RegisteredModelsAPI) GetByName(ctx context.Context, name string) (*GetRegisteredModelResponse, error)
- func (a *RegisteredModelsAPI) GetLatestVersionsAll(ctx context.Context, request GetLatestVersionsRequest) ([]ModelVersion, error)
- func (a *RegisteredModelsAPI) Impl() RegisteredModelsService
- func (a *RegisteredModelsAPI) ListAll(ctx context.Context, request ListRegisteredModelsRequest) ([]RegisteredModel, error)
- func (a *RegisteredModelsAPI) Rename(ctx context.Context, request RenameRegisteredModelRequest) (*RenameRegisteredModelResponse, error)
- func (a *RegisteredModelsAPI) SearchAll(ctx context.Context, request SearchRegisteredModelsRequest) ([]RegisteredModel, error)
- func (a *RegisteredModelsAPI) SetTag(ctx context.Context, request SetRegisteredModelTagRequest) error
- func (a *RegisteredModelsAPI) Update(ctx context.Context, request UpdateRegisteredModelRequest) error
- func (a *RegisteredModelsAPI) WithImpl(impl RegisteredModelsService) *RegisteredModelsAPI
- type RegisteredModelsService
- type RegistryWebhook
- type RegistryWebhookEvent
- type RegistryWebhookStatus
- type RegistryWebhooksAPI
- func (a *RegistryWebhooksAPI) Create(ctx context.Context, request CreateRegistryWebhook) (*CreateResponse, error)
- func (a *RegistryWebhooksAPI) Delete(ctx context.Context, request DeleteRegistryWebhookRequest) error
- func (a *RegistryWebhooksAPI) DeleteById(ctx context.Context, id string) error
- func (a *RegistryWebhooksAPI) Impl() RegistryWebhooksService
- func (a *RegistryWebhooksAPI) ListAll(ctx context.Context, request ListRegistryWebhooksRequest) ([]RegistryWebhook, error)
- func (a *RegistryWebhooksAPI) Test(ctx context.Context, request TestRegistryWebhookRequest) (*TestRegistryWebhookResponse, error)
- func (a *RegistryWebhooksAPI) Update(ctx context.Context, request UpdateRegistryWebhook) error
- func (a *RegistryWebhooksAPI) WithImpl(impl RegistryWebhooksService) *RegistryWebhooksAPI
- type RegistryWebhooksService
- type RejectResponse
- type RejectTransitionRequest
- type RenameRegisteredModelRequest
- type RenameRegisteredModelResponse
- type RestoreExperiment
- type RestoreRun
- type Run
- type RunData
- type RunInfo
- type RunInfoStatus
- type RunTag
- type SearchExperiments
- type SearchExperimentsResponse
- type SearchExperimentsViewType
- type SearchModelVersionsRequest
- type SearchModelVersionsResponse
- type SearchRegisteredModelsRequest
- type SearchRegisteredModelsResponse
- type SearchRuns
- type SearchRunsResponse
- type SearchRunsRunViewType
- type SetExperimentTag
- type SetModelVersionTagRequest
- type SetRegisteredModelTagRequest
- type SetTag
- type Stage
- type Status
- type TestRegistryWebhook
- type TestRegistryWebhookRequest
- type TestRegistryWebhookResponse
- type TransitionModelVersionStage
- type TransitionModelVersionStageDatabricks
- type TransitionModelVersionStageResponse
- type TransitionRequest
- type TransitionRequestsAPI
- func (a *TransitionRequestsAPI) Approve(ctx context.Context, request ApproveTransitionRequest) (*ApproveResponse, error)
- func (a *TransitionRequestsAPI) Create(ctx context.Context, request CreateTransitionRequest) (*CreateResponse, error)
- func (a *TransitionRequestsAPI) Delete(ctx context.Context, request DeleteTransitionRequestRequest) error
- func (a *TransitionRequestsAPI) Impl() TransitionRequestsService
- func (a *TransitionRequestsAPI) ListAll(ctx context.Context, request ListTransitionRequestsRequest) ([]Activity, error)
- func (a *TransitionRequestsAPI) Reject(ctx context.Context, request RejectTransitionRequest) (*RejectResponse, error)
- func (a *TransitionRequestsAPI) WithImpl(impl TransitionRequestsService) *TransitionRequestsAPI
- type TransitionRequestsService
- type TransitionStageResponse
- type UpdateComment
- type UpdateExperiment
- type UpdateModelVersionRequest
- type UpdateRegisteredModelRequest
- type UpdateRegistryWebhook
- type UpdateResponse
- type UpdateRun
- type UpdateRunResponse
- type UpdateRunStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Activity ¶
type Activity struct { // This describes an enum ActivityType ActivityType `json:"activity_type,omitempty"` // User-provided comment associated with the activity. Comment string `json:"comment,omitempty"` // Creation time of the object, as a Unix timestamp in milliseconds. CreationTimestamp int64 `json:"creation_timestamp,omitempty"` // Source stage of the transition (if the activity is stage transition // related). Valid values are: // // * `None`: The initial stage of a model version. // // * `Staging`: Staging or pre-production stage. // // * `Production`: Production stage. // // * `Archived`: Archived stage. FromStage Stage `json:"from_stage,omitempty"` // Unique identifier for the object. Id string `json:"id,omitempty"` // Time of the object at last update, as a Unix timestamp in milliseconds. LastUpdatedTimestamp int64 `json:"last_updated_timestamp,omitempty"` // Comment made by system, for example explaining an activity of type // `SYSTEM_TRANSITION`. It usually describes a side effect, such as a // version being archived as part of another version's stage transition, and // may not be returned for some activity types. SystemComment string `json:"system_comment,omitempty"` // Target stage of the transition (if the activity is stage transition // related). Valid values are: // // * `None`: The initial stage of a model version. // // * `Staging`: Staging or pre-production stage. // // * `Production`: Production stage. // // * `Archived`: Archived stage. ToStage Stage `json:"to_stage,omitempty"` // The username of the user that created the object. UserId string `json:"user_id,omitempty"` }
Activity recorded for the action.
type ActivityAction ¶
type ActivityAction string
This describes an enum
const ActivityActionApproveTransitionRequest ActivityAction = `APPROVE_TRANSITION_REQUEST`
Approve a transition request
const ActivityActionCancelTransitionRequest ActivityAction = `CANCEL_TRANSITION_REQUEST`
Cancel (delete) a transition request
const ActivityActionRejectTransitionRequest ActivityAction = `REJECT_TRANSITION_REQUEST`
Reject a transition request
func (*ActivityAction) Set ¶ added in v0.2.0
func (aa *ActivityAction) Set(v string) error
Set raw string value and validate it against allowed values
func (*ActivityAction) String ¶ added in v0.2.0
func (aa *ActivityAction) String() string
String representation for fmt.Print
func (*ActivityAction) Type ¶ added in v0.2.0
func (aa *ActivityAction) Type() string
Type always returns ActivityAction to satisfy [pflag.Value] interface
type ActivityType ¶
type ActivityType string
This describes an enum
const ActivityTypeAppliedTransition ActivityType = `APPLIED_TRANSITION`
User applied the corresponding stage transition.
const ActivityTypeApprovedRequest ActivityType = `APPROVED_REQUEST`
User approved the corresponding stage transition.
const ActivityTypeCancelledRequest ActivityType = `CANCELLED_REQUEST`
User cancelled an existing transition request.
const ActivityTypeNewComment ActivityType = `NEW_COMMENT`
const ActivityTypeRejectedRequest ActivityType = `REJECTED_REQUEST`
User rejected the coressponding stage transition.
const ActivityTypeRequestedTransition ActivityType = `REQUESTED_TRANSITION`
User requested the corresponding stage transition.
const ActivityTypeSystemTransition ActivityType = `SYSTEM_TRANSITION`
For events performed as a side effect, such as archiving existing model versions in a stage.
func (*ActivityType) Set ¶ added in v0.2.0
func (at *ActivityType) Set(v string) error
Set raw string value and validate it against allowed values
func (*ActivityType) String ¶ added in v0.2.0
func (at *ActivityType) String() string
String representation for fmt.Print
func (*ActivityType) Type ¶ added in v0.2.0
func (at *ActivityType) Type() string
Type always returns ActivityType to satisfy [pflag.Value] interface
type ApproveResponse ¶
type ApproveResponse struct { // Activity recorded for the action. Activity *Activity `json:"activity,omitempty"` }
type ApproveTransitionRequest ¶
type ApproveTransitionRequest struct { // Specifies whether to archive all current model versions in the target // stage. ArchiveExistingVersions bool `json:"archive_existing_versions"` // User-provided comment on the action. Comment string `json:"comment,omitempty"` // Name of the model. Name string `json:"name"` // Target stage of the transition. Valid values are: // // * `None`: The initial stage of a model version. // // * `Staging`: Staging or pre-production stage. // // * `Production`: Production stage. // // * `Archived`: Archived stage. Stage Stage `json:"stage"` // Version of the model. Version string `json:"version"` }
type CommentActivityAction ¶
type CommentActivityAction string
This describes an enum
const CommentActivityActionDeleteComment CommentActivityAction = `DELETE_COMMENT`
Delete the comment
const CommentActivityActionEditComment CommentActivityAction = `EDIT_COMMENT`
Edit the comment
func (*CommentActivityAction) Set ¶ added in v0.2.0
func (caa *CommentActivityAction) Set(v string) error
Set raw string value and validate it against allowed values
func (*CommentActivityAction) String ¶ added in v0.2.0
func (caa *CommentActivityAction) String() string
String representation for fmt.Print
func (*CommentActivityAction) Type ¶ added in v0.2.0
func (caa *CommentActivityAction) Type() string
Type always returns CommentActivityAction to satisfy [pflag.Value] interface
type CommentObject ¶
type CommentObject struct { // Array of actions on the activity allowed for the current viewer. AvailableActions []CommentActivityAction `json:"available_actions,omitempty"` // User-provided comment on the action. Comment string `json:"comment,omitempty"` // Creation time of the object, as a Unix timestamp in milliseconds. CreationTimestamp int64 `json:"creation_timestamp,omitempty"` // Time of the object at last update, as a Unix timestamp in milliseconds. LastUpdatedTimestamp int64 `json:"last_updated_timestamp,omitempty"` // The username of the user that created the object. UserId string `json:"user_id,omitempty"` }
Comment details.
type CreateComment ¶
type CreateExperiment ¶
type CreateExperiment struct { // Location where all artifacts for the experiment are stored. If not // provided, the remote server will select an appropriate default. ArtifactLocation string `json:"artifact_location,omitempty"` // Experiment name. Name string `json:"name"` // A collection of tags to set on the experiment. Maximum tag size and // number of tags per request depends on the storage backend. All storage // backends are guaranteed to support tag keys up to 250 bytes in size and // tag values up to 5000 bytes in size. All storage backends are also // guaranteed to support up to 20 tags per request. Tags []ExperimentTag `json:"tags,omitempty"` }
type CreateExperimentResponse ¶
type CreateExperimentResponse struct { // Unique identifier for the experiment. ExperimentId string `json:"experiment_id,omitempty"` }
type CreateModelVersionRequest ¶
type CreateModelVersionRequest struct { // Optional description for model version. Description string `json:"description,omitempty"` // Register model under this name Name string `json:"name"` // MLflow run ID for correlation, if `source` was generated by an experiment // run in MLflow tracking server RunId string `json:"run_id,omitempty"` // MLflow run link - this is the exact link of the run that generated this // model version, potentially hosted at another instance of MLflow. RunLink string `json:"run_link,omitempty"` // URI indicating the location of the model artifacts. Source string `json:"source"` // Additional metadata for model version. Tags []ModelVersionTag `json:"tags,omitempty"` }
type CreateModelVersionResponse ¶
type CreateModelVersionResponse struct { // Return new version number generated for this model in registry. ModelVersion *ModelVersion `json:"model_version,omitempty"` }
type CreateRegisteredModelRequest ¶
type CreateRegisteredModelRequest struct { // Optional description for registered model. Description string `json:"description,omitempty"` // Register models under this name Name string `json:"name"` // Additional metadata for registered model. Tags []RegisteredModelTag `json:"tags,omitempty"` }
type CreateRegisteredModelResponse ¶
type CreateRegisteredModelResponse struct {
RegisteredModel *RegisteredModel `json:"registered_model,omitempty"`
}
type CreateRegistryWebhook ¶
type CreateRegistryWebhook struct { // User-specified description for the webhook. Description string `json:"description,omitempty"` // Events that can trigger a registry webhook: * `MODEL_VERSION_CREATED`: A // new model version was created for the associated model. // // * `MODEL_VERSION_TRANSITIONED_STAGE`: A model version’s stage was // changed. // // * `TRANSITION_REQUEST_CREATED`: A user requested a model version’s // stage be transitioned. // // * `COMMENT_CREATED`: A user wrote a comment on a registered model. // // * `REGISTERED_MODEL_CREATED`: A new registered model was created. This // event type can only be specified for a registry-wide webhook, which can // be created by not specifying a model name in the create request. // // * `MODEL_VERSION_TAG_SET`: A user set a tag on the model version. // // * `MODEL_VERSION_TRANSITIONED_TO_STAGING`: A model version was // transitioned to staging. // // * `MODEL_VERSION_TRANSITIONED_TO_PRODUCTION`: A model version was // transitioned to production. // // * `MODEL_VERSION_TRANSITIONED_TO_ARCHIVED`: A model version was archived. // // * `TRANSITION_REQUEST_TO_STAGING_CREATED`: A user requested a model // version be transitioned to staging. // // * `TRANSITION_REQUEST_TO_PRODUCTION_CREATED`: A user requested a model // version be transitioned to production. // // * `TRANSITION_REQUEST_TO_ARCHIVED_CREATED`: A user requested a model // version be archived. Events []RegistryWebhookEvent `json:"events"` HttpUrlSpec *HttpUrlSpec `json:"http_url_spec,omitempty"` JobSpec *JobSpec `json:"job_spec,omitempty"` // Name of the model whose events would trigger this webhook. ModelName string `json:"model_name,omitempty"` // This describes an enum Status RegistryWebhookStatus `json:"status,omitempty"` }
type CreateResponse ¶
type CreateResponse struct { // Comment details. Comment *CommentObject `json:"comment,omitempty"` }
type CreateRun ¶
type CreateRun struct { // ID of the associated experiment. ExperimentId string `json:"experiment_id,omitempty"` // Unix timestamp in milliseconds of when the run started. StartTime int64 `json:"start_time,omitempty"` // Additional metadata for run. Tags []RunTag `json:"tags,omitempty"` // ID of the user executing the run. This field is deprecated as of MLflow // 1.0, and will be removed in a future MLflow release. Use 'mlflow.user' // tag instead. UserId string `json:"user_id,omitempty"` }
type CreateRunResponse ¶
type CreateRunResponse struct { // The newly created run. Run *Run `json:"run,omitempty"` }
type CreateTransitionRequest ¶
type CreateTransitionRequest struct { // User-provided comment on the action. Comment string `json:"comment,omitempty"` // Name of the model. Name string `json:"name"` // Target stage of the transition. Valid values are: // // * `None`: The initial stage of a model version. // // * `Staging`: Staging or pre-production stage. // // * `Production`: Production stage. // // * `Archived`: Archived stage. Stage Stage `json:"stage"` // Version of the model. Version string `json:"version"` }
type DeleteExperiment ¶
type DeleteExperiment struct { // ID of the associated experiment. ExperimentId string `json:"experiment_id"` }
type DeleteModelVersionCommentRequest ¶
type DeleteModelVersionCommentRequest struct {
Id string `json:"-" url:"id"`
}
Delete a comment
type DeleteModelVersionRequest ¶
type DeleteModelVersionRequest struct { // Name of the registered model Name string `json:"-" url:"name"` // Model version number Version string `json:"-" url:"version"` }
Delete a model version.
type DeleteModelVersionTagRequest ¶
type DeleteModelVersionTagRequest struct { // Name of the tag. The name must be an exact match; wild-card deletion is // not supported. Maximum size is 250 bytes. Key string `json:"-" url:"key"` // Name of the registered model that the tag was logged under. Name string `json:"-" url:"name"` // Model version number that the tag was logged under. Version string `json:"-" url:"version"` }
Delete a model version tag
type DeleteRegisteredModelRequest ¶
type DeleteRegisteredModelRequest struct { // Registered model unique name identifier. Name string `json:"-" url:"name"` }
Delete a model
type DeleteRegisteredModelTagRequest ¶
type DeleteRegisteredModelTagRequest struct { // Name of the tag. The name must be an exact match; wild-card deletion is // not supported. Maximum size is 250 bytes. Key string `json:"-" url:"key"` // Name of the registered model that the tag was logged under. Name string `json:"-" url:"name"` }
Delete a model tag
type DeleteRegistryWebhookRequest ¶
type DeleteRegistryWebhookRequest struct { // Webhook ID required to delete a registry webhook. Id string `json:"-" url:"id,omitempty"` }
Delete a webhook
type DeleteTransitionRequestRequest ¶
type DeleteTransitionRequestRequest struct { // User-provided comment on the action. Comment string `json:"-" url:"comment,omitempty"` // Username of the user who created this request. Of the transition requests // matching the specified details, only the one transition created by this // user will be deleted. Creator string `json:"-" url:"creator"` // Name of the model. Name string `json:"-" url:"name"` // Target stage of the transition request. Valid values are: // // * `None`: The initial stage of a model version. // // * `Staging`: Staging or pre-production stage. // // * `Production`: Production stage. // // * `Archived`: Archived stage. Stage string `json:"-" url:"stage"` // Version of the model. Version string `json:"-" url:"version"` }
Delete a ransition request
type Experiment ¶
type Experiment struct { // Location where artifacts for the experiment are stored. ArtifactLocation string `json:"artifact_location,omitempty"` // Creation time CreationTime int64 `json:"creation_time,omitempty"` // Unique identifier for the experiment. ExperimentId string `json:"experiment_id,omitempty"` // Last update time LastUpdateTime int64 `json:"last_update_time,omitempty"` // Current life cycle stage of the experiment: "active" or "deleted". // Deleted experiments are not returned by APIs. LifecycleStage string `json:"lifecycle_stage,omitempty"` // Human readable name that identifies the experiment. Name string `json:"name,omitempty"` // Tags: Additional metadata key-value pairs. Tags []ExperimentTag `json:"tags,omitempty"` }
type ExperimentTag ¶
type ExperimentsAPI ¶
type ExperimentsAPI struct {
// contains filtered or unexported fields
}
func NewExperiments ¶
func NewExperiments(client *client.DatabricksClient) *ExperimentsAPI
func (*ExperimentsAPI) Create ¶
func (a *ExperimentsAPI) Create(ctx context.Context, request CreateExperiment) (*CreateExperimentResponse, error)
Create experiment.
Creates an experiment with a name. Returns the ID of the newly created experiment. Validates that another experiment with the same name does not already exist and fails if another experiment with the same name already exists.
Throws `RESOURCE_ALREADY_EXISTS` if a experiment with the given name exists.
func (*ExperimentsAPI) Delete ¶
func (a *ExperimentsAPI) Delete(ctx context.Context, request DeleteExperiment) error
Delete an experiment.
Marks an experiment and associated metadata, runs, metrics, params, and tags for deletion. If the experiment uses FileStore, artifacts associated with experiment are also deleted.
func (*ExperimentsAPI) DeleteByExperimentId ¶
func (a *ExperimentsAPI) DeleteByExperimentId(ctx context.Context, experimentId string) error
Delete an experiment.
Marks an experiment and associated metadata, runs, metrics, params, and tags for deletion. If the experiment uses FileStore, artifacts associated with experiment are also deleted.
func (*ExperimentsAPI) Get ¶
func (a *ExperimentsAPI) Get(ctx context.Context, request GetExperimentRequest) (*Experiment, error)
Get an experiment.
Gets metadata for an experiment. This method works on deleted experiments.
func (*ExperimentsAPI) GetByExperimentId ¶
func (a *ExperimentsAPI) GetByExperimentId(ctx context.Context, experimentId string) (*Experiment, error)
Get an experiment.
Gets metadata for an experiment. This method works on deleted experiments.
func (*ExperimentsAPI) GetByName ¶
func (a *ExperimentsAPI) GetByName(ctx context.Context, request GetByNameRequest) (*GetExperimentByNameResponse, error)
Get metadata.
"Gets metadata for an experiment.
This endpoint will return deleted experiments, but prefers the active experiment if an active and deleted experiment share the same name. If multiple deleted experiments share the same name, the API will return one of them.
Throws `RESOURCE_DOES_NOT_EXIST` if no experiment with the specified name exists.S
func (*ExperimentsAPI) GetByNameByExperimentName ¶
func (a *ExperimentsAPI) GetByNameByExperimentName(ctx context.Context, experimentName string) (*GetExperimentByNameResponse, error)
Get metadata.
"Gets metadata for an experiment.
This endpoint will return deleted experiments, but prefers the active experiment if an active and deleted experiment share the same name. If multiple deleted experiments share the same name, the API will return one of them.
Throws `RESOURCE_DOES_NOT_EXIST` if no experiment with the specified name exists.S
func (*ExperimentsAPI) Impl ¶
func (a *ExperimentsAPI) Impl() ExperimentsService
Impl returns low-level Experiments API implementation
func (*ExperimentsAPI) ListAll ¶
func (a *ExperimentsAPI) ListAll(ctx context.Context, request ListExperimentsRequest) ([]Experiment, error)
List experiments.
Gets a list of all experiments.
This method is generated by Databricks SDK Code Generator.
func (*ExperimentsAPI) Restore ¶
func (a *ExperimentsAPI) Restore(ctx context.Context, request RestoreExperiment) error
Restores an experiment.
"Restore an experiment marked for deletion. This also restores associated metadata, runs, metrics, params, and tags. If experiment uses FileStore, underlying artifacts associated with experiment are also restored.
Throws `RESOURCE_DOES_NOT_EXIST` if experiment was never created or was permanently deleted.",
func (*ExperimentsAPI) RestoreByExperimentId ¶
func (a *ExperimentsAPI) RestoreByExperimentId(ctx context.Context, experimentId string) error
Restores an experiment.
"Restore an experiment marked for deletion. This also restores associated metadata, runs, metrics, params, and tags. If experiment uses FileStore, underlying artifacts associated with experiment are also restored.
Throws `RESOURCE_DOES_NOT_EXIST` if experiment was never created or was permanently deleted.",
func (*ExperimentsAPI) SearchAll ¶
func (a *ExperimentsAPI) SearchAll(ctx context.Context, request SearchExperiments) ([]Experiment, error)
Search experiments.
Searches for experiments that satisfy specified search criteria.
This method is generated by Databricks SDK Code Generator.
func (*ExperimentsAPI) SetExperimentTag ¶
func (a *ExperimentsAPI) SetExperimentTag(ctx context.Context, request SetExperimentTag) error
Set a tag.
Sets a tag on an experiment. Experiment tags are metadata that can be updated.
func (*ExperimentsAPI) Update ¶
func (a *ExperimentsAPI) Update(ctx context.Context, request UpdateExperiment) error
Update an experiment.
Updates experiment metadata.
func (*ExperimentsAPI) WithImpl ¶
func (a *ExperimentsAPI) WithImpl(impl ExperimentsService) *ExperimentsAPI
WithImpl could be used to override low-level API implementations for unit testing purposes with github.com/golang/mock or other mocking frameworks.
type ExperimentsService ¶
type ExperimentsService interface { // Create experiment. // // Creates an experiment with a name. Returns the ID of the newly created // experiment. Validates that another experiment with the same name does not // already exist and fails if another experiment with the same name already // exists. // // Throws `RESOURCE_ALREADY_EXISTS` if a experiment with the given name // exists. Create(ctx context.Context, request CreateExperiment) (*CreateExperimentResponse, error) // Delete an experiment. // // Marks an experiment and associated metadata, runs, metrics, params, and // tags for deletion. If the experiment uses FileStore, artifacts associated // with experiment are also deleted. Delete(ctx context.Context, request DeleteExperiment) error // Get an experiment. // // Gets metadata for an experiment. This method works on deleted // experiments. Get(ctx context.Context, request GetExperimentRequest) (*Experiment, error) // Get metadata. // // "Gets metadata for an experiment. // // This endpoint will return deleted experiments, but prefers the active // experiment if an active and deleted experiment share the same name. If // multiple deleted experiments share the same name, the API will return one // of them. // // Throws `RESOURCE_DOES_NOT_EXIST` if no experiment with the specified name // exists.S GetByName(ctx context.Context, request GetByNameRequest) (*GetExperimentByNameResponse, error) // List experiments. // // Gets a list of all experiments. // // Use ListAll() to get all Experiment instances, which will iterate over every result page. List(ctx context.Context, request ListExperimentsRequest) (*ListExperimentsResponse, error) // Restores an experiment. // // "Restore an experiment marked for deletion. This also restores associated // metadata, runs, metrics, params, and tags. If experiment uses FileStore, // underlying artifacts associated with experiment are also restored. // // Throws `RESOURCE_DOES_NOT_EXIST` if experiment was never created or was // permanently deleted.", Restore(ctx context.Context, request RestoreExperiment) error // Search experiments. // // Searches for experiments that satisfy specified search criteria. // // Use SearchAll() to get all Experiment instances, which will iterate over every result page. Search(ctx context.Context, request SearchExperiments) (*SearchExperimentsResponse, error) // Set a tag. // // Sets a tag on an experiment. Experiment tags are metadata that can be // updated. SetExperimentTag(ctx context.Context, request SetExperimentTag) error // Update an experiment. // // Updates experiment metadata. Update(ctx context.Context, request UpdateExperiment) error }
type GetByNameRequest ¶
type GetByNameRequest struct { // Name of the associated experiment. ExperimentName string `json:"-" url:"experiment_name"` }
Get metadata
type GetExperimentByNameResponse ¶
type GetExperimentByNameResponse struct { // Experiment details. Experiment *Experiment `json:"experiment,omitempty"` }
type GetExperimentRequest ¶
type GetExperimentRequest struct { // ID of the associated experiment. ExperimentId string `json:"-" url:"experiment_id"` }
Get an experiment
type GetHistoryRequest ¶
type GetHistoryRequest struct { // Maximum number of Metric records to return per paginated request. Default // is set to 25,000. If set higher than 25,000, a request Exception will be // raised. MaxResults int `json:"-" url:"max_results,omitempty"` // Name of the metric. MetricKey string `json:"-" url:"metric_key"` // Token indicating the page of metric histories to fetch. PageToken string `json:"-" url:"page_token,omitempty"` // ID of the run from which to fetch metric values. Must be provided. RunId string `json:"-" url:"run_id,omitempty"` // [Deprecated, use run_id instead] ID of the run from which to fetch metric // values. This field will be removed in a future MLflow version. RunUuid string `json:"-" url:"run_uuid,omitempty"` }
Get history of a given metric within a run
type GetLatestVersionsResponse ¶
type GetLatestVersionsResponse struct { // Latest version models for each requests stage. Only return models with // current `READY` status. If no `stages` provided, returns the latest // version for each stage, including `"None"`. ModelVersions []ModelVersion `json:"model_versions,omitempty"` }
type GetMLflowDatabrickRequest ¶
type GetMLflowDatabrickRequest struct { // Name of the model. Name string `json:"-" url:"name"` }
Get model
type GetModelVersionDownloadUriRequest ¶
type GetModelVersionDownloadUriRequest struct { // Name of the registered model Name string `json:"-" url:"name"` // Model version number Version string `json:"-" url:"version"` }
Get a model version URI
type GetModelVersionDownloadUriResponse ¶
type GetModelVersionDownloadUriResponse struct { // URI corresponding to where artifacts for this model version are stored. ArtifactUri string `json:"artifact_uri,omitempty"` }
type GetModelVersionRequest ¶
type GetModelVersionRequest struct { // Name of the registered model Name string `json:"-" url:"name"` // Model version number Version string `json:"-" url:"version"` }
Get a model version
type GetModelVersionResponse ¶
type GetModelVersionResponse struct {
ModelVersion *ModelVersion `json:"model_version,omitempty"`
}
type GetRegisteredModelRequest ¶
type GetRegisteredModelRequest struct { // Registered model unique name identifier. Name string `json:"-" url:"name"` }
Get a model
type GetRegisteredModelResponse ¶
type GetRegisteredModelResponse struct {
RegisteredModel *RegisteredModel `json:"registered_model,omitempty"`
}
type GetResponse ¶
type GetResponse struct {
RegisteredModel *RegisteredModelDatabricks `json:"registered_model,omitempty"`
}
type GetRunRequest ¶
type GetRunRequest struct { // ID of the run to fetch. Must be provided. RunId string `json:"-" url:"run_id"` // [Deprecated, use run_id instead] ID of the run to fetch. This field will // be removed in a future MLflow version. RunUuid string `json:"-" url:"run_uuid,omitempty"` }
Get a run
type GetRunResponse ¶
type GetRunResponse struct { // Run metadata (name, start time, etc) and data (metrics, params, and // tags). Run *Run `json:"run,omitempty"` }
type HttpUrlSpec ¶
type HttpUrlSpec struct { // Value of the authorization header that should be sent in the request sent // by the wehbook. It should be of the form `"<auth type> <credentials>"`. // If set to an empty string, no authorization header will be included in // the request. Authorization string `json:"authorization,omitempty"` // Enable/disable SSL certificate validation. Default is true. For // self-signed certificates, this field must be false AND the destination // server must disable certificate validation as well. For security // purposes, it is encouraged to perform secret validation with the // HMAC-encoded portion of the payload and acknowledge the risk associated // with disabling hostname validation whereby it becomes more likely that // requests can be maliciously routed to an unintended host. EnableSslVerification bool `json:"enable_ssl_verification,omitempty"` // Shared secret required for HMAC encoding payload. The HMAC-encoded // payload will be sent in the header as: { "X-Databricks-Signature": // $encoded_payload }. Secret string `json:"secret,omitempty"` // External HTTPS URL called on event trigger (by using a POST request). Url string `json:"url"` }
type HttpUrlSpecWithoutSecret ¶
type HttpUrlSpecWithoutSecret struct { // Enable/disable SSL certificate validation. Default is true. For // self-signed certificates, this field must be false AND the destination // server must disable certificate validation as well. For security // purposes, it is encouraged to perform secret validation with the // HMAC-encoded portion of the payload and acknowledge the risk associated // with disabling hostname validation whereby it becomes more likely that // requests can be maliciously routed to an unintended host. EnableSslVerification bool `json:"enable_ssl_verification,omitempty"` // External HTTPS URL called on event trigger (by using a POST request). Url string `json:"url,omitempty"` }
type JobSpec ¶
type JobSpec struct { // The personal access token used to authorize webhook's job runs. AccessToken string `json:"access_token"` // ID of the job that the webhook runs. JobId string `json:"job_id"` // URL of the workspace containing the job that this webhook runs. If not // specified, the job’s workspace URL is assumed to be the same as the // workspace where the webhook is created. WorkspaceUrl string `json:"workspace_url,omitempty"` }
type JobSpecWithoutSecret ¶
type JobSpecWithoutSecret struct { // ID of the job that the webhook runs. JobId string `json:"job_id,omitempty"` // URL of the workspace containing the job that this webhook runs. Defaults // to the workspace URL in which the webhook is created. If not specified, // the job’s workspace is assumed to be the same as the webhook’s. WorkspaceUrl string `json:"workspace_url,omitempty"` }
type ListArtifactsRequest ¶
type ListArtifactsRequest struct { // Token indicating the page of artifact results to fetch PageToken string `json:"-" url:"page_token,omitempty"` // Filter artifacts matching this path (a relative path from the root // artifact directory). Path string `json:"-" url:"path,omitempty"` // ID of the run whose artifacts to list. Must be provided. RunId string `json:"-" url:"run_id,omitempty"` // [Deprecated, use run_id instead] ID of the run whose artifacts to list. // This field will be removed in a future MLflow version. RunUuid string `json:"-" url:"run_uuid,omitempty"` }
Get all artifacts
type ListArtifactsResponse ¶
type ListArtifactsResponse struct { // File location and metadata for artifacts. Files []FileInfo `json:"files,omitempty"` // Token that can be used to retrieve the next page of artifact results NextPageToken string `json:"next_page_token,omitempty"` // Root artifact directory for the run. RootUri string `json:"root_uri,omitempty"` }
type ListExperimentsRequest ¶
type ListExperimentsRequest struct { // Maximum number of experiments desired. If `max_results` is unspecified, // return all experiments. If `max_results` is too large, it'll be // automatically capped at 1000. Callers of this endpoint are encouraged to // pass max_results explicitly and leverage page_token to iterate through // experiments. MaxResults int `json:"-" url:"max_results,omitempty"` // Token indicating the page of experiments to fetch PageToken string `json:"-" url:"page_token,omitempty"` // Qualifier for type of experiments to be returned. If unspecified, return // only active experiments. ViewType string `json:"-" url:"view_type,omitempty"` }
List experiments
type ListExperimentsResponse ¶
type ListExperimentsResponse struct { // Paginated Experiments beginning with the first item on the requested // page. Experiments []Experiment `json:"experiments,omitempty"` // Token that can be used to retrieve the next page of experiments. Empty // token means no more experiment is available for retrieval. NextPageToken string `json:"next_page_token,omitempty"` }
type ListRegisteredModelsRequest ¶
type ListRegisteredModelsRequest struct { // Maximum number of registered models desired. Max threshold is 1000. MaxResults int `json:"-" url:"max_results,omitempty"` // Pagination token to go to the next page based on a previous query. PageToken string `json:"-" url:"page_token,omitempty"` }
List models
type ListRegisteredModelsResponse ¶
type ListRegisteredModelsResponse struct { // Pagination token to request next page of models for the same query. NextPageToken string `json:"next_page_token,omitempty"` RegisteredModels []RegisteredModel `json:"registered_models,omitempty"` }
type ListRegistryWebhooks ¶
type ListRegistryWebhooks struct { // Token that can be used to retrieve the next page of artifact results NextPageToken string `json:"next_page_token,omitempty"` // Array of registry webhooks. Webhooks []RegistryWebhook `json:"webhooks,omitempty"` }
type ListRegistryWebhooksRequest ¶
type ListRegistryWebhooksRequest struct { // If `events` is specified, any webhook with one or more of the specified // trigger events is included in the output. If `events` is not specified, // webhooks of all event types are included in the output. Events []RegistryWebhookEvent `json:"-" url:"events,omitempty"` // If not specified, all webhooks associated with the specified events are // listed, regardless of their associated model. ModelName string `json:"-" url:"model_name,omitempty"` // Token indicating the page of artifact results to fetch PageToken string `json:"-" url:"page_token,omitempty"` }
List registry webhooks
type ListResponse ¶
type ListResponse struct { // Array of open transition requests. Requests []Activity `json:"requests,omitempty"` }
type ListTransitionRequestsRequest ¶
type ListTransitionRequestsRequest struct { // Name of the model. Name string `json:"-" url:"name"` // Version of the model. Version string `json:"-" url:"version"` }
List transition requests
type LogBatch ¶
type LogBatch struct { // Metrics to log. A single request can contain up to 1000 metrics, and up // to 1000 metrics, params, and tags in total. Metrics []Metric `json:"metrics,omitempty"` // Params to log. A single request can contain up to 100 params, and up to // 1000 metrics, params, and tags in total. Params []Param `json:"params,omitempty"` // ID of the run to log under RunId string `json:"run_id,omitempty"` // Tags to log. A single request can contain up to 100 tags, and up to 1000 // metrics, params, and tags in total. Tags []RunTag `json:"tags,omitempty"` }
type LogMetric ¶
type LogMetric struct { // Name of the metric. Key string `json:"key"` // ID of the run under which to log the metric. Must be provided. RunId string `json:"run_id,omitempty"` // [Deprecated, use run_id instead] ID of the run under which to log the // metric. This field will be removed in a future MLflow version. RunUuid string `json:"run_uuid,omitempty"` // Step at which to log the metric Step int64 `json:"step,omitempty"` // Unix timestamp in milliseconds at the time metric was logged. Timestamp int64 `json:"timestamp"` // Double value of the metric being logged. Value float64 `json:"value"` }
type LogParam ¶
type LogParam struct { // Name of the param. Maximum size is 255 bytes. Key string `json:"key"` // ID of the run under which to log the param. Must be provided. RunId string `json:"run_id,omitempty"` // [Deprecated, use run_id instead] ID of the run under which to log the // param. This field will be removed in a future MLflow version. RunUuid string `json:"run_uuid,omitempty"` // String value of the param being logged. Maximum size is 500 bytes. Value string `json:"value"` }
type MLflowArtifactsAPI ¶
type MLflowArtifactsAPI struct {
// contains filtered or unexported fields
}
func NewMLflowArtifacts ¶
func NewMLflowArtifacts(client *client.DatabricksClient) *MLflowArtifactsAPI
func (*MLflowArtifactsAPI) Impl ¶
func (a *MLflowArtifactsAPI) Impl() MLflowArtifactsService
Impl returns low-level MLflowArtifacts API implementation
func (*MLflowArtifactsAPI) ListAll ¶
func (a *MLflowArtifactsAPI) ListAll(ctx context.Context, request ListArtifactsRequest) ([]FileInfo, error)
Get all artifacts.
List artifacts for a run. Takes an optional `artifact_path` prefix. If it is specified, the response contains only artifacts with the specified prefix.",
This method is generated by Databricks SDK Code Generator.
func (*MLflowArtifactsAPI) WithImpl ¶
func (a *MLflowArtifactsAPI) WithImpl(impl MLflowArtifactsService) *MLflowArtifactsAPI
WithImpl could be used to override low-level API implementations for unit testing purposes with github.com/golang/mock or other mocking frameworks.
type MLflowArtifactsService ¶
type MLflowArtifactsService interface { // Get all artifacts. // // List artifacts for a run. Takes an optional `artifact_path` prefix. If it // is specified, the response contains only artifacts with the specified // prefix.", // // Use ListAll() to get all FileInfo instances, which will iterate over every result page. List(ctx context.Context, request ListArtifactsRequest) (*ListArtifactsResponse, error) }
type MLflowDatabricksAPI ¶
type MLflowDatabricksAPI struct {
// contains filtered or unexported fields
}
These endpoints are modified versions of the MLflow API that accept additional input parameters or return additional information.
func NewMLflowDatabricks ¶
func NewMLflowDatabricks(client *client.DatabricksClient) *MLflowDatabricksAPI
func (*MLflowDatabricksAPI) Get ¶
func (a *MLflowDatabricksAPI) Get(ctx context.Context, request GetMLflowDatabrickRequest) (*GetResponse, error)
Get model.
Get the details of a model. This is a Databricks Workspace version of the MLflow endpoint that also returns the model's Databricks Workspace ID and the permission level of the requesting user on the model.
func (*MLflowDatabricksAPI) GetByName ¶
func (a *MLflowDatabricksAPI) GetByName(ctx context.Context, name string) (*GetResponse, error)
Get model.
Get the details of a model. This is a Databricks Workspace version of the MLflow endpoint that also returns the model's Databricks Workspace ID and the permission level of the requesting user on the model.
func (*MLflowDatabricksAPI) Impl ¶
func (a *MLflowDatabricksAPI) Impl() MLflowDatabricksService
Impl returns low-level MLflowDatabricks API implementation
func (*MLflowDatabricksAPI) TransitionStage ¶
func (a *MLflowDatabricksAPI) TransitionStage(ctx context.Context, request TransitionModelVersionStageDatabricks) (*TransitionStageResponse, error)
Transition a stage.
Transition a model version's stage. This is a Databricks Workspace version of the MLflow endpoint that also accepts a comment associated with the transition to be recorded.",
func (*MLflowDatabricksAPI) WithImpl ¶
func (a *MLflowDatabricksAPI) WithImpl(impl MLflowDatabricksService) *MLflowDatabricksAPI
WithImpl could be used to override low-level API implementations for unit testing purposes with github.com/golang/mock or other mocking frameworks.
type MLflowDatabricksService ¶
type MLflowDatabricksService interface { // Get model. // // Get the details of a model. This is a Databricks Workspace version of the // [MLflow endpoint] that also returns the model's Databricks Workspace ID // and the permission level of the requesting user on the model. // // [MLflow endpoint]: https://www.mlflow.org/docs/latest/rest-api.html#get-registeredmodel Get(ctx context.Context, request GetMLflowDatabrickRequest) (*GetResponse, error) // Transition a stage. // // Transition a model version's stage. This is a Databricks Workspace // version of the [MLflow endpoint] that also accepts a comment associated // with the transition to be recorded.", // // [MLflow endpoint]: https://www.mlflow.org/docs/latest/rest-api.html#transition-modelversion-stage TransitionStage(ctx context.Context, request TransitionModelVersionStageDatabricks) (*TransitionStageResponse, error) }
These endpoints are modified versions of the MLflow API that accept additional input parameters or return additional information.
type MLflowMetricsAPI ¶
type MLflowMetricsAPI struct {
// contains filtered or unexported fields
}
func NewMLflowMetrics ¶
func NewMLflowMetrics(client *client.DatabricksClient) *MLflowMetricsAPI
func (*MLflowMetricsAPI) GetHistory ¶
func (a *MLflowMetricsAPI) GetHistory(ctx context.Context, request GetHistoryRequest) (*GetMetricHistoryResponse, error)
Get history of a given metric within a run.
Gets a list of all values for the specified metric for a given run.
func (*MLflowMetricsAPI) Impl ¶
func (a *MLflowMetricsAPI) Impl() MLflowMetricsService
Impl returns low-level MLflowMetrics API implementation
func (*MLflowMetricsAPI) WithImpl ¶
func (a *MLflowMetricsAPI) WithImpl(impl MLflowMetricsService) *MLflowMetricsAPI
WithImpl could be used to override low-level API implementations for unit testing purposes with github.com/golang/mock or other mocking frameworks.
type MLflowMetricsService ¶
type MLflowMetricsService interface { // Get history of a given metric within a run. // // Gets a list of all values for the specified metric for a given run. GetHistory(ctx context.Context, request GetHistoryRequest) (*GetMetricHistoryResponse, error) }
type MLflowRunsAPI ¶
type MLflowRunsAPI struct {
// contains filtered or unexported fields
}
func NewMLflowRuns ¶
func NewMLflowRuns(client *client.DatabricksClient) *MLflowRunsAPI
func (*MLflowRunsAPI) Create ¶
func (a *MLflowRunsAPI) Create(ctx context.Context, request CreateRun) (*CreateRunResponse, error)
Create a run.
Creates a new run within an experiment. A run is usually a single execution of a machine learning or data ETL pipeline. MLflow uses runs to track the `mlflowParam`, `mlflowMetric` and `mlflowRunTag` associated with a single execution.
func (*MLflowRunsAPI) Delete ¶
func (a *MLflowRunsAPI) Delete(ctx context.Context, request DeleteRun) error
Delete a run.
Marks a run for deletion.
func (*MLflowRunsAPI) DeleteByRunId ¶
func (a *MLflowRunsAPI) DeleteByRunId(ctx context.Context, runId string) error
Delete a run.
Marks a run for deletion.
func (*MLflowRunsAPI) DeleteTag ¶
func (a *MLflowRunsAPI) DeleteTag(ctx context.Context, request DeleteTag) error
Delete a tag.
Deletes a tag on a run. Tags are run metadata that can be updated during a run and after a run completes.
func (*MLflowRunsAPI) Get ¶
func (a *MLflowRunsAPI) Get(ctx context.Context, request GetRunRequest) (*GetRunResponse, error)
Get a run.
"Gets the metadata, metrics, params, and tags for a run. In the case where multiple metrics with the same key are logged for a run, return only the value with the latest timestamp.
If there are multiple values with the latest timestamp, return the maximum of these values.
func (*MLflowRunsAPI) Impl ¶
func (a *MLflowRunsAPI) Impl() MLflowRunsService
Impl returns low-level MLflowRuns API implementation
func (*MLflowRunsAPI) LogBatch ¶
func (a *MLflowRunsAPI) LogBatch(ctx context.Context, request LogBatch) error
Log a batch.
Logs a batch of metrics, params, and tags for a run. If any data failed to be persisted, the server will respond with an error (non-200 status code).
In case of error (due to internal server error or an invalid request), partial data may be written.
You can write metrics, params, and tags in interleaving fashion, but within a given entity type are guaranteed to follow the order specified in the request body.
The overwrite behavior for metrics, params, and tags is as follows:
* Metrics: metric values are never overwritten. Logging a metric (key, value, timestamp) appends to the set of values for the metric with the provided key.
* Tags: tag values can be overwritten by successive writes to the same tag key. That is, if multiple tag values with the same key are provided in the same API request, the last-provided tag value is written. Logging the same tag (key, value) is permitted. Specifically, logging a tag is idempotent.
* Parameters: once written, param values cannot be changed (attempting to overwrite a param value will result in an error). However, logging the same param (key, value) is permitted. Specifically, logging a param is idempotent.
Request Limits ------------------------------- A single JSON-serialized API request may be up to 1 MB in size and contain:
* No more than 1000 metrics, params, and tags in total * Up to 1000 metrics - Up to 100 params * Up to 100 tags
For example, a valid request might contain 900 metrics, 50 params, and 50 tags, but logging 900 metrics, 50 params, and 51 tags is invalid.
The following limits also apply to metric, param, and tag keys and values:
* Metric keyes, param keys, and tag keys can be up to 250 characters in length * Parameter and tag values can be up to 250 characters in length
func (*MLflowRunsAPI) LogMetric ¶
func (a *MLflowRunsAPI) LogMetric(ctx context.Context, request LogMetric) error
Log a metric.
Logs a metric for a run. A metric is a key-value pair (string key, float value) with an associated timestamp. Examples include the various metrics that represent ML model accuracy. A metric can be logged multiple times.
func (*MLflowRunsAPI) LogModel ¶
func (a *MLflowRunsAPI) LogModel(ctx context.Context, request LogModel) error
Log a model.
**NOTE:** Experimental: This API may change or be removed in a future release without warning.
func (*MLflowRunsAPI) LogParameter ¶
func (a *MLflowRunsAPI) LogParameter(ctx context.Context, request LogParam) error
Log a param.
Logs a param used for a run. A param is a key-value pair (string key, string value). Examples include hyperparameters used for ML model training and constant dates and values used in an ETL pipeline. A param can be logged only once for a run.
func (*MLflowRunsAPI) Restore ¶
func (a *MLflowRunsAPI) Restore(ctx context.Context, request RestoreRun) error
Restore a run.
Restores a deleted run.
func (*MLflowRunsAPI) RestoreByRunId ¶
func (a *MLflowRunsAPI) RestoreByRunId(ctx context.Context, runId string) error
Restore a run.
Restores a deleted run.
func (*MLflowRunsAPI) SearchAll ¶
func (a *MLflowRunsAPI) SearchAll(ctx context.Context, request SearchRuns) ([]Run, error)
Search for runs.
Searches for runs that satisfy expressions.
Search expressions can use `mlflowMetric` and `mlflowParam` keys.",
This method is generated by Databricks SDK Code Generator.
func (*MLflowRunsAPI) SetTag ¶
func (a *MLflowRunsAPI) SetTag(ctx context.Context, request SetTag) error
Set a tag.
Sets a tag on a run. Tags are run metadata that can be updated during a run and after a run completes.
func (*MLflowRunsAPI) Update ¶
func (a *MLflowRunsAPI) Update(ctx context.Context, request UpdateRun) (*UpdateRunResponse, error)
Update a run.
Updates run metadata.
func (*MLflowRunsAPI) WithImpl ¶
func (a *MLflowRunsAPI) WithImpl(impl MLflowRunsService) *MLflowRunsAPI
WithImpl could be used to override low-level API implementations for unit testing purposes with github.com/golang/mock or other mocking frameworks.
type MLflowRunsService ¶
type MLflowRunsService interface { // Create a run. // // Creates a new run within an experiment. A run is usually a single // execution of a machine learning or data ETL pipeline. MLflow uses runs to // track the `mlflowParam`, `mlflowMetric` and `mlflowRunTag` associated // with a single execution. Create(ctx context.Context, request CreateRun) (*CreateRunResponse, error) // Delete a run. // // Marks a run for deletion. Delete(ctx context.Context, request DeleteRun) error // Delete a tag. // // Deletes a tag on a run. Tags are run metadata that can be updated during // a run and after a run completes. DeleteTag(ctx context.Context, request DeleteTag) error // Get a run. // // "Gets the metadata, metrics, params, and tags for a run. In the case // where multiple metrics with the same key are logged for a run, return // only the value with the latest timestamp. // // If there are multiple values with the latest timestamp, return the // maximum of these values. Get(ctx context.Context, request GetRunRequest) (*GetRunResponse, error) // Log a batch. // // Logs a batch of metrics, params, and tags for a run. If any data failed // to be persisted, the server will respond with an error (non-200 status // code). // // In case of error (due to internal server error or an invalid request), // partial data may be written. // // You can write metrics, params, and tags in interleaving fashion, but // within a given entity type are guaranteed to follow the order specified // in the request body. // // The overwrite behavior for metrics, params, and tags is as follows: // // * Metrics: metric values are never overwritten. Logging a metric (key, // value, timestamp) appends to the set of values for the metric with the // provided key. // // * Tags: tag values can be overwritten by successive writes to the same // tag key. That is, if multiple tag values with the same key are provided // in the same API request, the last-provided tag value is written. Logging // the same tag (key, value) is permitted. Specifically, logging a tag is // idempotent. // // * Parameters: once written, param values cannot be changed (attempting to // overwrite a param value will result in an error). However, logging the // same param (key, value) is permitted. Specifically, logging a param is // idempotent. // // Request Limits ------------------------------- A single JSON-serialized // API request may be up to 1 MB in size and contain: // // * No more than 1000 metrics, params, and tags in total * Up to 1000 // metrics - Up to 100 params * Up to 100 tags // // For example, a valid request might contain 900 metrics, 50 params, and 50 // tags, but logging 900 metrics, 50 params, and 51 tags is invalid. // // The following limits also apply to metric, param, and tag keys and // values: // // * Metric keyes, param keys, and tag keys can be up to 250 characters in // length * Parameter and tag values can be up to 250 characters in length LogBatch(ctx context.Context, request LogBatch) error // Log a metric. // // Logs a metric for a run. A metric is a key-value pair (string key, float // value) with an associated timestamp. Examples include the various metrics // that represent ML model accuracy. A metric can be logged multiple times. LogMetric(ctx context.Context, request LogMetric) error // Log a model. // // **NOTE:** Experimental: This API may change or be removed in a future // release without warning. LogModel(ctx context.Context, request LogModel) error // Log a param. // // Logs a param used for a run. A param is a key-value pair (string key, // string value). Examples include hyperparameters used for ML model // training and constant dates and values used in an ETL pipeline. A param // can be logged only once for a run. LogParameter(ctx context.Context, request LogParam) error // Restore a run. // // Restores a deleted run. Restore(ctx context.Context, request RestoreRun) error // Search for runs. // // Searches for runs that satisfy expressions. // // Search expressions can use `mlflowMetric` and `mlflowParam` keys.", // // Use SearchAll() to get all Run instances, which will iterate over every result page. Search(ctx context.Context, request SearchRuns) (*SearchRunsResponse, error) // Set a tag. // // Sets a tag on a run. Tags are run metadata that can be updated during a // run and after a run completes. SetTag(ctx context.Context, request SetTag) error // Update a run. // // Updates run metadata. Update(ctx context.Context, request UpdateRun) (*UpdateRunResponse, error) }
type Metric ¶
type Metric struct { // Key identifying this metric. Key string `json:"key,omitempty"` // Step at which to log the metric. Step int64 `json:"step,omitempty"` // The timestamp at which this metric was recorded. Timestamp int64 `json:"timestamp,omitempty"` // Value associated with this metric. Value float64 `json:"value,omitempty"` }
type ModelVersion ¶
type ModelVersion struct { // Timestamp recorded when this `model_version` was created. CreationTimestamp int64 `json:"creation_timestamp,omitempty"` // Current stage for this `model_version`. CurrentStage string `json:"current_stage,omitempty"` // Description of this `model_version`. Description string `json:"description,omitempty"` // Timestamp recorded when metadata for this `model_version` was last // updated. LastUpdatedTimestamp int64 `json:"last_updated_timestamp,omitempty"` // Unique name of the model Name string `json:"name,omitempty"` // MLflow run ID used when creating `model_version`, if `source` was // generated by an experiment run stored in MLflow tracking server. RunId string `json:"run_id,omitempty"` // Run Link: Direct link to the run that generated this version RunLink string `json:"run_link,omitempty"` // URI indicating the location of the source model artifacts, used when // creating `model_version` Source string `json:"source,omitempty"` // Current status of `model_version` Status ModelVersionStatus `json:"status,omitempty"` // Details on current `status`, if it is pending or failed. StatusMessage string `json:"status_message,omitempty"` // Tags: Additional metadata key-value pairs for this `model_version`. Tags []ModelVersionTag `json:"tags,omitempty"` // User that created this `model_version`. UserId string `json:"user_id,omitempty"` // Model's version number. Version string `json:"version,omitempty"` }
type ModelVersionCommentsAPI ¶
type ModelVersionCommentsAPI struct {
// contains filtered or unexported fields
}
func NewModelVersionComments ¶
func NewModelVersionComments(client *client.DatabricksClient) *ModelVersionCommentsAPI
func (*ModelVersionCommentsAPI) Create ¶
func (a *ModelVersionCommentsAPI) Create(ctx context.Context, request CreateComment) (*CreateResponse, error)
Post a comment.
Posts a comment on a model version. A comment can be submitted either by a user or programmatically to display relevant information about the model. For example, test results or deployment errors.
func (*ModelVersionCommentsAPI) Delete ¶
func (a *ModelVersionCommentsAPI) Delete(ctx context.Context, request DeleteModelVersionCommentRequest) error
Delete a comment.
Deletes a comment on a model version.
func (*ModelVersionCommentsAPI) DeleteById ¶
func (a *ModelVersionCommentsAPI) DeleteById(ctx context.Context, id string) error
Delete a comment.
Deletes a comment on a model version.
func (*ModelVersionCommentsAPI) Impl ¶
func (a *ModelVersionCommentsAPI) Impl() ModelVersionCommentsService
Impl returns low-level ModelVersionComments API implementation
func (*ModelVersionCommentsAPI) Update ¶
func (a *ModelVersionCommentsAPI) Update(ctx context.Context, request UpdateComment) (*UpdateResponse, error)
Update a comment.
Post an edit to a comment on a model version.
func (*ModelVersionCommentsAPI) WithImpl ¶
func (a *ModelVersionCommentsAPI) WithImpl(impl ModelVersionCommentsService) *ModelVersionCommentsAPI
WithImpl could be used to override low-level API implementations for unit testing purposes with github.com/golang/mock or other mocking frameworks.
type ModelVersionCommentsService ¶
type ModelVersionCommentsService interface { // Post a comment. // // Posts a comment on a model version. A comment can be submitted either by // a user or programmatically to display relevant information about the // model. For example, test results or deployment errors. Create(ctx context.Context, request CreateComment) (*CreateResponse, error) // Delete a comment. // // Deletes a comment on a model version. Delete(ctx context.Context, request DeleteModelVersionCommentRequest) error // Update a comment. // // Post an edit to a comment on a model version. Update(ctx context.Context, request UpdateComment) (*UpdateResponse, error) }
type ModelVersionDatabricks ¶
type ModelVersionDatabricks struct { // Creation time of the object, as a Unix timestamp in milliseconds. CreationTimestamp int64 `json:"creation_timestamp,omitempty"` // This describes an enum CurrentStage Stage `json:"current_stage,omitempty"` // User-specified description for the object. Description string `json:"description,omitempty"` // Time of the object at last update, as a Unix timestamp in milliseconds. LastUpdatedTimestamp int64 `json:"last_updated_timestamp,omitempty"` // Name of the model. Name string `json:"name,omitempty"` // Permission level of the requesting user on the object. For what is // allowed at each level, see [MLflow Model permissions](..). PermissionLevel PermissionLevel `json:"permission_level,omitempty"` // Unique identifier for the MLflow tracking run associated with the source // model artifacts. RunId string `json:"run_id,omitempty"` // URL of the run associated with the model artifacts. This field is set at // model version creation time only for model versions whose source run is // from a tracking server that is different from the registry server. RunLink string `json:"run_link,omitempty"` // URI that indicates the location of the source model artifacts. This is // used when creating the model version. Source string `json:"source,omitempty"` // This describes an enum Status Status `json:"status,omitempty"` // Details on the current status, for example why registration failed. StatusMessage string `json:"status_message,omitempty"` // Array of tags that are associated with the model version. Tags []ModelVersionTag `json:"tags,omitempty"` // The username of the user that created the object. UserId string `json:"user_id,omitempty"` // Version of the model. Version string `json:"version,omitempty"` }
type ModelVersionStatus ¶
type ModelVersionStatus string
Current status of `model_version`
const ModelVersionStatusFailedRegistration ModelVersionStatus = `FAILED_REGISTRATION`
const ModelVersionStatusPendingRegistration ModelVersionStatus = `PENDING_REGISTRATION`
const ModelVersionStatusReady ModelVersionStatus = `READY`
func (*ModelVersionStatus) Set ¶ added in v0.2.0
func (mvs *ModelVersionStatus) Set(v string) error
Set raw string value and validate it against allowed values
func (*ModelVersionStatus) String ¶ added in v0.2.0
func (mvs *ModelVersionStatus) String() string
String representation for fmt.Print
func (*ModelVersionStatus) Type ¶ added in v0.2.0
func (mvs *ModelVersionStatus) Type() string
Type always returns ModelVersionStatus to satisfy [pflag.Value] interface
type ModelVersionTag ¶
type ModelVersionsAPI ¶
type ModelVersionsAPI struct {
// contains filtered or unexported fields
}
func NewModelVersions ¶
func NewModelVersions(client *client.DatabricksClient) *ModelVersionsAPI
func (*ModelVersionsAPI) Create ¶
func (a *ModelVersionsAPI) Create(ctx context.Context, request CreateModelVersionRequest) (*CreateModelVersionResponse, error)
Create a model version.
Creates a model version.
func (*ModelVersionsAPI) Delete ¶
func (a *ModelVersionsAPI) Delete(ctx context.Context, request DeleteModelVersionRequest) error
Delete a model version.
Deletes a model version.
func (*ModelVersionsAPI) DeleteTag ¶
func (a *ModelVersionsAPI) DeleteTag(ctx context.Context, request DeleteModelVersionTagRequest) error
Delete a model version tag.
Deletes a model version tag.
func (*ModelVersionsAPI) Get ¶
func (a *ModelVersionsAPI) Get(ctx context.Context, request GetModelVersionRequest) (*GetModelVersionResponse, error)
Get a model version.
Get a model version.
func (*ModelVersionsAPI) GetDownloadUri ¶
func (a *ModelVersionsAPI) GetDownloadUri(ctx context.Context, request GetModelVersionDownloadUriRequest) (*GetModelVersionDownloadUriResponse, error)
Get a model version URI.
Gets a URI to download the model version.
func (*ModelVersionsAPI) Impl ¶
func (a *ModelVersionsAPI) Impl() ModelVersionsService
Impl returns low-level ModelVersions API implementation
func (*ModelVersionsAPI) SearchAll ¶
func (a *ModelVersionsAPI) SearchAll(ctx context.Context, request SearchModelVersionsRequest) ([]ModelVersion, error)
Searches model versions.
Searches for specific model versions based on the supplied __filter__.
This method is generated by Databricks SDK Code Generator.
func (*ModelVersionsAPI) SetTag ¶
func (a *ModelVersionsAPI) SetTag(ctx context.Context, request SetModelVersionTagRequest) error
Set a version tag.
Sets a model version tag.
func (*ModelVersionsAPI) TransitionStage ¶
func (a *ModelVersionsAPI) TransitionStage(ctx context.Context, request TransitionModelVersionStage) (*TransitionModelVersionStageResponse, error)
Transition a stage.
Transition to the next model stage.
func (*ModelVersionsAPI) Update ¶
func (a *ModelVersionsAPI) Update(ctx context.Context, request UpdateModelVersionRequest) error
Update model version.
Updates the model version.
func (*ModelVersionsAPI) WithImpl ¶
func (a *ModelVersionsAPI) WithImpl(impl ModelVersionsService) *ModelVersionsAPI
WithImpl could be used to override low-level API implementations for unit testing purposes with github.com/golang/mock or other mocking frameworks.
type ModelVersionsService ¶
type ModelVersionsService interface { // Create a model version. // // Creates a model version. Create(ctx context.Context, request CreateModelVersionRequest) (*CreateModelVersionResponse, error) // Delete a model version. // // Deletes a model version. Delete(ctx context.Context, request DeleteModelVersionRequest) error // Delete a model version tag. // // Deletes a model version tag. DeleteTag(ctx context.Context, request DeleteModelVersionTagRequest) error // Get a model version. // // Get a model version. Get(ctx context.Context, request GetModelVersionRequest) (*GetModelVersionResponse, error) // Get a model version URI. // // Gets a URI to download the model version. GetDownloadUri(ctx context.Context, request GetModelVersionDownloadUriRequest) (*GetModelVersionDownloadUriResponse, error) // Searches model versions. // // Searches for specific model versions based on the supplied __filter__. // // Use SearchAll() to get all ModelVersion instances, which will iterate over every result page. Search(ctx context.Context, request SearchModelVersionsRequest) (*SearchModelVersionsResponse, error) // Set a version tag. // // Sets a model version tag. SetTag(ctx context.Context, request SetModelVersionTagRequest) error // Transition a stage. // // Transition to the next model stage. TransitionStage(ctx context.Context, request TransitionModelVersionStage) (*TransitionModelVersionStageResponse, error) // Update model version. // // Updates the model version. Update(ctx context.Context, request UpdateModelVersionRequest) error }
type PermissionLevel ¶
type PermissionLevel string
Permission level of the requesting user on the object. For what is allowed at each level, see [MLflow Model permissions](..).
const PermissionLevelCanEdit PermissionLevel = `CAN_EDIT`
const PermissionLevelCanManage PermissionLevel = `CAN_MANAGE`
const PermissionLevelCanManageProductionVersions PermissionLevel = `CAN_MANAGE_PRODUCTION_VERSIONS`
const PermissionLevelCanManageStagingVersions PermissionLevel = `CAN_MANAGE_STAGING_VERSIONS`
const PermissionLevelCanRead PermissionLevel = `CAN_READ`
func (*PermissionLevel) Set ¶ added in v0.2.0
func (pl *PermissionLevel) Set(v string) error
Set raw string value and validate it against allowed values
func (*PermissionLevel) String ¶ added in v0.2.0
func (pl *PermissionLevel) String() string
String representation for fmt.Print
func (*PermissionLevel) Type ¶ added in v0.2.0
func (pl *PermissionLevel) Type() string
Type always returns PermissionLevel to satisfy [pflag.Value] interface
type RegisteredModel ¶
type RegisteredModel struct { // Timestamp recorded when this `registered_model` was created. CreationTimestamp int64 `json:"creation_timestamp,omitempty"` // Description of this `registered_model`. Description string `json:"description,omitempty"` // Timestamp recorded when metadata for this `registered_model` was last // updated. LastUpdatedTimestamp int64 `json:"last_updated_timestamp,omitempty"` // Collection of latest model versions for each stage. Only contains models // with current `READY` status. LatestVersions []ModelVersion `json:"latest_versions,omitempty"` // Unique name for the model. Name string `json:"name,omitempty"` // Tags: Additional metadata key-value pairs for this `registered_model`. Tags []RegisteredModelTag `json:"tags,omitempty"` // User that created this `registered_model` UserId string `json:"user_id,omitempty"` }
type RegisteredModelDatabricks ¶
type RegisteredModelDatabricks struct { // Creation time of the object, as a Unix timestamp in milliseconds. CreationTimestamp int64 `json:"creation_timestamp,omitempty"` // User-specified description for the object. Description string `json:"description,omitempty"` // Unique identifier for the object. Id string `json:"id,omitempty"` // Time of the object at last update, as a Unix timestamp in milliseconds. LastUpdatedTimestamp int64 `json:"last_updated_timestamp,omitempty"` // Array of model versions, each the latest version for its stage. LatestVersions []ModelVersion `json:"latest_versions,omitempty"` // Name of the model. Name string `json:"name,omitempty"` // Permission level of the requesting user on the object. For what is // allowed at each level, see [MLflow Model permissions](..). PermissionLevel PermissionLevel `json:"permission_level,omitempty"` // Array of tags associated with the model. Tags []RegisteredModelTag `json:"tags,omitempty"` // The username of the user that created the object. UserId string `json:"user_id,omitempty"` }
type RegisteredModelTag ¶
type RegisteredModelsAPI ¶
type RegisteredModelsAPI struct {
// contains filtered or unexported fields
}
func NewRegisteredModels ¶
func NewRegisteredModels(client *client.DatabricksClient) *RegisteredModelsAPI
func (*RegisteredModelsAPI) Create ¶
func (a *RegisteredModelsAPI) Create(ctx context.Context, request CreateRegisteredModelRequest) (*CreateRegisteredModelResponse, error)
Create a model.
Creates a new registered model with the name specified in the request body.
Throws `RESOURCE_ALREADY_EXISTS` if a registered model with the given name exists.
func (*RegisteredModelsAPI) Delete ¶
func (a *RegisteredModelsAPI) Delete(ctx context.Context, request DeleteRegisteredModelRequest) error
Delete a model.
Deletes a registered model.
func (*RegisteredModelsAPI) DeleteByName ¶
func (a *RegisteredModelsAPI) DeleteByName(ctx context.Context, name string) error
Delete a model.
Deletes a registered model.
func (*RegisteredModelsAPI) DeleteTag ¶
func (a *RegisteredModelsAPI) DeleteTag(ctx context.Context, request DeleteRegisteredModelTagRequest) error
Delete a model tag.
Deletes the tag for a registered model.
func (*RegisteredModelsAPI) Get ¶
func (a *RegisteredModelsAPI) Get(ctx context.Context, request GetRegisteredModelRequest) (*GetRegisteredModelResponse, error)
Get a model.
Gets the registered model that matches the specified ID.
func (*RegisteredModelsAPI) GetByName ¶
func (a *RegisteredModelsAPI) GetByName(ctx context.Context, name string) (*GetRegisteredModelResponse, error)
Get a model.
Gets the registered model that matches the specified ID.
func (*RegisteredModelsAPI) GetLatestVersionsAll ¶
func (a *RegisteredModelsAPI) GetLatestVersionsAll(ctx context.Context, request GetLatestVersionsRequest) ([]ModelVersion, error)
Get the latest version.
Gets the latest version of a registered model.
This method is generated by Databricks SDK Code Generator.
func (*RegisteredModelsAPI) Impl ¶
func (a *RegisteredModelsAPI) Impl() RegisteredModelsService
Impl returns low-level RegisteredModels API implementation
func (*RegisteredModelsAPI) ListAll ¶
func (a *RegisteredModelsAPI) ListAll(ctx context.Context, request ListRegisteredModelsRequest) ([]RegisteredModel, error)
List models.
Lists all available registered models, up to the limit specified in __max_results__.
This method is generated by Databricks SDK Code Generator.
func (*RegisteredModelsAPI) Rename ¶
func (a *RegisteredModelsAPI) Rename(ctx context.Context, request RenameRegisteredModelRequest) (*RenameRegisteredModelResponse, error)
Rename a model.
Renames a registered model.
func (*RegisteredModelsAPI) SearchAll ¶
func (a *RegisteredModelsAPI) SearchAll(ctx context.Context, request SearchRegisteredModelsRequest) ([]RegisteredModel, error)
Search models.
Search for registered models based on the specified __filter__.
This method is generated by Databricks SDK Code Generator.
func (*RegisteredModelsAPI) SetTag ¶
func (a *RegisteredModelsAPI) SetTag(ctx context.Context, request SetRegisteredModelTagRequest) error
Set a tag.
Sets a tag on a registered model.
func (*RegisteredModelsAPI) Update ¶
func (a *RegisteredModelsAPI) Update(ctx context.Context, request UpdateRegisteredModelRequest) error
Update model.
Updates a registered model.
func (*RegisteredModelsAPI) WithImpl ¶
func (a *RegisteredModelsAPI) WithImpl(impl RegisteredModelsService) *RegisteredModelsAPI
WithImpl could be used to override low-level API implementations for unit testing purposes with github.com/golang/mock or other mocking frameworks.
type RegisteredModelsService ¶
type RegisteredModelsService interface { // Create a model. // // Creates a new registered model with the name specified in the request // body. // // Throws `RESOURCE_ALREADY_EXISTS` if a registered model with the given // name exists. Create(ctx context.Context, request CreateRegisteredModelRequest) (*CreateRegisteredModelResponse, error) // Delete a model. // // Deletes a registered model. Delete(ctx context.Context, request DeleteRegisteredModelRequest) error // Delete a model tag. // // Deletes the tag for a registered model. DeleteTag(ctx context.Context, request DeleteRegisteredModelTagRequest) error // Get a model. // // Gets the registered model that matches the specified ID. Get(ctx context.Context, request GetRegisteredModelRequest) (*GetRegisteredModelResponse, error) // Get the latest version. // // Gets the latest version of a registered model. // // Use GetLatestVersionsAll() to get all ModelVersion instances GetLatestVersions(ctx context.Context, request GetLatestVersionsRequest) (*GetLatestVersionsResponse, error) // List models. // // Lists all available registered models, up to the limit specified in // __max_results__. // // Use ListAll() to get all RegisteredModel instances, which will iterate over every result page. List(ctx context.Context, request ListRegisteredModelsRequest) (*ListRegisteredModelsResponse, error) // Rename a model. // // Renames a registered model. Rename(ctx context.Context, request RenameRegisteredModelRequest) (*RenameRegisteredModelResponse, error) // Search models. // // Search for registered models based on the specified __filter__. // // Use SearchAll() to get all RegisteredModel instances, which will iterate over every result page. Search(ctx context.Context, request SearchRegisteredModelsRequest) (*SearchRegisteredModelsResponse, error) // Set a tag. // // Sets a tag on a registered model. SetTag(ctx context.Context, request SetRegisteredModelTagRequest) error // Update model. // // Updates a registered model. Update(ctx context.Context, request UpdateRegisteredModelRequest) error }
type RegistryWebhook ¶
type RegistryWebhook struct { // Creation time of the object, as a Unix timestamp in milliseconds. CreationTimestamp int64 `json:"creation_timestamp,omitempty"` // User-specified description for the webhook. Description string `json:"description,omitempty"` // Events that can trigger a registry webhook: * `MODEL_VERSION_CREATED`: A // new model version was created for the associated model. // // * `MODEL_VERSION_TRANSITIONED_STAGE`: A model version’s stage was // changed. // // * `TRANSITION_REQUEST_CREATED`: A user requested a model version’s // stage be transitioned. // // * `COMMENT_CREATED`: A user wrote a comment on a registered model. // // * `REGISTERED_MODEL_CREATED`: A new registered model was created. This // event type can only be specified for a registry-wide webhook, which can // be created by not specifying a model name in the create request. // // * `MODEL_VERSION_TAG_SET`: A user set a tag on the model version. // // * `MODEL_VERSION_TRANSITIONED_TO_STAGING`: A model version was // transitioned to staging. // // * `MODEL_VERSION_TRANSITIONED_TO_PRODUCTION`: A model version was // transitioned to production. // // * `MODEL_VERSION_TRANSITIONED_TO_ARCHIVED`: A model version was archived. // // * `TRANSITION_REQUEST_TO_STAGING_CREATED`: A user requested a model // version be transitioned to staging. // // * `TRANSITION_REQUEST_TO_PRODUCTION_CREATED`: A user requested a model // version be transitioned to production. // // * `TRANSITION_REQUEST_TO_ARCHIVED_CREATED`: A user requested a model // version be archived. Events []RegistryWebhookEvent `json:"events,omitempty"` HttpUrlSpec *HttpUrlSpecWithoutSecret `json:"http_url_spec,omitempty"` // Webhook ID Id string `json:"id,omitempty"` JobSpec *JobSpecWithoutSecret `json:"job_spec,omitempty"` // Time of the object at last update, as a Unix timestamp in milliseconds. LastUpdatedTimestamp int64 `json:"last_updated_timestamp,omitempty"` // Name of the model whose events would trigger this webhook. ModelName string `json:"model_name,omitempty"` // This describes an enum Status RegistryWebhookStatus `json:"status,omitempty"` }
type RegistryWebhookEvent ¶
type RegistryWebhookEvent string
const RegistryWebhookEventCommentCreated RegistryWebhookEvent = `COMMENT_CREATED`
const RegistryWebhookEventModelVersionCreated RegistryWebhookEvent = `MODEL_VERSION_CREATED`
const RegistryWebhookEventModelVersionTagSet RegistryWebhookEvent = `MODEL_VERSION_TAG_SET`
const RegistryWebhookEventModelVersionTransitionedStage RegistryWebhookEvent = `MODEL_VERSION_TRANSITIONED_STAGE`
const RegistryWebhookEventModelVersionTransitionedToArchived RegistryWebhookEvent = `MODEL_VERSION_TRANSITIONED_TO_ARCHIVED`
const RegistryWebhookEventModelVersionTransitionedToProduction RegistryWebhookEvent = `MODEL_VERSION_TRANSITIONED_TO_PRODUCTION`
const RegistryWebhookEventModelVersionTransitionedToStaging RegistryWebhookEvent = `MODEL_VERSION_TRANSITIONED_TO_STAGING`
const RegistryWebhookEventRegisteredModelCreated RegistryWebhookEvent = `REGISTERED_MODEL_CREATED`
const RegistryWebhookEventTransitionRequestCreated RegistryWebhookEvent = `TRANSITION_REQUEST_CREATED`
const RegistryWebhookEventTransitionRequestToArchivedCreated RegistryWebhookEvent = `TRANSITION_REQUEST_TO_ARCHIVED_CREATED`
const RegistryWebhookEventTransitionRequestToProductionCreated RegistryWebhookEvent = `TRANSITION_REQUEST_TO_PRODUCTION_CREATED`
const RegistryWebhookEventTransitionRequestToStagingCreated RegistryWebhookEvent = `TRANSITION_REQUEST_TO_STAGING_CREATED`
func (*RegistryWebhookEvent) Set ¶ added in v0.2.0
func (rwe *RegistryWebhookEvent) Set(v string) error
Set raw string value and validate it against allowed values
func (*RegistryWebhookEvent) String ¶ added in v0.2.0
func (rwe *RegistryWebhookEvent) String() string
String representation for fmt.Print
func (*RegistryWebhookEvent) Type ¶ added in v0.2.0
func (rwe *RegistryWebhookEvent) Type() string
Type always returns RegistryWebhookEvent to satisfy [pflag.Value] interface
type RegistryWebhookStatus ¶
type RegistryWebhookStatus string
This describes an enum
const RegistryWebhookStatusActive RegistryWebhookStatus = `ACTIVE`
Webhook is triggered when an associated event happens.
const RegistryWebhookStatusDisabled RegistryWebhookStatus = `DISABLED`
Webhook is not triggered.
const RegistryWebhookStatusTestMode RegistryWebhookStatus = `TEST_MODE`
Webhook can be triggered through the test endpoint, but is not triggered on a real event.
func (*RegistryWebhookStatus) Set ¶ added in v0.2.0
func (rws *RegistryWebhookStatus) Set(v string) error
Set raw string value and validate it against allowed values
func (*RegistryWebhookStatus) String ¶ added in v0.2.0
func (rws *RegistryWebhookStatus) String() string
String representation for fmt.Print
func (*RegistryWebhookStatus) Type ¶ added in v0.2.0
func (rws *RegistryWebhookStatus) Type() string
Type always returns RegistryWebhookStatus to satisfy [pflag.Value] interface
type RegistryWebhooksAPI ¶
type RegistryWebhooksAPI struct {
// contains filtered or unexported fields
}
func NewRegistryWebhooks ¶
func NewRegistryWebhooks(client *client.DatabricksClient) *RegistryWebhooksAPI
func (*RegistryWebhooksAPI) Create ¶
func (a *RegistryWebhooksAPI) Create(ctx context.Context, request CreateRegistryWebhook) (*CreateResponse, error)
Create a webhook.
**NOTE**: This endpoint is in Public Preview.
Creates a registry webhook.
func (*RegistryWebhooksAPI) Delete ¶
func (a *RegistryWebhooksAPI) Delete(ctx context.Context, request DeleteRegistryWebhookRequest) error
Delete a webhook.
**NOTE:** This endpoint is in Public Preview.
Deletes a registry webhook.
func (*RegistryWebhooksAPI) DeleteById ¶
func (a *RegistryWebhooksAPI) DeleteById(ctx context.Context, id string) error
Delete a webhook.
**NOTE:** This endpoint is in Public Preview.
Deletes a registry webhook.
func (*RegistryWebhooksAPI) Impl ¶
func (a *RegistryWebhooksAPI) Impl() RegistryWebhooksService
Impl returns low-level RegistryWebhooks API implementation
func (*RegistryWebhooksAPI) ListAll ¶
func (a *RegistryWebhooksAPI) ListAll(ctx context.Context, request ListRegistryWebhooksRequest) ([]RegistryWebhook, error)
List registry webhooks.
**NOTE:** This endpoint is in Public Preview.
Lists all registry webhooks.
This method is generated by Databricks SDK Code Generator.
func (*RegistryWebhooksAPI) Test ¶
func (a *RegistryWebhooksAPI) Test(ctx context.Context, request TestRegistryWebhookRequest) (*TestRegistryWebhookResponse, error)
Test a webhook.
**NOTE:** This endpoint is in Public Preview.
Tests a registry webhook.
func (*RegistryWebhooksAPI) Update ¶
func (a *RegistryWebhooksAPI) Update(ctx context.Context, request UpdateRegistryWebhook) error
Update a webhook.
**NOTE:** This endpoint is in Public Preview.
Updates a registry webhook.
func (*RegistryWebhooksAPI) WithImpl ¶
func (a *RegistryWebhooksAPI) WithImpl(impl RegistryWebhooksService) *RegistryWebhooksAPI
WithImpl could be used to override low-level API implementations for unit testing purposes with github.com/golang/mock or other mocking frameworks.
type RegistryWebhooksService ¶
type RegistryWebhooksService interface { // Create a webhook. // // **NOTE**: This endpoint is in Public Preview. // // Creates a registry webhook. Create(ctx context.Context, request CreateRegistryWebhook) (*CreateResponse, error) // Delete a webhook. // // **NOTE:** This endpoint is in Public Preview. // // Deletes a registry webhook. Delete(ctx context.Context, request DeleteRegistryWebhookRequest) error // List registry webhooks. // // **NOTE:** This endpoint is in Public Preview. // // Lists all registry webhooks. // // Use ListAll() to get all RegistryWebhook instances, which will iterate over every result page. List(ctx context.Context, request ListRegistryWebhooksRequest) (*ListRegistryWebhooks, error) // Test a webhook. // // **NOTE:** This endpoint is in Public Preview. // // Tests a registry webhook. Test(ctx context.Context, request TestRegistryWebhookRequest) (*TestRegistryWebhookResponse, error) // Update a webhook. // // **NOTE:** This endpoint is in Public Preview. // // Updates a registry webhook. Update(ctx context.Context, request UpdateRegistryWebhook) error }
type RejectResponse ¶
type RejectResponse struct { // Activity recorded for the action. Activity *Activity `json:"activity,omitempty"` }
type RejectTransitionRequest ¶
type RejectTransitionRequest struct { // User-provided comment on the action. Comment string `json:"comment,omitempty"` // Name of the model. Name string `json:"name"` // Target stage of the transition. Valid values are: // // * `None`: The initial stage of a model version. // // * `Staging`: Staging or pre-production stage. // // * `Production`: Production stage. // // * `Archived`: Archived stage. Stage Stage `json:"stage"` // Version of the model. Version string `json:"version"` }
type RenameRegisteredModelResponse ¶
type RenameRegisteredModelResponse struct {
RegisteredModel *RegisteredModel `json:"registered_model,omitempty"`
}
type RestoreExperiment ¶
type RestoreExperiment struct { // ID of the associated experiment. ExperimentId string `json:"experiment_id"` }
type RestoreRun ¶
type RestoreRun struct { // ID of the run to restore. RunId string `json:"run_id"` }
type RunInfo ¶
type RunInfo struct { // URI of the directory where artifacts should be uploaded. This can be a // local path (starting with "/"), or a distributed file system (DFS) path, // like `s3://bucket/directory` or `dbfs:/my/directory`. If not set, the // local `./mlruns` directory is chosen. ArtifactUri string `json:"artifact_uri,omitempty"` // Unix timestamp of when the run ended in milliseconds. EndTime int64 `json:"end_time,omitempty"` // The experiment ID. ExperimentId string `json:"experiment_id,omitempty"` // Current life cycle stage of the experiment : OneOf("active", "deleted") LifecycleStage string `json:"lifecycle_stage,omitempty"` // Unique identifier for the run. RunId string `json:"run_id,omitempty"` // [Deprecated, use run_id instead] Unique identifier for the run. This // field will be removed in a future MLflow version. RunUuid string `json:"run_uuid,omitempty"` // Unix timestamp of when the run started in milliseconds. StartTime int64 `json:"start_time,omitempty"` // Current status of the run. Status RunInfoStatus `json:"status,omitempty"` // User who initiated the run. This field is deprecated as of MLflow 1.0, // and will be removed in a future MLflow release. Use 'mlflow.user' tag // instead. UserId string `json:"user_id,omitempty"` }
type RunInfoStatus ¶
type RunInfoStatus string
Current status of the run.
const RunInfoStatusFailed RunInfoStatus = `FAILED`
const RunInfoStatusFinished RunInfoStatus = `FINISHED`
const RunInfoStatusKilled RunInfoStatus = `KILLED`
const RunInfoStatusRunning RunInfoStatus = `RUNNING`
const RunInfoStatusScheduled RunInfoStatus = `SCHEDULED`
func (*RunInfoStatus) Set ¶ added in v0.2.0
func (ris *RunInfoStatus) Set(v string) error
Set raw string value and validate it against allowed values
func (*RunInfoStatus) String ¶ added in v0.2.0
func (ris *RunInfoStatus) String() string
String representation for fmt.Print
func (*RunInfoStatus) Type ¶ added in v0.2.0
func (ris *RunInfoStatus) Type() string
Type always returns RunInfoStatus to satisfy [pflag.Value] interface
type SearchExperiments ¶
type SearchExperiments struct { // String representing a SQL filter condition (e.g. "name ILIKE // 'my-experiment%'") Filter string `json:"filter,omitempty"` // Maximum number of experiments desired. Max threshold is 3000. MaxResults int64 `json:"max_results,omitempty"` // List of columns for ordering search results, which can include experiment // name and last updated timestamp with an optional "DESC" or "ASC" // annotation, where "ASC" is the default. Tiebreaks are done by experiment // id DESC. OrderBy []string `json:"order_by,omitempty"` // Token indicating the page of experiments to fetch PageToken string `json:"page_token,omitempty"` // Qualifier for type of experiments to be returned. If unspecified, return // only active experiments. ViewType SearchExperimentsViewType `json:"view_type,omitempty"` }
type SearchExperimentsResponse ¶
type SearchExperimentsResponse struct { // Experiments that match the search criteria Experiments []Experiment `json:"experiments,omitempty"` // Token that can be used to retrieve the next page of experiments. An empty // token means that no more experiments are available for retrieval. NextPageToken string `json:"next_page_token,omitempty"` }
type SearchExperimentsViewType ¶
type SearchExperimentsViewType string
Qualifier for type of experiments to be returned. If unspecified, return only active experiments.
const SearchExperimentsViewTypeActiveOnly SearchExperimentsViewType = `ACTIVE_ONLY`
const SearchExperimentsViewTypeAll SearchExperimentsViewType = `ALL`
const SearchExperimentsViewTypeDeletedOnly SearchExperimentsViewType = `DELETED_ONLY`
func (*SearchExperimentsViewType) Set ¶ added in v0.2.0
func (sevt *SearchExperimentsViewType) Set(v string) error
Set raw string value and validate it against allowed values
func (*SearchExperimentsViewType) String ¶ added in v0.2.0
func (sevt *SearchExperimentsViewType) String() string
String representation for fmt.Print
func (*SearchExperimentsViewType) Type ¶ added in v0.2.0
func (sevt *SearchExperimentsViewType) Type() string
Type always returns SearchExperimentsViewType to satisfy [pflag.Value] interface
type SearchModelVersionsRequest ¶
type SearchModelVersionsRequest struct { // String filter condition, like "name='my-model-name'". Must be a single // boolean condition, with string values wrapped in single quotes. Filter string `json:"-" url:"filter,omitempty"` // Maximum number of models desired. Max threshold is 10K. MaxResults int `json:"-" url:"max_results,omitempty"` // List of columns to be ordered by including model name, version, stage // with an optional "DESC" or "ASC" annotation, where "ASC" is the default. // Tiebreaks are done by latest stage transition timestamp, followed by name // ASC, followed by version DESC. OrderBy []string `json:"-" url:"order_by,omitempty"` // Pagination token to go to next page based on previous search query. PageToken string `json:"-" url:"page_token,omitempty"` }
Searches model versions
type SearchModelVersionsResponse ¶
type SearchModelVersionsResponse struct { // Models that match the search criteria ModelVersions []ModelVersion `json:"model_versions,omitempty"` // Pagination token to request next page of models for the same search // query. NextPageToken string `json:"next_page_token,omitempty"` }
type SearchRegisteredModelsRequest ¶
type SearchRegisteredModelsRequest struct { // String filter condition, like "name LIKE 'my-model-name'". Interpreted in // the backend automatically as "name LIKE '%my-model-name%'". Single // boolean condition, with string values wrapped in single quotes. Filter string `json:"-" url:"filter,omitempty"` // Maximum number of models desired. Default is 100. Max threshold is 1000. MaxResults int `json:"-" url:"max_results,omitempty"` // List of columns for ordering search results, which can include model name // and last updated timestamp with an optional "DESC" or "ASC" annotation, // where "ASC" is the default. Tiebreaks are done by model name ASC. OrderBy []string `json:"-" url:"order_by,omitempty"` // Pagination token to go to the next page based on a previous search query. PageToken string `json:"-" url:"page_token,omitempty"` }
Search models
type SearchRegisteredModelsResponse ¶
type SearchRegisteredModelsResponse struct { // Pagination token to request the next page of models. NextPageToken string `json:"next_page_token,omitempty"` // Registered Models that match the search criteria. RegisteredModels []RegisteredModel `json:"registered_models,omitempty"` }
type SearchRuns ¶
type SearchRuns struct { // List of experiment IDs to search over. ExperimentIds []string `json:"experiment_ids,omitempty"` // A filter expression over params, metrics, and tags, that allows returning // a subset of runs. The syntax is a subset of SQL that supports ANDing // together binary operations between a param, metric, or tag and a // constant. // // Example: `metrics.rmse < 1 and params.model_class = 'LogisticRegression'` // // You can select columns with special characters (hyphen, space, period, // etc.) by using double quotes: `metrics."model class" = 'LinearRegression' // and tags."user-name" = 'Tomas'` // // Supported operators are `=`, `!=`, `>`, `>=`, `<`, and `<=`. Filter string `json:"filter,omitempty"` // Maximum number of runs desired. Max threshold is 50000 MaxResults int `json:"max_results,omitempty"` // List of columns to be ordered by, including attributes, params, metrics, // and tags with an optional "DESC" or "ASC" annotation, where "ASC" is the // default. Example: ["params.input DESC", "metrics.alpha ASC", // "metrics.rmse"] Tiebreaks are done by start_time DESC followed by run_id // for runs with the same start time (and this is the default ordering // criterion if order_by is not provided). OrderBy []string `json:"order_by,omitempty"` // Token for the current page of runs. PageToken string `json:"page_token,omitempty"` // Whether to display only active, only deleted, or all runs. Defaults to // only active runs. RunViewType SearchRunsRunViewType `json:"run_view_type,omitempty"` }
type SearchRunsResponse ¶
type SearchRunsRunViewType ¶
type SearchRunsRunViewType string
Whether to display only active, only deleted, or all runs. Defaults to only active runs.
const SearchRunsRunViewTypeActiveOnly SearchRunsRunViewType = `ACTIVE_ONLY`
const SearchRunsRunViewTypeAll SearchRunsRunViewType = `ALL`
const SearchRunsRunViewTypeDeletedOnly SearchRunsRunViewType = `DELETED_ONLY`
func (*SearchRunsRunViewType) Set ¶ added in v0.2.0
func (srrvt *SearchRunsRunViewType) Set(v string) error
Set raw string value and validate it against allowed values
func (*SearchRunsRunViewType) String ¶ added in v0.2.0
func (srrvt *SearchRunsRunViewType) String() string
String representation for fmt.Print
func (*SearchRunsRunViewType) Type ¶ added in v0.2.0
func (srrvt *SearchRunsRunViewType) Type() string
Type always returns SearchRunsRunViewType to satisfy [pflag.Value] interface
type SetExperimentTag ¶
type SetExperimentTag struct { // ID of the experiment under which to log the tag. Must be provided. ExperimentId string `json:"experiment_id"` // Name of the tag. Maximum size depends on storage backend. All storage // backends are guaranteed to support key values up to 250 bytes in size. Key string `json:"key"` // String value of the tag being logged. Maximum size depends on storage // backend. All storage backends are guaranteed to support key values up to // 5000 bytes in size. Value string `json:"value"` }
type SetModelVersionTagRequest ¶
type SetModelVersionTagRequest struct { // Name of the tag. Maximum size depends on storage backend. If a tag with // this name already exists, its preexisting value will be replaced by the // specified `value`. All storage backends are guaranteed to support key // values up to 250 bytes in size. Key string `json:"key"` // Unique name of the model. Name string `json:"name"` // String value of the tag being logged. Maximum size depends on storage // backend. All storage backends are guaranteed to support key values up to // 5000 bytes in size. Value string `json:"value"` // Model version number. Version string `json:"version"` }
type SetRegisteredModelTagRequest ¶
type SetRegisteredModelTagRequest struct { // Name of the tag. Maximum size depends on storage backend. If a tag with // this name already exists, its preexisting value will be replaced by the // specified `value`. All storage backends are guaranteed to support key // values up to 250 bytes in size. Key string `json:"key"` // Unique name of the model. Name string `json:"name"` // String value of the tag being logged. Maximum size depends on storage // backend. All storage backends are guaranteed to support key values up to // 5000 bytes in size. Value string `json:"value"` }
type SetTag ¶
type SetTag struct { // Name of the tag. Maximum size depends on storage backend. All storage // backends are guaranteed to support key values up to 250 bytes in size. Key string `json:"key"` // ID of the run under which to log the tag. Must be provided. RunId string `json:"run_id,omitempty"` // [Deprecated, use run_id instead] ID of the run under which to log the // tag. This field will be removed in a future MLflow version. RunUuid string `json:"run_uuid,omitempty"` // String value of the tag being logged. Maximum size depends on storage // backend. All storage backends are guaranteed to support key values up to // 5000 bytes in size. Value string `json:"value"` }
type Stage ¶
type Stage string
This describes an enum
const StageArchived Stage = `Archived`
Archived stage.
const StageNone Stage = `None`
The initial stage of a model version.
const StageProduction Stage = `Production`
Production stage.
const StageStaging Stage = `Staging`
Staging or pre-production stage.
type Status ¶
type Status string
This describes an enum
const StatusFailedRegistration Status = `FAILED_REGISTRATION`
Request to register a new model version has failed.
const StatusPendingRegistration Status = `PENDING_REGISTRATION`
Request to register a new model version is pending as server performs background tasks.
const StatusReady Status = `READY`
Model version is ready for use.
type TestRegistryWebhook ¶
type TestRegistryWebhook struct { // Body of the response from the webhook URL Body string `json:"body,omitempty"` // Status code returned by the webhook URL StatusCode int `json:"status_code,omitempty"` }
Test webhook response object.
type TestRegistryWebhookRequest ¶
type TestRegistryWebhookRequest struct { // If `event` is specified, the test trigger uses the specified event. If // `event` is not specified, the test trigger uses a randomly chosen event // associated with the webhook. Event RegistryWebhookEvent `json:"event,omitempty"` // Webhook ID Id string `json:"id"` }
type TestRegistryWebhookResponse ¶
type TestRegistryWebhookResponse struct { // Test webhook response object. Webhook *TestRegistryWebhook `json:"webhook,omitempty"` }
type TransitionModelVersionStage ¶
type TransitionModelVersionStage struct { // When transitioning a model version to a particular stage, this flag // dictates whether all existing model versions in that stage should be // atomically moved to the "archived" stage. This ensures that at-most-one // model version exists in the target stage. This field is *required* when // transitioning a model versions's stage ArchiveExistingVersions bool `json:"archive_existing_versions"` // Name of the registered model Name string `json:"name"` // Transition `model_version` to new stage. Stage string `json:"stage"` // Model version number Version string `json:"version"` }
type TransitionModelVersionStageDatabricks ¶
type TransitionModelVersionStageDatabricks struct { // Specifies whether to archive all current model versions in the target // stage. ArchiveExistingVersions bool `json:"archive_existing_versions"` // User-provided comment on the action. Comment string `json:"comment,omitempty"` // Name of the model. Name string `json:"name"` // Target stage of the transition. Valid values are: // // * `None`: The initial stage of a model version. // // * `Staging`: Staging or pre-production stage. // // * `Production`: Production stage. // // * `Archived`: Archived stage. Stage Stage `json:"stage"` // Version of the model. Version string `json:"version"` }
type TransitionModelVersionStageResponse ¶
type TransitionModelVersionStageResponse struct { // Updated model version ModelVersion *ModelVersion `json:"model_version,omitempty"` }
type TransitionRequest ¶
type TransitionRequest struct { // Array of actions on the activity allowed for the current viewer. AvailableActions []ActivityAction `json:"available_actions,omitempty"` // User-provided comment associated with the transition request. Comment string `json:"comment,omitempty"` // Creation time of the object, as a Unix timestamp in milliseconds. CreationTimestamp int64 `json:"creation_timestamp,omitempty"` // Target stage of the transition (if the activity is stage transition // related). Valid values are: // // * `None`: The initial stage of a model version. // // * `Staging`: Staging or pre-production stage. // // * `Production`: Production stage. // // * `Archived`: Archived stage. ToStage Stage `json:"to_stage,omitempty"` // The username of the user that created the object. UserId string `json:"user_id,omitempty"` }
Transition request details.
type TransitionRequestsAPI ¶
type TransitionRequestsAPI struct {
// contains filtered or unexported fields
}
func NewTransitionRequests ¶
func NewTransitionRequests(client *client.DatabricksClient) *TransitionRequestsAPI
func (*TransitionRequestsAPI) Approve ¶
func (a *TransitionRequestsAPI) Approve(ctx context.Context, request ApproveTransitionRequest) (*ApproveResponse, error)
Approve transition requests.
Approves a model version stage transition request.
func (*TransitionRequestsAPI) Create ¶
func (a *TransitionRequestsAPI) Create(ctx context.Context, request CreateTransitionRequest) (*CreateResponse, error)
Make a transition request.
Creates a model version stage transition request.
func (*TransitionRequestsAPI) Delete ¶
func (a *TransitionRequestsAPI) Delete(ctx context.Context, request DeleteTransitionRequestRequest) error
Delete a ransition request.
Cancels a model version stage transition request.
func (*TransitionRequestsAPI) Impl ¶
func (a *TransitionRequestsAPI) Impl() TransitionRequestsService
Impl returns low-level TransitionRequests API implementation
func (*TransitionRequestsAPI) ListAll ¶
func (a *TransitionRequestsAPI) ListAll(ctx context.Context, request ListTransitionRequestsRequest) ([]Activity, error)
List transition requests.
Gets a list of all open stage transition requests for the model version.
This method is generated by Databricks SDK Code Generator.
func (*TransitionRequestsAPI) Reject ¶
func (a *TransitionRequestsAPI) Reject(ctx context.Context, request RejectTransitionRequest) (*RejectResponse, error)
Reject a transition request.
Rejects a model version stage transition request.
func (*TransitionRequestsAPI) WithImpl ¶
func (a *TransitionRequestsAPI) WithImpl(impl TransitionRequestsService) *TransitionRequestsAPI
WithImpl could be used to override low-level API implementations for unit testing purposes with github.com/golang/mock or other mocking frameworks.
type TransitionRequestsService ¶
type TransitionRequestsService interface { // Approve transition requests. // // Approves a model version stage transition request. Approve(ctx context.Context, request ApproveTransitionRequest) (*ApproveResponse, error) // Make a transition request. // // Creates a model version stage transition request. Create(ctx context.Context, request CreateTransitionRequest) (*CreateResponse, error) // Delete a ransition request. // // Cancels a model version stage transition request. Delete(ctx context.Context, request DeleteTransitionRequestRequest) error // List transition requests. // // Gets a list of all open stage transition requests for the model version. // // Use ListAll() to get all Activity instances List(ctx context.Context, request ListTransitionRequestsRequest) (*ListResponse, error) // Reject a transition request. // // Rejects a model version stage transition request. Reject(ctx context.Context, request RejectTransitionRequest) (*RejectResponse, error) }
type TransitionStageResponse ¶
type TransitionStageResponse struct {
ModelVersion *ModelVersionDatabricks `json:"model_version,omitempty"`
}
type UpdateComment ¶
type UpdateExperiment ¶
type UpdateRegistryWebhook ¶
type UpdateRegistryWebhook struct { // User-specified description for the webhook. Description string `json:"description,omitempty"` // Events that can trigger a registry webhook: * `MODEL_VERSION_CREATED`: A // new model version was created for the associated model. // // * `MODEL_VERSION_TRANSITIONED_STAGE`: A model version’s stage was // changed. // // * `TRANSITION_REQUEST_CREATED`: A user requested a model version’s // stage be transitioned. // // * `COMMENT_CREATED`: A user wrote a comment on a registered model. // // * `REGISTERED_MODEL_CREATED`: A new registered model was created. This // event type can only be specified for a registry-wide webhook, which can // be created by not specifying a model name in the create request. // // * `MODEL_VERSION_TAG_SET`: A user set a tag on the model version. // // * `MODEL_VERSION_TRANSITIONED_TO_STAGING`: A model version was // transitioned to staging. // // * `MODEL_VERSION_TRANSITIONED_TO_PRODUCTION`: A model version was // transitioned to production. // // * `MODEL_VERSION_TRANSITIONED_TO_ARCHIVED`: A model version was archived. // // * `TRANSITION_REQUEST_TO_STAGING_CREATED`: A user requested a model // version be transitioned to staging. // // * `TRANSITION_REQUEST_TO_PRODUCTION_CREATED`: A user requested a model // version be transitioned to production. // // * `TRANSITION_REQUEST_TO_ARCHIVED_CREATED`: A user requested a model // version be archived. Events []RegistryWebhookEvent `json:"events,omitempty"` HttpUrlSpec *HttpUrlSpec `json:"http_url_spec,omitempty"` // Webhook ID Id string `json:"id"` JobSpec *JobSpec `json:"job_spec,omitempty"` // This describes an enum Status RegistryWebhookStatus `json:"status,omitempty"` }
type UpdateResponse ¶
type UpdateResponse struct { // Comment details. Comment *CommentObject `json:"comment,omitempty"` }
type UpdateRun ¶
type UpdateRun struct { // Unix timestamp in milliseconds of when the run ended. EndTime int64 `json:"end_time,omitempty"` // ID of the run to update. Must be provided. RunId string `json:"run_id,omitempty"` // [Deprecated, use run_id instead] ID of the run to update.. This field // will be removed in a future MLflow version. RunUuid string `json:"run_uuid,omitempty"` // Updated status of the run. Status UpdateRunStatus `json:"status,omitempty"` }
type UpdateRunResponse ¶
type UpdateRunResponse struct { // Updated metadata of the run. RunInfo *RunInfo `json:"run_info,omitempty"` }
type UpdateRunStatus ¶
type UpdateRunStatus string
Updated status of the run.
const UpdateRunStatusFailed UpdateRunStatus = `FAILED`
const UpdateRunStatusFinished UpdateRunStatus = `FINISHED`
const UpdateRunStatusKilled UpdateRunStatus = `KILLED`
const UpdateRunStatusRunning UpdateRunStatus = `RUNNING`
const UpdateRunStatusScheduled UpdateRunStatus = `SCHEDULED`
func (*UpdateRunStatus) Set ¶ added in v0.2.0
func (urs *UpdateRunStatus) Set(v string) error
Set raw string value and validate it against allowed values
func (*UpdateRunStatus) String ¶ added in v0.2.0
func (urs *UpdateRunStatus) String() string
String representation for fmt.Print
func (*UpdateRunStatus) Type ¶ added in v0.2.0
func (urs *UpdateRunStatus) Type() string
Type always returns UpdateRunStatus to satisfy [pflag.Value] interface