Skip to content

Commit c5bd7a7

Browse files
committed
Documentation updates.
1 parent 6ca8f38 commit c5bd7a7

File tree

4 files changed

+28
-28
lines changed

4 files changed

+28
-28
lines changed

docs/src/reference.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ MLFlowExperiment
1212
MLFlowRun
1313
MLFlowRunInfo
1414
MLFlowRunData
15+
MLFlowRunDataMetric
1516
MLFlowRunStatus
1617
```
1718

@@ -31,6 +32,7 @@ createrun
3132
getrun
3233
updaterun
3334
deleterun
35+
searchruns
3436
```
3537

3638
# Logging

src/runs.jl

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,19 +96,19 @@ deleterun(mlf::MLFlow, run_info::MLFlowRunInfo) = deleterun(mlf, run_info.run_id
9696
deleterun(mlf::MLFlow, run::MLFlowRun) = deleterun(mlf, run.info)
9797

9898
"""
99-
searchruns(mlf::MLFlow, experiment_ids, filter)
99+
searchruns(mlf::MLFlow, experiment_ids)
100100
101-
Searches for runs in an experiment based on filter.
101+
Searches for runs in an experiment.
102102
103103
# Arguments
104104
- `mlf`: [`MLFlow`](@ref) configuration.
105-
- `experiment_ids::AbstractVector{Integer}`: `experiment_id`s in which to search for runs.
105+
- `experiment_ids::AbstractVector{Integer}`: `experiment_id`s in which to search for runs. Can also be a single `Integer`.
106106
107107
# Keywords
108108
- `filter::String`: filter as defined in [MLFlow documentation](https://mlflow.org/docs/latest/rest-api.html#search-runs)
109-
- `run_view_type::String`: ...
110-
- `max_results::Integer`: ...
111-
- `order_by::String`: ...
109+
- `run_view_type::String`: one of `ACTIVE_ONLY`, `DELETED_ONLY`, or `ALL`.
110+
- `max_results::Integer`: 50,000 by default.
111+
- `order_by::String`: as defined in [MLFlow documentation](https://mlflow.org/docs/latest/rest-api.html#search-runs)
112112
- `page_token::String`: paging functionality, handled automatically. Not meant to be passed by the user.
113113
114114
# Returns
@@ -155,6 +155,5 @@ function searchruns(mlf::MLFlow, experiment_ids::AbstractVector{<:Integer};
155155

156156
runs
157157
end
158-
function searchruns(mlf::MLFlow, experiment_id::Integer; kwargs...)
158+
searchruns(mlf::MLFlow, experiment_id::Integer; kwargs...) =
159159
searchruns(mlf, [experiment_id]; kwargs...)
160-
end

src/types.jl

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,13 @@ end
7777
Represents run metadata.
7878
7979
# Fields
80-
- `run_id::String`
81-
- `experiment_id::Integer`
82-
- `status::MLFlowRunStatus`
83-
- `start_time::Union{Int64,Missing}`
84-
- `end_time::Union{Int64,Missing}`
85-
- `artifact_uri::String`
86-
- `lifecycle_stage::String`
80+
- `run_id::String`: run identifier.
81+
- `experiment_id::Integer`: experiment identifier.
82+
- `status::MLFlowRunStatus`: run status.
83+
- `start_time::Union{Int64,Missing}`: when was the run started, UNIX time in milliseconds.
84+
- `end_time::Union{Int64,Missing}`: when did the run end, UNIX time in milliseconds.
85+
- `artifact_uri::String`: where are artifacts from this run stored.
86+
- `lifecycle_stage::String`: one of `active` or `deleted`.
8787
"""
8888
struct MLFlowRunInfo
8989
run_id::String
@@ -133,10 +133,10 @@ end
133133
Represents a metric.
134134
135135
# Fields
136-
- `key::String`: ...
137-
- `value`: ...
138-
- `step::Int64`: ...
139-
- `timestamp::Int64`: ...
136+
- `key::String`: metric identifier.
137+
- `value::Float64`: metric value.
138+
- `step::Int64`: step.
139+
- `timestamp::Int64`: timestamp in UNIX time in milliseconds.
140140
"""
141141
struct MLFlowRunDataMetric
142142
key::String
@@ -161,7 +161,7 @@ Represents run data.
161161
# Fields
162162
- `metrics::Vector{MLFlowRunDataMetric}`: run metrics.
163163
- `params::Dict{String,String}`: run parameters.
164-
- `tags`
164+
- `tags`: list of run tags.
165165
166166
"""
167167
struct MLFlowRunData

test/runtests.jl

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,21 +75,20 @@ end
7575
logmetric(mlf, exprun2, "metric2", [1.0, 2.0])
7676
updaterun(mlf, exprun2, "FINISHED")
7777

78-
@show experiment_id
7978
runs = searchruns(mlf, experiment_id)
8079
@test length(runs) == 2
8180
runs = searchruns(mlf, experiment_id; filter="param.param2 = \"key2\"")
8281
@test length(runs) == 1
83-
@test_throws ErrorException searchruns(mlf, experiment_id; run_view_type="MEH")
82+
@test_throws ErrorException searchruns(mlf, experiment_id; run_view_type="ERR")
8483
runs = searchruns(mlf, experiment_id; filter="param.param2 = \"key3\"")
8584
@test length(runs) == 0
8685
runs = searchruns(mlf, experiment_id; max_results=1) # test paging functionality
8786
@test length(runs) == 2
88-
# , "params.\"paramkey\" == \"paramval\"")
89-
# deleterun(mlf, exprunid)
87+
deleterun(mlf, exprunid)
88+
deleterun(mlf, exprun2)
9089

91-
# deleteexperiment(mlf, experiment_id)
92-
# experiment = getexperiment(mlf, experiment_id)
93-
# @test experiment.experiment_id == experiment_id
94-
# @test experiment.lifecycle_stage == "deleted"
90+
deleteexperiment(mlf, experiment_id)
91+
experiment = getexperiment(mlf, experiment_id)
92+
@test experiment.experiment_id == experiment_id
93+
@test experiment.lifecycle_stage == "deleted"
9594
end

0 commit comments

Comments
 (0)