Skip to content

Commit

Permalink
Fix wrong Y axis scale in Aim UI when metric has infinity values (#494)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgiannuzzi authored Oct 19, 2023
1 parent b24c6a0 commit c616d3d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/api/aim/runs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1032,6 +1032,12 @@ func DeleteBatch(c *fiber.Ctx) error {
func toNumpy(values []float64) fiber.Map {
buf := bytes.NewBuffer(make([]byte, 0, len(values)*8))
for _, v := range values {
switch v {
case math.MaxFloat64:
v = math.Inf(1)
case -math.MaxFloat64:
v = math.Inf(-1)
}
binary.Write(buf, binary.LittleEndian, v)
}
return fiber.Map{
Expand Down

0 comments on commit c616d3d

Please sign in to comment.