Skip to content

Commit ac9b7f7

Browse files
authored
Merge pull request #67 from RomeoV/fix-logmetric-array-handling
Fix logmetric array handling in tutorial and examples
2 parents 7b17100 + e9fa730 commit ac9b7f7

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

docs/src/tutorial.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,10 @@ for (idx, pricepath) in enumerate(pricepaths)
9595
ylabel="Price"
9696
)
9797

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

101104
# Save the price path plot as an image

examples/simple-with-mlflow.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ for (idx, pricepath) in enumerate(pricepaths)
4444
ylabel="Price"
4545
)
4646

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

5053
# Save the price path plot as an image

0 commit comments

Comments
 (0)