conclude_performance() crashes when test_iterations is 1 or 2
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 1/5
- Temps estimé
- Moins d'une heure
- Accessibilité débutants
- 78/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- python
- Domaine
- performance, testing-qa
Piste de recherche
Commence au bloc de rognage vers la ligne 201 de ros2_benchmark/ros2_benchmark/basic_performance_calculator.py dans conclude_performance(), et reprends la garde len(metric_value_list) > 2 déjà utilisée dans utils/nvidia_smi_profiler.py. Reproduis avec un rclpy factice et une ou deux itérations synthétiques passées par calculate_performance() puis conclude_performance(). Note que test/benchmark_pol.py utilise le mode TIMELINE et n'exerce donc jamais ce chemin. C'est terminé lorsque 1, 2 et 3 itérations remontent des métriques au lieu de lever une exception. Le rapporteur a proposé d'ouvrir une PR ; vérifie qu'il n'en existe pas déjà une avant de commencer.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Python
- Étoiles
- 145
- Forks
- 18
- Merge moyen
- 1 min
- PR mergées (30 j)
- 1
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de NVIDIA-ISAAC-ROS/ros2_benchmark
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
Toutes les issues de NVIDIA-ISAAC-ROS/ros2_benchmark
Issues similaires
-
hive size:simple
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
A new VOLTTRON_HOME starts with agent isolation mode on (string comparison of a boolean default)Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
painted-porch/marcus#977 ·
Les mainteneurs répondent en général sous 1 jour
-
llm translation
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
FAIRmat-NFDI/sand#239 ·
Les mainteneurs répondent en général sous 1 jour