Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion simvue/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -1688,7 +1688,9 @@ def log_metrics(
+ "using default axis range [0, 1] for all axes "
+ "and assuming constant interval."
)
_axes_ticks = [numpy.linspace(0, 1, n) for n in metric.shape]
_axes_ticks = [
numpy.linspace(0, 1, n) for n in reversed(metric.shape)
]
self.assign_metric_to_grid(
metric_name=label,
grid_name=label,
Expand Down
12 changes: 11 additions & 1 deletion tests/functional/test_run_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,16 @@ def test_log_metrics_online(
assert system_metrics_spy.call_count >= 1


@pytest.mark.run
@pytest.mark.online
def test_log_grid_metric_auto_grid() -> None:
with sv_run.Run() as run_final:
run_final.init("test")
run_final.log_metrics({"test": numpy.ones((20, 30))}) # see issue #921
time.sleep(1)



@pytest.mark.run
@pytest.mark.offline
@pytest.mark.parametrize("metric_type", ("regular", "tensor"))
Expand All @@ -318,7 +328,7 @@ def test_log_metrics_offline(
)
else:
METRICS = {"a": 10, "aB0-_/.:=><+()": 1.2, "c": 2}

run.log_metrics(METRICS)

time.sleep(1)
Expand Down
Loading