experiments

package
v0.0.1-dev.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(ctx context.Context, opts ...client.Option) (*Client, error)

func (*Client) CreateExperiment

func (c *Client) CreateExperiment(ctx context.Context, req CreateExperimentRequest, opts ...call.Option) (*CreateExperimentResponse, error)

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 an experiment with the given name exists. Note: In some contexts, this error may be remapped to `ALREADY_EXISTS`. To be safe, clients should check for both error codes.

func (*Client) CreateLoggedModel

func (c *Client) CreateLoggedModel(ctx context.Context, req CreateLoggedModelRequest, opts ...call.Option) (*CreateLoggedModelResponse, error)

Create a logged model.

func (*Client) CreateRun

func (c *Client) CreateRun(ctx context.Context, req CreateRunRequest, opts ...call.Option) (*CreateRunResponse, error)

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 (*Client) DeleteExperiment

func (c *Client) DeleteExperiment(ctx context.Context, req DeleteExperimentRequest, opts ...call.Option) (*DeleteExperimentResponse, error)

Marks an experiment and associated metadata, runs, metrics, params, and tags for deletion. If the experiment uses FileStore, artifacts associated with the experiment are also deleted.

func (*Client) DeleteLoggedModel

func (c *Client) DeleteLoggedModel(ctx context.Context, req DeleteLoggedModelRequest, opts ...call.Option) (*DeleteLoggedModelResponse, error)

Delete a logged model.

func (*Client) DeleteLoggedModelTag

func (c *Client) DeleteLoggedModelTag(ctx context.Context, req DeleteLoggedModelTagRequest, opts ...call.Option) (*DeleteLoggedModelTagResponse, error)

Delete a tag on a logged model.

func (*Client) DeleteRun

func (c *Client) DeleteRun(ctx context.Context, req DeleteRunRequest, opts ...call.Option) (*DeleteRunResponse, error)

Marks a run for deletion.

func (*Client) DeleteRuns

func (c *Client) DeleteRuns(ctx context.Context, req DeleteRunsRequest, opts ...call.Option) (*DeleteRunsResponse, error)

Bulk delete runs in an experiment that were created prior to or at the specified timestamp. Deletes at most max_runs per request. To call this API from a Databricks Notebook in Python, you can use the client code snippet on

func (*Client) DeleteTag

func (c *Client) DeleteTag(ctx context.Context, req DeleteTagRequest, opts ...call.Option) (*DeleteTagResponse, error)

Deletes a tag on a run. Tags are run metadata that can be updated during a run and after a run completes.

func (*Client) FinalizeLoggedModel

func (c *Client) FinalizeLoggedModel(ctx context.Context, req FinalizeLoggedModelRequest, opts ...call.Option) (*FinalizeLoggedModelResponse, error)

Finalize a logged model.

func (*Client) GetExperiment

func (c *Client) GetExperiment(ctx context.Context, req GetExperimentRequest, opts ...call.Option) (*GetExperimentResponse, error)

Gets metadata for an experiment. This method works on deleted experiments.

func (*Client) GetExperimentByName

func (c *Client) GetExperimentByName(ctx context.Context, req GetExperimentByNameRequest, opts ...call.Option) (*GetExperimentByNameResponse, error)

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.

func (*Client) GetLoggedModel

func (c *Client) GetLoggedModel(ctx context.Context, req GetLoggedModelRequest, opts ...call.Option) (*GetLoggedModelResponse, error)

Get a logged model.

func (*Client) GetRun

func (c *Client) GetRun(ctx context.Context, req GetRunRequest, opts ...call.Option) (*GetRunResponse, error)

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 (*Client) ListArtifacts

func (c *Client) ListArtifacts(ctx context.Context, req ListArtifactsRequest, opts ...call.Option) (*ListArtifactsResponse, error)

List artifacts for a run. Takes an optional `artifact_path` prefix which if specified, the response contains only artifacts with the specified prefix. A maximum of 1000 artifacts will be retrieved for UC Volumes. Please call `/api/2.0/fs/directories{directory_path}` for listing artifacts in UC Volumes, which supports pagination. See [List directory contents | Files API](/api/workspace/files/listdirectorycontents).

func (*Client) ListArtifactsIter

func (c *Client) ListArtifactsIter(ctx context.Context, req ListArtifactsRequest, opts ...call.Option) iter.Seq2[*FileInfo, error]

ListArtifactsIter returns an iterator that iterates over the results of ListArtifacts.

For example:

for item, err := range c.ListArtifactsIter(ctx, ListArtifactsRequest{}) {
  if err != nil {
    return err
  }
  fmt.Println(item)
}

Options opts are passed to each ListArtifacts call made by the iterator under the hood.

Callers who need custom pagination logic should use ListArtifacts directly.

func (*Client) ListExperiments

func (c *Client) ListExperiments(ctx context.Context, req ListExperimentsRequest, opts ...call.Option) (*ListExperimentsResponse, error)

Gets a list of all experiments.

func (*Client) ListExperimentsIter

func (c *Client) ListExperimentsIter(ctx context.Context, req ListExperimentsRequest, opts ...call.Option) iter.Seq2[*Experiment, error]

ListExperimentsIter returns an iterator that iterates over the results of ListExperiments.

For example:

for item, err := range c.ListExperimentsIter(ctx, ListExperimentsRequest{}) {
  if err != nil {
    return err
  }
  fmt.Println(item)
}

Options opts are passed to each ListExperiments call made by the iterator under the hood.

Callers who need custom pagination logic should use ListExperiments directly.

func (*Client) ListMetricHistory

func (c *Client) ListMetricHistory(ctx context.Context, req ListMetricHistoryRequest, opts ...call.Option) (*GetMetricHistoryResponse, error)

Gets a list of all values for the specified metric for a given run.

func (*Client) ListMetricHistoryIter

func (c *Client) ListMetricHistoryIter(ctx context.Context, req ListMetricHistoryRequest, opts ...call.Option) iter.Seq2[*Metric, error]

ListMetricHistoryIter returns an iterator that iterates over the results of ListMetricHistory.

For example:

for item, err := range c.ListMetricHistoryIter(ctx, ListMetricHistoryRequest{}) {
  if err != nil {
    return err
  }
  fmt.Println(item)
}

Options opts are passed to each ListMetricHistory call made by the iterator under the hood.

Callers who need custom pagination logic should use ListMetricHistory directly.

func (*Client) LogBatch

func (c *Client) LogBatch(ctx context.Context, req LogBatchRequest, opts ...call.Option) (*LogBatchResponse, error)

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 keys, 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 (*Client) LogInputs

func (c *Client) LogInputs(ctx context.Context, req LogInputsRequest, opts ...call.Option) (*LogInputsResponse, error)

Logs inputs, such as datasets and models, to an MLflow Run.

func (*Client) LogLoggedModelParams

func (c *Client) LogLoggedModelParams(ctx context.Context, req LogLoggedModelParamsRequest, opts ...call.Option) (*LogLoggedModelParamsResponse, error)

Logs params for a logged model. A param is a key-value pair (string key, string value). Examples include hyperparameters used for ML model training. A param can be logged only once for a logged model, and attempting to overwrite an existing param with a different value will result in an error

func (*Client) LogMetric

func (c *Client) LogMetric(ctx context.Context, req LogMetricRequest, opts ...call.Option) (*LogMetricResponse, error)

Log 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 (*Client) LogModel

func (c *Client) LogModel(ctx context.Context, req LogModelRequest, opts ...call.Option) (*LogModelResponse, error)

**Note:** the [Create a logged model](/api/workspace/experiments/createloggedmodel) API replaces this endpoint.

Log a model to an MLflow Run.

func (*Client) LogOutputs

func (c *Client) LogOutputs(ctx context.Context, req LogOutputsRequest, opts ...call.Option) (*LogOutputsResponse, error)

Logs outputs, such as models, from an MLflow Run.

func (*Client) LogParam

func (c *Client) LogParam(ctx context.Context, req LogParamRequest, opts ...call.Option) (*LogParamResponse, error)

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 (*Client) RestoreExperiment

func (c *Client) RestoreExperiment(ctx context.Context, req RestoreExperimentRequest, opts ...call.Option) (*RestoreExperimentResponse, error)

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 (*Client) RestoreRun

func (c *Client) RestoreRun(ctx context.Context, req RestoreRunRequest, opts ...call.Option) (*RestoreRunResponse, error)

Restores a deleted run. This also restores associated metadata, runs, metrics, params, and tags.

Throws `RESOURCE_DOES_NOT_EXIST` if the run was never created or was permanently deleted.

func (*Client) RestoreRuns

func (c *Client) RestoreRuns(ctx context.Context, req RestoreRunsRequest, opts ...call.Option) (*RestoreRunsResponse, error)

Bulk restore runs in an experiment that were deleted no earlier than the specified timestamp. Restores at most max_runs per request. To call this API from a Databricks Notebook in Python, you can use the client code snippet on

func (*Client) SearchExperiments

func (c *Client) SearchExperiments(ctx context.Context, req SearchExperimentsRequest, opts ...call.Option) (*SearchExperimentsResponse, error)

Searches for experiments that satisfy specified search criteria.

func (*Client) SearchExperimentsIter

func (c *Client) SearchExperimentsIter(ctx context.Context, req SearchExperimentsRequest, opts ...call.Option) iter.Seq2[*Experiment, error]

SearchExperimentsIter returns an iterator that iterates over the results of SearchExperiments.

For example:

for item, err := range c.SearchExperimentsIter(ctx, SearchExperimentsRequest{}) {
  if err != nil {
    return err
  }
  fmt.Println(item)
}

Options opts are passed to each SearchExperiments call made by the iterator under the hood.

Callers who need custom pagination logic should use SearchExperiments directly.

func (*Client) SearchLoggedModels

func (c *Client) SearchLoggedModels(ctx context.Context, req SearchLoggedModelsRequest, opts ...call.Option) (*SearchLoggedModelsResponse, error)

Search for Logged Models that satisfy specified search criteria.

func (*Client) SearchRuns

func (c *Client) SearchRuns(ctx context.Context, req SearchRunsRequest, opts ...call.Option) (*SearchRunsResponse, error)

Searches for runs that satisfy expressions.

Search expressions can use `mlflowMetric` and `mlflowParam` keys.

func (*Client) SearchRunsIter

func (c *Client) SearchRunsIter(ctx context.Context, req SearchRunsRequest, opts ...call.Option) iter.Seq2[*Run, error]

SearchRunsIter returns an iterator that iterates over the results of SearchRuns.

For example:

for item, err := range c.SearchRunsIter(ctx, SearchRunsRequest{}) {
  if err != nil {
    return err
  }
  fmt.Println(item)
}

Options opts are passed to each SearchRuns call made by the iterator under the hood.

Callers who need custom pagination logic should use SearchRuns directly.

func (*Client) SetExperimentTag

func (c *Client) SetExperimentTag(ctx context.Context, req SetExperimentTagRequest, opts ...call.Option) (*SetExperimentTagResponse, error)

Sets a tag on an experiment. Experiment tags are metadata that can be updated.

func (*Client) SetLoggedModelTags

func (c *Client) SetLoggedModelTags(ctx context.Context, req SetLoggedModelTagsRequest, opts ...call.Option) (*SetLoggedModelTagsResponse, error)

Set tags for a logged model.

func (*Client) SetTag

func (c *Client) SetTag(ctx context.Context, req SetTagRequest, opts ...call.Option) (*SetTagResponse, error)

Sets a tag on a run. Tags are run metadata that can be updated during a run and after a run completes.

func (*Client) UpdateExperiment

func (c *Client) UpdateExperiment(ctx context.Context, req UpdateExperimentRequest, opts ...call.Option) (*UpdateExperimentResponse, error)

Updates experiment metadata.

func (*Client) UpdateRun

func (c *Client) UpdateRun(ctx context.Context, req UpdateRunRequest, opts ...call.Option) (*UpdateRunResponse, error)

Updates run metadata.

type CreateExperimentRequest

type CreateExperimentRequest struct {
	// Experiment name.
	Name *string
	// Location where all artifacts for the experiment are stored. If not provided,
	// the remote server will select an appropriate default.
	ArtifactLocation *string
	// 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
	// The location where the experiment's traces are stored. When set, the
	// underlying storage is provisioned and the experiment's traces are routed to
	// it. When unset, traces are stored in the default MLflow backend. This field
	// cannot be updated after the experiment is created.
	TraceLocation *ExperimentTraceLocation
}

type CreateExperimentResponse

type CreateExperimentResponse struct {
	// Unique identifier for the experiment.
	ExperimentId *string
}

type CreateLoggedModelRequest

type CreateLoggedModelRequest struct {
	// The ID of the experiment that owns the model.
	ExperimentId *string
	// The name of the model (optional). If not specified one will be generated.
	Name *string
	// The type of the model, such as “"Agent"“, “"Classifier"“, “"LLM"“.
	ModelType *string
	// The ID of the run that created the model.
	SourceRunId *string
	// Parameters attached to the model.
	Params []LoggedModelParameter
	// Tags attached to the model.
	Tags []LoggedModelTag
}

type CreateLoggedModelResponse

type CreateLoggedModelResponse struct {
	// The newly created logged model.
	Model *LoggedModel
}

type CreateRunRequest

type CreateRunRequest struct {
	// ID of the associated experiment.
	ExperimentId *string
	// 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
	// The name of the run.
	RunName *string
	// Unix timestamp in milliseconds of when the run started.
	StartTime *int64
	// Additional metadata for run.
	Tags []RunTag
}

type CreateRunResponse

type CreateRunResponse struct {
	// The newly created run.
	Run *Run
}

type Dataset

type Dataset struct {
	// The name of the dataset. E.g. “my.uc.table@2” “nyc-taxi-dataset”,
	// “fantastic-elk-3”
	Name *string
	// Dataset digest, e.g. an md5 hash of the dataset that uniquely identifies it
	// within datasets of the same name.
	Digest *string
	// The type of the dataset source, e.g. ‘databricks-uc-table’, ‘DBFS’,
	// ‘S3’, ...
	SourceType *string
	// Source information for the dataset. Note that the source may not exactly
	// reproduce the dataset if it was transformed / modified before use with
	// MLflow.
	Source *string
	// The schema of the dataset. E.g., MLflow ColSpec JSON for a dataframe, MLflow
	// TensorSpec JSON for an ndarray, or another schema format.
	Schema *string
	// The profile of the dataset. Summary statistics for the dataset, such as the
	// number of rows in a table, the mean / std / mode of each column in a table,
	// or the number of elements in an array.
	Profile *string
}

Dataset. Represents a reference to data used for training, testing, or evaluation during the model development process..

type DatasetInput

type DatasetInput struct {
	// A list of tags for the dataset input, e.g. a “context” tag with value
	// “training”
	Tags []InputTag
	// The dataset being used as a Run input.
	Dataset *Dataset
}

DatasetInput. Represents a dataset and input tags..

type DeleteExperimentRequest

type DeleteExperimentRequest struct {
	// ID of the associated experiment.
	ExperimentId *string
}

type DeleteExperimentResponse

type DeleteExperimentResponse struct {
}

type DeleteLoggedModelRequest

type DeleteLoggedModelRequest struct {
	// The ID of the logged model to delete.
	ModelId *string
}

type DeleteLoggedModelResponse

type DeleteLoggedModelResponse struct {
}

type DeleteLoggedModelTagRequest

type DeleteLoggedModelTagRequest struct {
	// The ID of the logged model to delete the tag from.
	ModelId *string
	// The tag key.
	TagKey *string
}

type DeleteLoggedModelTagResponse

type DeleteLoggedModelTagResponse struct {
}

type DeleteRunRequest

type DeleteRunRequest struct {
	// ID of the run to delete.
	RunId *string
}

type DeleteRunResponse

type DeleteRunResponse struct {
}

type DeleteRunsRequest

type DeleteRunsRequest struct {
	// The ID of the experiment containing the runs to delete.
	ExperimentId *string
	// The maximum creation timestamp in milliseconds since the UNIX epoch for
	// deleting runs. Only runs created prior to or at this timestamp are deleted.
	MaxTimestampMillis *int64
	// An optional positive integer indicating the maximum number of runs to delete.
	// The maximum allowed value for max_runs is 10000.
	MaxRuns *int
}

type DeleteRunsResponse

type DeleteRunsResponse struct {
	// The number of runs deleted.
	RunsDeleted *int
}

type DeleteTagRequest

type DeleteTagRequest struct {
	// ID of the run that the tag was logged under. Must be provided.
	RunId *string
	// Name of the tag. Maximum size is 255 bytes. Must be provided.
	Key *string
}

type DeleteTagResponse

type DeleteTagResponse struct {
}

type Experiment

type Experiment struct {
	// Unique identifier for the experiment.
	ExperimentId *string
	// Human readable name that identifies the experiment.
	Name *string
	// Location where artifacts for the experiment are stored.
	ArtifactLocation *string
	// Current life cycle stage of the experiment: "active" or "deleted". Deleted
	// experiments are not returned by APIs.
	LifecycleStage *string
	// Last update time
	LastUpdateTime *int64
	// Creation time
	CreationTime *int64
	// Tags: Additional metadata key-value pairs.
	Tags []ExperimentTag
	// The location where the experiment's traces are stored. Unset when traces are
	// stored in the default MLflow backend. This field cannot be updated after the
	// experiment is created.
	TraceLocation *ExperimentTraceLocation
}

An experiment and its metadata..

type ExperimentTag

type ExperimentTag struct {
	// The tag key.
	Key *string
	// The tag value.
	Value *string
}

A tag for an experiment..

type ExperimentTraceLocation

type ExperimentTraceLocation struct {
	Location isExperimentTraceLocation_Location
}

The storage location for an experiment's traces..

type ExperimentTraceLocation_Location_UcTraceLocation

type ExperimentTraceLocation_Location_UcTraceLocation struct {
	UcTraceLocation UcTraceLocation
}

ExperimentTraceLocation_Location_UcTraceLocation selects UcTraceLocation for ExperimentTraceLocation.Location. A Unity Catalog schema where the experiment's traces are stored as Delta tables.

type FileInfo

type FileInfo struct {
	// The path relative to the root artifact directory run.
	Path *string
	// Whether the path is a directory.
	IsDir *bool
	// The size in bytes of the file. Unset for directories.
	FileSize *int64
}

Metadata of a single artifact file or directory..

type FinalizeLoggedModelRequest

type FinalizeLoggedModelRequest struct {
	// The ID of the logged model to finalize.
	ModelId *string
	// Whether or not the model is ready for use. “"LOGGED_MODEL_UPLOAD_FAILED"“
	// indicates that something went wrong when logging the model weights / agent
	// code.
	Status LoggedModelStatus
}

type FinalizeLoggedModelResponse

type FinalizeLoggedModelResponse struct {
	// The updated logged model.
	Model *LoggedModel
}

type GetExperimentByNameRequest

type GetExperimentByNameRequest struct {
	// Name of the associated experiment.
	ExperimentName *string
}

type GetExperimentByNameResponse

type GetExperimentByNameResponse struct {
	// Experiment details.
	Experiment *Experiment
}

type GetExperimentRequest

type GetExperimentRequest struct {
	// ID of the associated experiment.
	ExperimentId *string
}

type GetExperimentResponse

type GetExperimentResponse struct {
	// Experiment details.
	Experiment *Experiment
	// A collection of active runs in the experiment. Note: this may not contain all
	// of the experiment's active runs.
	//
	// This field is deprecated. Please use the "Search Runs" API to fetch runs
	// within an experiment.
	Runs []RunInfo
}

type GetLoggedModelRequest

type GetLoggedModelRequest struct {
	// The ID of the logged model to retrieve.
	ModelId *string
}

type GetLoggedModelResponse

type GetLoggedModelResponse struct {
	// The retrieved logged model.
	Model *LoggedModel
}

type GetMetricHistoryResponse

type GetMetricHistoryResponse struct {
	// All logged values for this metric if `max_results` is not specified in the
	// request or if the total count of metrics returned is less than the service
	// level pagination threshold. Otherwise, this is one page of results.
	Metrics []Metric
	// A token that can be used to issue a query for the next page of metric history
	// values. A missing token indicates that no additional metrics are available to
	// fetch.
	NextPageToken *string
}

type GetRunRequest

type GetRunRequest struct {
	// ID of the run to fetch. Must be provided.
	RunId *string
	// [Deprecated, use `run_id` instead] ID of the run to fetch. This field will be
	// removed in a future MLflow version.
	RunUuid *string
}

type GetRunResponse

type GetRunResponse struct {
	// Run metadata (name, start time, etc) and data (metrics, params, and tags).
	Run *Run
}

type InputTag

type InputTag struct {
	// The tag key.
	Key *string
	// The tag value.
	Value *string
}

Tag for a dataset input..

type ListArtifactsRequest

type ListArtifactsRequest struct {
	// ID of the run whose artifacts to list. Must be provided.
	RunId *string
	// [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
	// Filter artifacts matching this path (a relative path from the root artifact
	// directory).
	Path *string
	// The token indicating the page of artifact results to fetch. `page_token` is
	// not supported when listing artifacts in UC Volumes. A maximum of 1000
	// artifacts will be retrieved for UC Volumes. Please call
	// `/api/2.0/fs/directories{directory_path}` for listing artifacts in UC
	// Volumes, which supports pagination. See [List directory contents | Files
	// API](/api/workspace/files/listdirectorycontents).
	PageToken *string
}

type ListArtifactsResponse

type ListArtifactsResponse struct {
	// The root artifact directory for the run.
	RootUri *string
	// The file location and metadata for artifacts.
	Files []FileInfo
	// The token that can be used to retrieve the next page of artifact results.
	NextPageToken *string
}

type ListExperimentsRequest

type ListExperimentsRequest struct {
	// Qualifier for type of experiments to be returned. If unspecified, return only
	// active experiments.
	ViewType ViewType
	// 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 *int64
	// Token indicating the page of experiments to fetch
	PageToken *string
}

type ListExperimentsResponse

type ListExperimentsResponse struct {
	// Paginated Experiments beginning with the first item on the requested page.
	Experiments []Experiment
	// Token that can be used to retrieve the next page of experiments. Empty token
	// means no more experiment is available for retrieval.
	NextPageToken *string
}

type ListMetricHistoryRequest

type ListMetricHistoryRequest struct {
	// ID of the run from which to fetch metric values. Must be provided.
	RunId *string
	// [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
	// Name of the metric.
	MetricKey *string
	// Token indicating the page of metric histories to fetch.
	PageToken *string
	// 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
}

type LogBatchRequest

type LogBatchRequest struct {
	// ID of the run to log under
	RunId *string
	// Metrics to log. A single request can contain up to 1000 metrics, and up to
	// 1000 metrics, params, and tags in total.
	Metrics []Metric
	// Params to log. A single request can contain up to 100 params, and up to 1000
	// metrics, params, and tags in total.
	Params []Param
	// Tags to log. A single request can contain up to 100 tags, and up to 1000
	// metrics, params, and tags in total.
	Tags []RunTag
}

type LogBatchResponse

type LogBatchResponse struct {
}

type LogInputsRequest

type LogInputsRequest struct {
	// ID of the run to log under
	RunId *string
	// Dataset inputs
	Datasets []DatasetInput
	// Model inputs
	Models []ModelInput
}

type LogInputsResponse

type LogInputsResponse struct {
}

type LogLoggedModelParamsRequest

type LogLoggedModelParamsRequest struct {
	// The ID of the logged model to log params for.
	ModelId *string
	// Parameters to attach to the model.
	Params []LoggedModelParameter
}

type LogLoggedModelParamsResponse

type LogLoggedModelParamsResponse struct {
}

type LogMetricRequest

type LogMetricRequest struct {
	// ID of the run under which to log the metric. Must be provided.
	RunId *string
	// [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
	// Name of the metric.
	Key *string
	// Double value of the metric being logged.
	Value *float64
	// Unix timestamp in milliseconds at the time metric was logged.
	Timestamp *int64
	// Step at which to log the metric
	Step *int64
	// ID of the logged model associated with the metric, if applicable
	ModelId *string
	// The name of the dataset associated with the metric. E.g. “my.uc.table@2”
	// “nyc-taxi-dataset”, “fantastic-elk-3”
	DatasetName *string
	// Dataset digest of the dataset associated with the metric, e.g. an md5 hash of
	// the dataset that uniquely identifies it within datasets of the same name.
	DatasetDigest *string
}

type LogMetricResponse

type LogMetricResponse struct {
}

type LogModelRequest

type LogModelRequest struct {
	// ID of the run to log under
	RunId *string
	// MLmodel file in json format.
	ModelJson *string
}

type LogModelResponse

type LogModelResponse struct {
}

type LogOutputsRequest

type LogOutputsRequest struct {
	// The ID of the Run from which to log outputs.
	RunId *string
	// The model outputs from the Run.
	Models []ModelOutput
}

type LogOutputsResponse

type LogOutputsResponse struct {
}

type LogParamRequest

type LogParamRequest struct {
	// ID of the run under which to log the param. Must be provided.
	RunId *string
	// [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
	// Name of the param. Maximum size is 255 bytes.
	Key *string
	// String value of the param being logged. Maximum size is 500 bytes.
	Value *string
}

type LogParamResponse

type LogParamResponse struct {
}

type LoggedModel

type LoggedModel struct {
	// The logged model attributes such as model ID, status, tags, etc.
	Info *LoggedModelInfo
	// The params and metrics attached to the logged model.
	Data *LoggedModelData
}

A logged model message includes logged model attributes, tags, registration info, params, and linked run metrics..

type LoggedModelData

type LoggedModelData struct {
	// Immutable string key-value pairs of the model.
	Params []LoggedModelParameter
	// Performance metrics linked to the model.
	Metrics []Metric
}

A LoggedModelData message includes logged model params and linked metrics..

type LoggedModelInfo

type LoggedModelInfo struct {
	// The unique identifier for the logged model.
	ModelId *string
	// The ID of the experiment that owns the model.
	ExperimentId *string
	// The name of the model.
	Name *string
	// The timestamp when the model was created in milliseconds since the UNIX
	// epoch.
	CreationTimestampMs *int64
	// The timestamp when the model was last updated in milliseconds since the UNIX
	// epoch.
	LastUpdatedTimestampMs *int64
	// The URI of the directory where model artifacts are stored.
	ArtifactUri *string
	// The status of whether or not the model is ready for use.
	Status LoggedModelStatus
	// The ID of the user or principal that created the model.
	CreatorId *int64
	// The type of model, such as “"Agent"“, “"Classifier"“, “"LLM"“.
	ModelType *string
	// The ID of the run that created the model.
	SourceRunId *string
	// Details on the current model status.
	StatusMessage *string
	// Mutable string key-value pairs set on the model.
	Tags []LoggedModelTag
}

A LoggedModelInfo includes logged model attributes, tags, and registration info..

type LoggedModelParameter

type LoggedModelParameter struct {
	// The key identifying this param.
	Key *string
	// The value of this param.
	Value *string
}

Parameter associated with a LoggedModel..

type LoggedModelStatus

type LoggedModelStatus string

A LoggedModelStatus enum value represents the status of a logged model.

const (
	LoggedModelStatus_Unspecified LoggedModelStatus = ""
	// The LoggedModel has been created, but the LoggedModel files are not
	// completely uploaded.
	LoggedModelStatus_LoggedModelPending LoggedModelStatus = "LOGGED_MODEL_PENDING"
	// The LoggedModel is created, and the LoggedModel files are completely
	// uploaded.
	LoggedModelStatus_LoggedModelReady LoggedModelStatus = "LOGGED_MODEL_READY"
	// The LoggedModel is created, but an error occurred when uploading the
	// LoggedModel files such as model weights / agent code.
	LoggedModelStatus_LoggedModelUploadFailed LoggedModelStatus = "LOGGED_MODEL_UPLOAD_FAILED"
)

type LoggedModelTag

type LoggedModelTag struct {
	// The tag key.
	Key *string
	// The tag value.
	Value *string
}

Tag for a LoggedModel..

type Metric

type Metric struct {
	// The key identifying the metric.
	Key *string
	// The value of the metric.
	Value *float64
	// The timestamp at which the metric was recorded.
	Timestamp *int64
	// The step at which the metric was logged.
	Step *int64
	// The name of the dataset associated with the metric. E.g. “my.uc.table@2”
	// “nyc-taxi-dataset”, “fantastic-elk-3”
	DatasetName *string
	// The dataset digest of the dataset associated with the metric, e.g. an md5
	// hash of the dataset that uniquely identifies it within datasets of the same
	// name.
	DatasetDigest *string
	// The ID of the logged model or registered model version associated with the
	// metric, if applicable.
	ModelId *string
	// The ID of the run containing the metric.
	RunId *string
}

Metric associated with a run, represented as a key-value pair..

type ModelInput

type ModelInput struct {
	// The unique identifier of the model.
	ModelId *string
}

Represents a LoggedModel or Registered Model Version input to a Run..

type ModelOutput

type ModelOutput struct {
	// The unique identifier of the model.
	ModelId *string
	// The step at which the model was produced.
	Step *int64
}

Represents a LoggedModel output of a Run..

type Param

type Param struct {
	// Key identifying this param.
	Key *string
	// Value associated with this param.
	Value *string
}

Param associated with a run..

type RestoreExperimentRequest

type RestoreExperimentRequest struct {
	// ID of the associated experiment.
	ExperimentId *string
}

type RestoreExperimentResponse

type RestoreExperimentResponse struct {
}

type RestoreRunRequest

type RestoreRunRequest struct {
	// ID of the run to restore.
	RunId *string
}

type RestoreRunResponse

type RestoreRunResponse struct {
}

type RestoreRunsRequest

type RestoreRunsRequest struct {
	// The ID of the experiment containing the runs to restore.
	ExperimentId *string
	// The minimum deletion timestamp in milliseconds since the UNIX epoch for
	// restoring runs. Only runs deleted no earlier than this timestamp are
	// restored.
	MinTimestampMillis *int64
	// An optional positive integer indicating the maximum number of runs to
	// restore. The maximum allowed value for max_runs is 10000.
	MaxRuns *int
}

type RestoreRunsResponse

type RestoreRunsResponse struct {
	// The number of runs restored.
	RunsRestored *int
}

type Run

type Run struct {
	// Run metadata.
	Info *RunInfo
	// Run data.
	Data *RunData
	// Run inputs.
	Inputs *RunInputs
}

A single run..

type RunData

type RunData struct {
	// Run metrics.
	Metrics []Metric
	// Run parameters.
	Params []Param
	// Additional metadata key-value pairs.
	Tags []RunTag
}

Run data (metrics, params, and tags)..

type RunInfo

type RunInfo struct {
	// Unique identifier for the run.
	RunId *string
	// [Deprecated, use run_id instead] Unique identifier for the run. This field
	// will be removed in a future MLflow version.
	RunUuid *string
	// The experiment ID.
	ExperimentId *string
	// The name of the run.
	RunName *string
	// 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
	// Current status of the run.
	Status RunStatus
	// Unix timestamp of when the run started in milliseconds.
	StartTime *int64
	// Unix timestamp of when the run ended in milliseconds.
	EndTime *int64
	// 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
	// Current life cycle stage of the experiment : OneOf("active", "deleted")
	LifecycleStage *string
}

Metadata of a single run..

type RunInputs

type RunInputs struct {
	// Run metrics.
	DatasetInputs []DatasetInput
	// Model inputs to the Run.
	ModelInputs []ModelInput
}

Run inputs..

type RunStatus

type RunStatus string

Status of a run.

const (
	RunStatus_Unspecified RunStatus = ""
	// Run has been initiated.
	RunStatus_Running RunStatus = "RUNNING"
	// Run is scheduled to run at a later time.
	RunStatus_Scheduled RunStatus = "SCHEDULED"
	// Run has completed.
	RunStatus_Finished RunStatus = "FINISHED"
	// Run execution failed.
	RunStatus_Failed RunStatus = "FAILED"
	// Run killed by user.
	RunStatus_Killed RunStatus = "KILLED"
)

type RunTag

type RunTag struct {
	// The tag key.
	Key *string
	// The tag value.
	Value *string
}

Tag for a run..

type SearchExperimentsRequest

type SearchExperimentsRequest struct {
	// Maximum number of experiments desired. Max threshold is 3000.
	MaxResults *int64
	// Token indicating the page of experiments to fetch
	PageToken *string
	// String representing a SQL filter condition (e.g. "name ILIKE
	// 'my-experiment%'")
	Filter *string
	// 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
	// Qualifier for type of experiments to be returned. If unspecified, return only
	// active experiments.
	ViewType ViewType
}

type SearchExperimentsResponse

type SearchExperimentsResponse struct {
	// Experiments that match the search criteria
	Experiments []Experiment
	// 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
}

type SearchLoggedModelsRequest

type SearchLoggedModelsRequest struct {
	// The IDs of the experiments in which to search for logged models.
	ExperimentIds []string
	// A filter expression over logged model info and data that allows returning a
	// subset of logged models. The syntax is a subset of SQL that supports AND'ing
	// together binary operations.
	//
	// Example: “params.alpha < 0.3 AND metrics.accuracy > 0.9“.
	Filter *string
	// List of datasets on which to apply the metrics filter clauses. For example, a
	// filter with `metrics.accuracy > 0.9` and dataset info with name
	// "test_dataset" means we will return all logged models with accuracy > 0.9 on
	// the test_dataset. Metric values from ANY dataset matching the criteria are
	// considered. If no datasets are specified, then metrics across all datasets
	// are considered in the filter.
	Datasets []SearchLoggedModelsRequest_Dataset
	// The maximum number of Logged Models to return. The maximum limit is 50.
	MaxResults *int
	// The list of columns for ordering the results, with additional fields for
	// sorting criteria.
	OrderBy []SearchLoggedModelsRequest_OrderBy
	// The token indicating the page of logged models to fetch.
	PageToken *string
}

type SearchLoggedModelsRequest_Dataset

type SearchLoggedModelsRequest_Dataset struct {
	// The name of the dataset.
	DatasetName *string
	// The digest of the dataset.
	DatasetDigest *string
}

type SearchLoggedModelsRequest_OrderBy

type SearchLoggedModelsRequest_OrderBy struct {
	// The name of the field to order by, e.g. "metrics.accuracy".
	FieldName *string
	// Whether the search results order is ascending or not.
	Ascending *bool
	// If “field_name“ refers to a metric, this field specifies the name of the
	// dataset associated with the metric. Only metrics associated with the
	// specified dataset name will be considered for ordering. This field may only
	// be set if “field_name“ refers to a metric.
	DatasetName *string
	// If “field_name“ refers to a metric, this field specifies the digest of the
	// dataset associated with the metric. Only metrics associated with the
	// specified dataset name and digest will be considered for ordering. This field
	// may only be set if “dataset_name“ is also set.
	DatasetDigest *string
}

type SearchLoggedModelsResponse

type SearchLoggedModelsResponse struct {
	// Logged models that match the search criteria.
	Models []LoggedModel
	// The token that can be used to retrieve the next page of logged models.
	NextPageToken *string
}

type SearchRunsRequest

type SearchRunsRequest struct {
	// List of experiment IDs to search over.
	ExperimentIds []string
	// 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
	// Whether to display only active, only deleted, or all runs. Defaults to only
	// active runs.
	RunViewType ViewType
	// Maximum number of runs desired. Max threshold is 50000
	MaxResults *int
	// 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
	// Token for the current page of runs.
	PageToken *string
}

type SearchRunsResponse

type SearchRunsResponse struct {
	// Runs that match the search criteria.
	Runs []Run
	// Token for the next page of runs.
	NextPageToken *string
}

type SetExperimentTagRequest

type SetExperimentTagRequest struct {
	// ID of the experiment under which to log the tag. Must be provided.
	ExperimentId *string
	// Name of the tag. Keys up to 250 bytes in size are supported.
	Key *string
	// String value of the tag being logged. Values up to 64KB in size are
	// supported.
	Value *string
}

type SetExperimentTagResponse

type SetExperimentTagResponse struct {
}

type SetLoggedModelTagsRequest

type SetLoggedModelTagsRequest struct {
	// The ID of the logged model to set the tags on.
	ModelId *string
	// The tags to set on the logged model.
	Tags []LoggedModelTag
}

type SetLoggedModelTagsResponse

type SetLoggedModelTagsResponse struct {
}

type SetTagRequest

type SetTagRequest struct {
	// ID of the run under which to log the tag. Must be provided.
	RunId *string
	// [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
	// Name of the tag. Keys up to 250 bytes in size are supported.
	Key *string
	// String value of the tag being logged. Values up to 64KB in size are
	// supported.
	Value *string
}

type SetTagResponse

type SetTagResponse struct {
}

type UcTraceLocation

type UcTraceLocation struct {
	// The name of the Unity Catalog catalog.
	Catalog *string
	// The name of the Unity Catalog schema within `catalog`.
	Schema *string
	// The prefix for the trace tables, which are named
	// `{catalog}.{schema}.{table_prefix}_otel_*`. May only contain letters, digits,
	// and underscores, and may be at most 238 characters. When unset, a
	// server-generated prefix derived from the experiment ID is used and this field
	// stays empty on read; the resolved value is always available in
	// `effective_table_prefix`.
	TablePrefix *string
	// The trace-table prefix actually in effect: `table_prefix` if it was set on
	// creation, otherwise the server-generated default.
	EffectiveTablePrefix *string
}

A Unity Catalog trace storage location. Traces are stored as Delta tables in the specified catalog and schema..

type UpdateExperimentRequest

type UpdateExperimentRequest struct {
	// ID of the associated experiment.
	ExperimentId *string
	// If provided, the experiment's name is changed to the new name. The new name
	// must be unique.
	NewName *string
}

type UpdateExperimentResponse

type UpdateExperimentResponse struct {
}

type UpdateRunRequest

type UpdateRunRequest struct {
	// ID of the run to update. Must be provided.
	RunId *string
	// [Deprecated, use `run_id` instead] ID of the run to update. This field will
	// be removed in a future MLflow version.
	RunUuid *string
	// Updated status of the run.
	Status RunStatus
	// Unix timestamp in milliseconds of when the run ended.
	EndTime *int64
	// Updated name of the run.
	RunName *string
}

type UpdateRunResponse

type UpdateRunResponse struct {
	// Updated metadata of the run.
	RunInfo *RunInfo
}

type ViewType

type ViewType string

Qualifier for the view type.

const (
	ViewType_Unspecified ViewType = ""
	// Default. Return only active.
	ViewType_ActiveOnly ViewType = "ACTIVE_ONLY"
	// Return only deleted.
	ViewType_DeletedOnly ViewType = "DELETED_ONLY"
	// Get all.
	ViewType_All ViewType = "ALL"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL