@Generated public interface ExperimentsService
Experiments are located in the workspace file tree. You manage experiments using the same tools you use to manage other workspace objects such as folders, notebooks, and libraries.
This is the high-level interface, that contains generated methods.
Evolving: this interface is under development. Method signatures may change.
Modifier and Type | Method and Description |
---|---|
CreateExperimentResponse |
createExperiment(CreateExperiment createExperiment)
Create experiment.
|
CreateRunResponse |
createRun(CreateRun createRun)
Create a run.
|
void |
deleteExperiment(DeleteExperiment deleteExperiment)
Delete an experiment.
|
void |
deleteRun(DeleteRun deleteRun)
Delete a run.
|
DeleteRunsResponse |
deleteRuns(DeleteRuns deleteRuns)
Delete runs by creation time.
|
void |
deleteTag(DeleteTag deleteTag)
Delete a tag.
|
GetExperimentResponse |
getByName(GetByNameRequest getByNameRequest)
Get metadata.
|
GetExperimentResponse |
getExperiment(GetExperimentRequest getExperimentRequest)
Get an experiment.
|
GetMetricHistoryResponse |
getHistory(GetHistoryRequest getHistoryRequest)
Get history of a given metric within a run.
|
GetExperimentPermissionLevelsResponse |
getPermissionLevels(GetExperimentPermissionLevelsRequest getExperimentPermissionLevelsRequest)
Get experiment permission levels.
|
ExperimentPermissions |
getPermissions(GetExperimentPermissionsRequest getExperimentPermissionsRequest)
Get experiment permissions.
|
GetRunResponse |
getRun(GetRunRequest getRunRequest)
Get a run.
|
ListArtifactsResponse |
listArtifacts(ListArtifactsRequest listArtifactsRequest)
Get all artifacts.
|
ListExperimentsResponse |
listExperiments(ListExperimentsRequest listExperimentsRequest)
List experiments.
|
void |
logBatch(LogBatch logBatch)
Log a batch.
|
void |
logInputs(LogInputs logInputs)
Log inputs to a run.
|
void |
logMetric(LogMetric logMetric)
Log a metric.
|
void |
logModel(LogModel logModel)
Log a model.
|
void |
logParam(LogParam logParam)
Log a param.
|
void |
restoreExperiment(RestoreExperiment restoreExperiment)
Restores an experiment.
|
void |
restoreRun(RestoreRun restoreRun)
Restore a run.
|
RestoreRunsResponse |
restoreRuns(RestoreRuns restoreRuns)
Restore runs by deletion time.
|
SearchExperimentsResponse |
searchExperiments(SearchExperiments searchExperiments)
Search experiments.
|
SearchRunsResponse |
searchRuns(SearchRuns searchRuns)
Search for runs.
|
void |
setExperimentTag(SetExperimentTag setExperimentTag)
Set a tag.
|
ExperimentPermissions |
setPermissions(ExperimentPermissionsRequest experimentPermissionsRequest)
Set experiment permissions.
|
void |
setTag(SetTag setTag)
Set a tag.
|
void |
updateExperiment(UpdateExperiment updateExperiment)
Update an experiment.
|
ExperimentPermissions |
updatePermissions(ExperimentPermissionsRequest experimentPermissionsRequest)
Update experiment permissions.
|
UpdateRunResponse |
updateRun(UpdateRun updateRun)
Update a run.
|
CreateExperimentResponse createExperiment(CreateExperiment createExperiment)
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.
CreateRunResponse createRun(CreateRun createRun)
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.
void deleteExperiment(DeleteExperiment deleteExperiment)
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.
void deleteRun(DeleteRun deleteRun)
Marks a run for deletion.
DeleteRunsResponse deleteRuns(DeleteRuns deleteRuns)
Bulk delete runs in an experiment that were created prior to or at the specified timestamp. Deletes at most max_runs per request.
void deleteTag(DeleteTag deleteTag)
Deletes a tag on a run. Tags are run metadata that can be updated during a run and after a run completes.
GetExperimentResponse getByName(GetByNameRequest getByNameRequest)
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.
GetExperimentResponse getExperiment(GetExperimentRequest getExperimentRequest)
Gets metadata for an experiment. This method works on deleted experiments.
GetMetricHistoryResponse getHistory(GetHistoryRequest getHistoryRequest)
Gets a list of all values for the specified metric for a given run.
GetExperimentPermissionLevelsResponse getPermissionLevels(GetExperimentPermissionLevelsRequest getExperimentPermissionLevelsRequest)
Gets the permission levels that a user can have on an object.
ExperimentPermissions getPermissions(GetExperimentPermissionsRequest getExperimentPermissionsRequest)
Gets the permissions of an experiment. Experiments can inherit permissions from their root object.
GetRunResponse getRun(GetRunRequest getRunRequest)
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.
ListArtifactsResponse listArtifacts(ListArtifactsRequest listArtifactsRequest)
List artifacts for a run. Takes an optional `artifact_path` prefix. If it is specified, the response contains only artifacts with the specified prefix.",
ListExperimentsResponse listExperiments(ListExperimentsRequest listExperimentsRequest)
Gets a list of all experiments.
void logBatch(LogBatch logBatch)
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
void logInputs(LogInputs logInputs)
**NOTE:** Experimental: This API may change or be removed in a future release without warning.
void logMetric(LogMetric logMetric)
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.
void logModel(LogModel logModel)
**NOTE:** Experimental: This API may change or be removed in a future release without warning.
void logParam(LogParam logParam)
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.
void restoreExperiment(RestoreExperiment restoreExperiment)
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.
void restoreRun(RestoreRun restoreRun)
Restores a deleted run.
RestoreRunsResponse restoreRuns(RestoreRuns restoreRuns)
Bulk restore runs in an experiment that were deleted no earlier than the specified timestamp. Restores at most max_runs per request.
SearchExperimentsResponse searchExperiments(SearchExperiments searchExperiments)
Searches for experiments that satisfy specified search criteria.
SearchRunsResponse searchRuns(SearchRuns searchRuns)
Searches for runs that satisfy expressions.
Search expressions can use `mlflowMetric` and `mlflowParam` keys.",
void setExperimentTag(SetExperimentTag setExperimentTag)
Sets a tag on an experiment. Experiment tags are metadata that can be updated.
ExperimentPermissions setPermissions(ExperimentPermissionsRequest experimentPermissionsRequest)
Sets permissions on an experiment. Experiments can inherit permissions from their root object.
void setTag(SetTag setTag)
Sets a tag on a run. Tags are run metadata that can be updated during a run and after a run completes.
void updateExperiment(UpdateExperiment updateExperiment)
Updates experiment metadata.
ExperimentPermissions updatePermissions(ExperimentPermissionsRequest experimentPermissionsRequest)
Updates the permissions on an experiment. Experiments can inherit permissions from their root object.
UpdateRunResponse updateRun(UpdateRun updateRun)
Updates run metadata.
Copyright © 2023. All rights reserved.