Skip to content

createrun fails? #70

@rkube

Description

@rkube

Hi,
I'm trying to get MLFlowClient.jl working with a locally hosted mlflow instance.

The following code fails

using MLFlowClient
using Minio

s3_cfg = MinioConfig("http://192.168.50.119:9000"; username=ENV["AWS_ACCESS_KEY_ID"], password=ENV["AWS_SECRET_ACCESS_KEY"])

mlf = MLFlow("http://192.168.50.119:5000/api")
experiment_id = createexperiment(mlf, "julia-tests")
exprun = createrun(mlf, experiment_id)

with

julia> exprun = createrun(mlf, experiment_id)
ERROR: KeyError: key "outputs" not found
Stacktrace:
 [1] getindex
   @ ./dict.jl:477 [inlined]
 [2] Run(data::Dict{String, Any})
   @ MLFlowClient ~/source/repos/MLFlowClient.jl/src/types/run.jl:142
 [3] |>(x::Dict{String, Any}, f::Type{Run})
   @ Base ./operators.jl:926
 [4] createrun(instance::MLFlow, experiment_id::String; run_name::Missing, start_time::Missing, tags::Vector{Tag})
   @ MLFlowClient ~/source/repos/MLFlowClient.jl/src/services/run.jl:25
 [5] createrun(instance::MLFlow, experiment_id::String)
   @ MLFlowClient ~/source/repos/MLFlowClient.jl/src/services/run.jl:20
 [6] top-level scope
   @ REPL[17]:1

Looking into the HTTP response, the output field is missing https://mlflow.org/docs/latest/api_reference/rest-api.html#run

julia> result = MLFlowClient.mlfpost(mlf, "runs/create"; experiment_id=experiment_id)
Dict{String, Any} with 1 entry:
  "run" => Dict{String, Any}("data"=>Dict{String, Any}("tags"=>Any[Dict{String, Any}("key"=>"mlflow.runName", "value"=>"intrigued-bug-67…

julia> result["run"]
Dict{String, Any} with 3 entries:
  "data"   => Dict{String, Any}("tags"=>Any[Dict{String, Any}("key"=>"mlflow.runName", "value"=>"intrigued-bug-674")])
  "info"   => Dict{String, Any}("start_time"=>0, "artifact_uri"=>"s3://mlflow/2/e5a50e9b7bf448a993081562851cdc9f/artifacts", "lifecycle_…
  "inputs" => Dict{String, Any}()

How should this be handled? Just add an empty dict to "outputs" when the server doesn't send it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingquestionFurther information is requested

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions