1
1
"""
2
- createexperiment(instance::MLFlow, name::String;
3
- artifact_location::String="",
2
+ createexperiment(instance::MLFlow, name::String; artifact_location::String="",
4
3
tags::Union{Dict{<:Any}, Array{<:Any}}=[])
5
4
6
- Create an experiment with a name. Returns the newly created experiment.
7
- Validates that another experiment with the same name does not already exist and
8
- fails if another experiment with the same name already exists.
5
+ Create an experiment with a name. Returns the newly created experiment. Validates that
6
+ another experiment with the same name does not already exist and fails if another
7
+ experiment with the same name already exists.
9
8
10
9
# Arguments
11
10
- `instance`: [`MLFlow`](@ref) configuration.
@@ -51,9 +50,9 @@ getexperiment(instance::MLFlow, experiment_id::Integer)::Experiment =
51
50
52
51
Get metadata for an experiment.
53
52
54
- This endpoint will return deleted experiments, but prefers the active
55
- experiment if an active and deleted experiment share the same name. If multiple
56
- deleted experiments share the same name, the API will return one of them.
53
+ This endpoint will return deleted experiments, but prefers the active experiment if an
54
+ active and deleted experiment share the same name. If multiple deleted experiments share
55
+ the same name, the API will return one of them.
57
56
58
57
# Arguments
59
58
- `instance`: [`MLFlow`](@ref) configuration.
@@ -62,10 +61,8 @@ deleted experiments share the same name, the API will return one of them.
62
61
# Returns
63
62
An instance of type [`Experiment`](@ref).
64
63
"""
65
- function getexperimentbyname (instance:: MLFlow ,
66
- experiment_name:: String ):: Experiment
67
- result = mlfget (instance, " experiments/get-by-name" ;
68
- experiment_name= experiment_name)
64
+ function getexperimentbyname (instance:: MLFlow , experiment_name:: String ):: Experiment
65
+ result = mlfget (instance, " experiments/get-by-name" ; experiment_name= experiment_name)
69
66
return result[" experiment" ] |> Experiment
70
67
end
71
68
74
71
deleteexperiment(instance::MLFlow, experiment_id::Integer)
75
72
deleteexperiment(instance::MLFlow, experiment::Experiment)
76
73
77
- Mark an experiment and associated metadata, runs, metrics, params, and tags for
78
- deletion. If the experiment uses FileStore, artifacts associated with
79
- experiment are also deleted.
74
+ Mark an experiment and associated metadata, runs, metrics, params, and tags for deletion.
75
+ If the experiment uses FileStore, artifacts associated with experiment are also deleted.
80
76
81
77
# Arguments
82
78
- `instance`: [`MLFlow`](@ref) configuration.
@@ -99,9 +95,9 @@ deleteexperiment(instance::MLFlow, experiment::Experiment)::Bool =
99
95
restoreexperiment(instance::MLFlow, experiment_id::Integer)
100
96
restoreexperiment(instance::MLFlow, experiment::Experiment)
101
97
102
- Restore an experiment marked for deletion. This also restores associated
103
- metadata, runs, metrics, params, and tags. If experiment uses FileStore,
104
- underlying artifacts associated with experiment are also restored.
98
+ Restore an experiment marked for deletion. This also restores associated metadata, runs,
99
+ metrics, params, and tags. If experiment uses FileStore, underlying artifacts associated
100
+ with experiment are also restored.
105
101
106
102
# Arguments
107
103
- `instance`: [`MLFlow`](@ref) configuration.
@@ -121,62 +117,52 @@ restoreexperiment(instance::MLFlow, experiment::Experiment)::Bool =
121
117
122
118
"""
123
119
updateexperiment(instance::MLFlow, experiment_id::String, new_name::String)
124
- updateexperiment(instance::MLFlow, experiment_id::Integer,
125
- new_name::String)
126
- updateexperiment(instance::MLFlow, experiment::Experiment,
127
- new_name::String)
120
+ updateexperiment(instance::MLFlow, experiment_id::Integer, new_name::String)
121
+ updateexperiment(instance::MLFlow, experiment::Experiment, new_name::String)
128
122
129
123
Update experiment metadata.
130
124
131
125
# Arguments
132
126
- `instance`: [`MLFlow`](@ref) configuration.
133
127
- `experiment_id`: ID of the associated experiment.
134
- - `new_name`: If provided, the experiment’s name is changed to the new name.
135
- The new name must be unique.
128
+ - `new_name`: If provided, the experiment’s name is changed to the new name. The new name
129
+ must be unique.
136
130
137
131
# Returns
138
132
`true` if successful. Otherwise, raises exception.
139
133
"""
140
- function updateexperiment (instance:: MLFlow , experiment_id:: String ,
141
- new_name:: String ):: Bool
142
- mlfpost (instance, " experiments/update" ; experiment_id= experiment_id,
143
- new_name= new_name)
134
+ function updateexperiment (instance:: MLFlow , experiment_id:: String , new_name:: String ):: Bool
135
+ mlfpost (instance, " experiments/update" ; experiment_id= experiment_id, new_name= new_name)
144
136
return true
145
137
end
146
- updateexperiment (instance:: MLFlow , experiment_id:: Integer ,
147
- new_name:: String ):: Bool =
138
+ updateexperiment (instance:: MLFlow , experiment_id:: Integer , new_name:: String ):: Bool =
148
139
updateexperiment (instance, string (experiment_id), new_name)
149
- updateexperiment (instance:: MLFlow , experiment:: Experiment ,
150
- new_name:: String ):: Bool =
140
+ updateexperiment (instance:: MLFlow , experiment:: Experiment , new_name:: String ):: Bool =
151
141
updateexperiment (instance, experiment. experiment_id, new_name)
152
142
153
143
"""
154
- searchexperiments(instance::MLFlow; max_results::Int64=20000,
155
- page_token::String="", filter::String="", order_by::Array{String}=[],
156
- view_type::ViewType=ACTIVE_ONLY)
144
+ searchexperiments(instance::MLFlow; max_results::Int64=20000, page_token::String="",
145
+ filter::String="", order_by::Array{String}=[], view_type::ViewType=ACTIVE_ONLY)
157
146
158
147
# Arguments
159
148
- `instance`: [`MLFlow`](@ref) configuration.
160
149
- `max_results`: Maximum number of experiments desired.
161
150
- `page_token`: Token indicating the page of experiments to fetch.
162
- - `filter`: A filter expression over experiment attributes and tags that allows
163
- returning a subset of experiments. See [MLFlow documentation](https://mlflow.org/docs/latest/rest-api.html#search-experiments).
164
- - `order_by`: List of columns for ordering search results, which can include
165
- experiment name and id with an optional “DESC” or “ASC” annotation, where “ASC”
166
- is the default.
167
- - `view_type`: Qualifier for type of experiments to be returned. If
168
- unspecified, return only active experiments.
151
+ - `filter`: A filter expression over experiment attributes and tags that allows returning a
152
+ subset of experiments. See [MLFlow documentation](https://mlflow.org/docs/latest/rest-api.html#search-experiments).
153
+ - `order_by`: List of columns for ordering search results, which can include experiment
154
+ name and id with an optional “DESC” or “ASC” annotation, where “ASC” is the default.
155
+ - `view_type`: Qualifier for type of experiments to be returned. If unspecified, return
156
+ only active experiments.
169
157
170
158
# Returns
171
159
- Vector of [`Experiment`](@ref) that were found in the MLFlow instance.
172
160
- The next page token if there are more results.
173
161
"""
174
162
function searchexperiments (instance:: MLFlow ; max_results:: Int64 = 20000 ,
175
163
page_token:: String = " " , filter:: String = " " , order_by:: Array{String} = String[],
176
- view_type:: ViewType = ACTIVE_ONLY
177
- ):: Tuple{Array{Experiment}, Union{String, Nothing}}
178
- parameters = (; max_results, page_token, filter,
179
- :view_type => view_type |> Integer)
164
+ view_type:: ViewType = ACTIVE_ONLY):: Tuple{Array{Experiment}, Union{String, Nothing}}
165
+ parameters = (; max_results, page_token, filter, :view_type => view_type |> Integer)
180
166
181
167
if order_by |> ! isempty
182
168
parameters = (; order_by, parameters... )
@@ -191,12 +177,9 @@ function searchexperiments(instance::MLFlow; max_results::Int64=20000,
191
177
end
192
178
193
179
"""
194
- setexperimenttag(instance::MLFlow, experiment_id::String, key::String,
195
- value::String)
196
- setexperimenttag(instance::MLFlow, experiment_id::Integer, key::String,
197
- value::String)
198
- setexperimenttag(instance::MLFlow, experiment::Experiment, key::String,
199
- value::String)
180
+ setexperimenttag(instance::MLFlow, experiment_id::String, key::String, value::String)
181
+ setexperimenttag(instance::MLFlow, experiment_id::Integer, key::String, value::String)
182
+ setexperimenttag(instance::MLFlow, experiment::Experiment, key::String, value::String)
200
183
201
184
Set a tag on an experiment. Experiment tags are metadata that can be updated.
202
185
@@ -210,8 +193,8 @@ Set a tag on an experiment. Experiment tags are metadata that can be updated.
210
193
"""
211
194
function setexperimenttag (instance:: MLFlow , experiment_id:: String , key:: String ,
212
195
value:: String ):: Bool
213
- mlfpost (instance, " experiments/set-experiment-tag" ;
214
- experiment_id = experiment_id, key= key, value= value)
196
+ mlfpost (instance, " experiments/set-experiment-tag" ; experiment_id = experiment_id,
197
+ key= key, value= value)
215
198
return true
216
199
end
217
200
setexperimenttag (instance:: MLFlow , experiment_id:: Integer , key:: String ,
0 commit comments