conclude_performance() crashes when test_iterations is 1 or 2
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Idoneità per principianti
- 78/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- python
- Ambito
- performance, testing-qa
Direzione di ricerca
Inizia dal blocco di trimming intorno alla riga 201 di ros2_benchmark/ros2_benchmark/basic_performance_calculator.py in conclude_performance(), e replica la guardia len(metric_value_list) > 2 già usata in utils/nvidia_smi_profiler.py. Riproduci il problema con un rclpy stubbato e una o due iterazioni sintetiche che passino da calculate_performance() e poi da conclude_performance(). Nota che test/benchmark_pol.py usa la modalità TIMELINE e quindi non esegue mai questo percorso. Il lavoro è completo quando 1, 2 e 3 iterazioni riportano metriche invece di sollevare un'eccezione. Chi ha segnalato il problema si è offerto di aprire una PR; controlla se ne esiste già una prima di iniziare.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 145
- Fork
- 18
- Merge medio
- 1m
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di NVIDIA-ISAAC-ROS/ros2_benchmark
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
Tutte le issue di NVIDIA-ISAAC-ROS/ros2_benchmark
Issue simili
-
hive size:simple
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
A new VOLTTRON_HOME starts with agent isolation mode on (string comparison of a boolean default)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
painted-porch/marcus#977 ·
I maintainer di solito rispondono entro 1 giorno
-
llm translation
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
FAIRmat-NFDI/sand#239 ·
I maintainer di solito rispondono entro 1 giorno