Skip to content

Tutorial attempts to log arrays with logmetric (type error) #63

@RomeoV

Description

@RomeoV

Description

The tutorial attempts to use logmetric to log entire arrays, but the function only accepts single Float64 values.

Location

  • docs/src/tutorial.md:98

Issue

Tutorial shows:

logmetric(mlf, exprun, "pricepath$(idx)", pricepath)

Where pricepath is an Array{Float64}. However, all logmetric method signatures only accept single Float64 values:

logmetric(instance::MLFlow, run::Run, key::String, value::Float64; timestamp, step)

Impact

  • Users following the tutorial will encounter MethodError: no method matching logmetric(..., ::Vector{Float64})
  • The tutorial fails when trying to log the main experimental results
  • This breaks the core functionality demonstration

Expected Behavior

Either:

  1. Tutorial should log individual values from the array in a loop, or
  2. Tutorial should use a different approach (like logbatch with multiple metrics), or
  3. Implement array support in logmetric (though this may conflict with MLFlow's metric concept)

Suggested Fix

Replace the problematic line with:

# Log each point in the price path as a separate metric with step parameter
for (step, value) in enumerate(pricepath)
    logmetric(mlf, exprun, "pricepath$(idx)", Float64(value); step=step-1)
end

Actual Behavior

Tutorial shows code that causes type errors due to array vs scalar mismatch.

Environment

  • MLFlowClient.jl version: 0.6.0
  • Julia version: 1.11.6

Found via systematic API analysis using methods(logmetric) to verify method signatures against tutorial usage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions