Skip to content

default grid creation makes grid wrong way round #921

@wk9874

Description

@wk9874

Description of Bug

If you log a 3D metric, and dont specify a grid first, the python API makes a default one. But this will be the wrong way round compared to the uploaded metric, and so the metric will always fail to be logged.

Also need to add tests to catch this in the future

Steps To Reproduce

Steps to reproduce the behavior:

run.log_metrics({"test": numpy.ones((20, 30))})

Expected behavior

Should upload, with the grid set to default between 0-1 on each axis.

Actual Behaviour

ValueError: Validation error for 'https://uk.simvue.io/api/runs/GfpnEhRapr3hL9adFH5iKv/metrics' [422]:
╒═════════╤════════════╤══════════════════════════════════════════════════════════════════════════════════════════════════════════════════╕
│ Type    │ Location   │ Message                                                                                                          │
╞═════════╪════════════╪══════════════════════════════════════════════════════════════════════════════════════════════════════════════════╡
│ Unknown │ N/A        │ Expected shape '[20, 30]' when adding entry for metric to grid 'QpPBRjeHx6YEdmfqYyJCZx', but received '[30, 20]' │

Screenshots

If applicable, add screenshots to help explain your problem.

Setup

  • OS: Ubuntu
  • Python version 3.11

Metadata

Metadata

Assignees

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