conclude_performance() crashes when test_iterations is 1 or 2
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 1/5
- Tempo estimado
- Menos de uma hora
- Facilidade para iniciantes
- 78/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- python
- Domínio
- performance, testing-qa
Direção de pesquisa
Comece no bloco de corte perto da linha 201 de ros2_benchmark/ros2_benchmark/basic_performance_calculator.py em conclude_performance() e espelhe a guarda len(metric_value_list) > 2 já usada em utils/nvidia_smi_profiler.py. Reproduza com um rclpy substituído (stub) e uma ou duas iterações sintéticas passando por calculate_performance() e depois por conclude_performance(). Observe que test/benchmark_pol.py usa o modo TIMELINE e, por isso, nunca exercita este caminho. Está concluído quando 1, 2 e 3 iterações reportam métricas em vez de lançar uma exceção. O relator se ofereceu para abrir um PR; verifique se já existe um antes de começar.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Python
- Estrelas
- 145
- Forks
- 18
- Merge médio
- 1min
- PRs com merge (30d)
- 1
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de NVIDIA-ISAAC-ROS/ros2_benchmark
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
Todas as issues de NVIDIA-ISAAC-ROS/ros2_benchmark
Issues semelhantes
-
hive size:simple
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
A new VOLTTRON_HOME starts with agent isolation mode on (string comparison of a boolean default)Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
painted-porch/marcus#977 ·
Mantenedores costumam responder em até 1 dia
-
llm translation
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
FAIRmat-NFDI/sand#239 ·
Mantenedores costumam responder em até 1 dia