Skip to content

Commit

Permalink
up corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
pebeto committed Jun 7, 2023
1 parent bdd448e commit 4bd02bf
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 13 deletions.
8 changes: 8 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ ShowCases = "605ecd9f-84a6-4c9e-81e2-4798472b76a3"
URIs = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4"
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[compat]
FilePathsBase = "0.9"
HTTP = "1.9"
JSON = "0.21"
ShowCases = "0.1"
URIs = "1.0"
julia = "1.0"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

Expand Down
1 change: 1 addition & 0 deletions docs/src/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ getexperiment
getorcreateexperiment
deleteexperiment
searchexperiments
listexperiments
```

# Runs
Expand Down
12 changes: 12 additions & 0 deletions src/deprecated.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
"""
listexperiments(mlf::MLFlow)
Returns a list of MLFlow experiments.
Deprecated (last MLFlow version: 1.30.1) in favor of [`searchexperiments`](@ref).
"""

function listexperiments(mlf::MLFlow)
endpoint = "experiments/list"
mlfget(mlf, endpoint)
end
15 changes: 2 additions & 13 deletions src/experiments.jl
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,7 @@ function searchexperiments(mlf::MLFlow;
filter = generatefilterfromattributes(filter_attributes)
end

kwargs = (
filter=filter,
run_view_type=run_view_type,
max_results=max_results,
order_by=order_by
)
kwargs = (; filter, run_view_type, max_results, order_by)
if !isempty(page_token)
kwargs = (; kwargs..., page_token=page_token)
end
Expand All @@ -201,13 +196,7 @@ function searchexperiments(mlf::MLFlow;
experiments = map(x -> MLFlowExperiment(x), result["experiments"])

if haskey(result, "next_page_token") && !isempty(result["next_page_token"])
kwargs = (
filter=filter,
run_view_type=run_view_type,
max_results=max_results,
order_by=order_by,
page_token=result["next_page_token"]
)
kwargs = (; filter, run_view_type, max_results, order_by, page_token=result["next_page_token"])
next_experiments = searchexperiments(mlf; kwargs...)
return vcat(experiments, next_experiments)
end
Expand Down

0 comments on commit 4bd02bf

Please sign in to comment.