Creating new grid breaks if axes labels not provided
还没有人认领这个 Issue。
评估
调研方向
检查 simvue/run.py 中第 1434 行附近的 assign_metric_to_grid,然后使用 numpy 和缺失的坐标轴标签运行复现。确认预期行为是使用默认值创建网格,还是报告更清晰的验证错误,并验证最终行为是否与预期的网格和指标记录流程一致。
由索引模型根据 Issue 内容生成。
描述
Description of Bug
If I use assign_metrics_to_grid to make a new grid, and I don't provide a list of axes labels, it will crash and give a misleading error message:
File "/home/wk9874/Documents/simvue/python-api/simvue/run.py", line 1434, in assign_metric_to_grid
self._error(f"Grid '{grid_name}' is not defined.")
File "/home/wk9874/Documents/simvue/python-api/simvue/run.py", line 606, in _error
raise SimvueRunError(message)
simvue.exception.SimvueRunError: Grid 'test_metric_2d' is not defined.
I dont think axes labels should be required, it should probably default to 'x' for 2D metrics of ['x', 'y'] for 3D metrics. Although if you would prefer to be explicit and require axes labels, it should provide a more informative message
Steps To Reproduce
Code to reproduce the behavior:
import simvue
import numpy
with simvue.Run() as run:
run.init("test")
run.assign_metric_to_grid(metric_name="test_metric_2d", axes_ticks=numpy.arange(100))
for i in range(10):
run.log_metrics({"test_metric_2d": numpy.random.rand(10)}, time=i, step=i)
Expected behavior
Should create a grid and log a metric
Actual Behaviour
Error thrown
Screenshots
If applicable, add screenshots to help explain your problem.
Setup
- OS: Ubuntu 22.04
- Python version 3.10
- 主要语言
- Python
- 星标
- 4
- 派生
- 1
- 平均合并
- 7 天 6 小时
- 30 天内合并 PR
- 6
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
simvue-io/python-api 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
simvue-io/python-api#994 ·
-
bug
难度 1/5 1 小时以内 新手友好度 68/100
simvue-io/python-api#538 ·
-
难度 3/5 1-2 天 新手友好度 65/100
simvue-io/python-api#1000 · 2 条评论 ·
-
bug
难度 4/5 3-5 天 新手友好度 35/100
simvue-io/python-api#987 ·
-
难度 5/5 一周以上 新手友好度 25/100
simvue-io/python-api#932 ·
查看 simvue-io/python-api 的全部 Issue
相似的 Issue
-
essnmx good first issue
难度 1/5 1 小时以内 新手友好度 95/100
-
难度 2/5 1-3 小时 新手友好度 65/100
syfoud/Simulated_Scepter#174 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
Giskard-AI/giskard-oss#2840 · 1 条评论 ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success 未关闭area: repo bug perceived difficulty: 2
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
yeti-platform/yeti#1380 ·