conclude_performance() crashes when test_iterations is 1 or 2
還沒有人認領這個 Issue。
評估
- 難度
- 1/5
- 預估耗時
- 1 小時以內
- 新手友好度
- 78/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- python
研究方向
從 ros2_benchmark/ros2_benchmark/basic_performance_calculator.py 中 conclude_performance() 內第 201 行附近的裁剪程式區塊開始,並沿用 utils/nvidia_smi_profiler.py 中已有的 len(metric_value_list) > 2 防護條件。使用樁化的 rclpy 加上一到兩次合成迭代,依序經過 calculate_performance() 與 conclude_performance() 重現問題;注意 test/benchmark_pol.py 使用 TIMELINE 模式,因此從不會執行此路徑。完成標準是 1、2、3 次迭代都能回報指標,而不拋出例外。回報者已表示願意提交 PR,開始前請先確認是否已有 PR。
由索引模型根據 Issue 內容生成。
描述
BasicPerformanceCalculator.conclude_performance() always drops the highest and the lowest value of each metric before averaging (ros2_benchmark/ros2_benchmark/basic_performance_calculator.py, around line 201):
# Remove the best and the worst before concluding the metric
metric_value_list.remove(max(metric_value_list))
metric_value_list.remove(min(metric_value_list))
With test_iterations: 1 or 2 there is nothing left after that, so the run fails at the very end, after all iterations have finished, and no results file is written:
test_iterations: 1->ValueError: min() arg is an empty sequencetest_iterations: 2->ZeroDivisionError: division by zero(for the mean metrics)test_iterations: 3and up work
This is hit in LOOPING (the default), SWEEPING and LIVE modes, which call conclude_performance() after the iteration loop in ros2_benchmark_test.py. TIMELINE mode does not call it, which is probably why test/benchmark_pol.py (TIMELINE, test_iterations=1) does not show it.
The resource side already handles this: utils/nvidia_smi_profiler.py only trims when len(metric_value_list) > 2.
To reproduce without ROS, load the module with a stub rclpy, feed one or two iterations of synthetic timestamps to calculate_performance(), then call conclude_performance():
1 FAIL ValueError min() arg is an empty sequence
2 FAIL ZeroDivisionError division by zero
3 ok 111.11
Expected: with one or two iterations, report the metrics over those iterations, same as the resource profiler does. Using the same > 2 guard here would fix it. I can open a small PR for that.
- 主要語言
- Python
- 星號
- 145
- 分支
- 18
- 平均合併
- 1 分鐘
- 30 天內合併 PR
- 1
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
NVIDIA-ISAAC-ROS/ros2_benchmark 的其他 Issue
-
難度 4/5 3-5 天 新手友好度 35/100
查看 NVIDIA-ISAAC-ROS/ros2_benchmark 的全部 Issue
相似的 Issue
-
hive size:simple
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
A new VOLTTRON_HOME starts with agent isolation mode on (string comparison of a boolean default)未關閉
難度 2/5 1-3 小時 新手友好度 68/100
-
難度 2/5 1-3 小時 新手友好度 70/100
painted-porch/marcus#977 ·
維護者通常 1 天內回覆
-
llm translation
難度 2/5 1-3 小時 新手友好度 82/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
FAIRmat-NFDI/sand#239 ·
維護者通常 1 天內回覆