conclude_performance() crashes when test_iterations is 1 or 2
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- Menos de una hora
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- performance, testing-qa
Línea de trabajo
Empieza en el bloque de recorte alrededor de la línea 201 de ros2_benchmark/ros2_benchmark/basic_performance_calculator.py en conclude_performance(), y replica la guarda len(metric_value_list) > 2 que ya se usa en utils/nvidia_smi_profiler.py. Reproduce el problema con un rclpy simulado y una o dos iteraciones sintéticas que pasen por calculate_performance() y luego por conclude_performance(). Ten en cuenta que test/benchmark_pol.py usa el modo TIMELINE y por eso nunca ejercita esta ruta. Se considera terminado cuando 1, 2 y 3 iteraciones reportan métricas en lugar de lanzar una excepción. El reportero se ofreció a abrir un PR; revisa si ya existe uno antes de empezar.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 145
- Forks
- 18
- Merge medio
- 1 min
- PR fusionados (30 d)
- 1
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de NVIDIA-ISAAC-ROS/ros2_benchmark
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Todos los issues de NVIDIA-ISAAC-ROS/ros2_benchmark
Issues similares
-
hive size:simple
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
A new VOLTTRON_HOME starts with agent isolation mode on (string comparison of a boolean default)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
painted-porch/marcus#977 ·
Los mantenedores suelen responder en 1 día
-
llm translation
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
FAIRmat-NFDI/sand#239 ·
Los mantenedores suelen responder en 1 día