[TAO-2319][Bugfix] Add class_name column to kpi_calc.csv output - #31
Conversation
kpi_analyze.py built final_kpi_df with class_name (line 88) but the to_csv column list at line 112 omitted it. kpi_calc.csv had one row per class with no label — callers had to rely on stdout PrettyTable order to identify rows, which is fragile and broke deft_verify.py KPI parsing. Signed-off-by: Arihant Jain <313131360+arihantj-nv@users.noreply.github.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Guards the fix: verifies class_name appears in the saved CSV and that values round-trip correctly. A third test documents the pre-fix column list to make the regression explicit. Signed-off-by: Arihant Jain <313131360+arihantj-nv@users.noreply.github.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
/build |
|
For security reasons, CI does not run automatically on NVIDIA's runners — it must be triggered per commit.
Tip Should this fix also ship in a release? Add a Important Before merging: every file needs a license header and every commit must be DCO signed-off — see the 📖 Contribution guide for details. |
…pts) The update-readme hook regenerated the README using untracked local files (example_per_image_analysis.py, kpi_analyze_per_image.py) that are not in the repo. CI doesn't have those files so the hook produced a different README and failed. Align committed README with what CI generates. Signed-off-by: Arihant Jain <313131360+arihantj-nv@users.noreply.github.com>
|
/build |
ddevendran-nvidia
left a comment
There was a problem hiding this comment.
Generally looks good, but would double-check details of Claude's work
|
/build |
The previous test restated the to_csv column list inside the test body, so it passed whether or not the fix was in place -- it exercised pandas, not kpi_analyze. Review flagged test_old_column_list_lacks_class_name as unnecessary; the same objection applies to the other two. Run analyze() end to end against a small KITTI fixture and assert on the kpi_calc.csv it actually writes. Nothing in the KPI path opens an image, so the fixture is two label files and a class mapping. Verified to fail with the fix at kpi_analyze.py:112 reverted. Also drops the io/StringIO indirection the review asked about -- the CSV is written to a real results_dir now, so there is nothing to explain. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Arihant Jain <313131360+arihantj-nv@users.noreply.github.com>
41139cc to
45efa90
Compare
|
/build |
|
Hi @arihantj-nv 👋💛 🤖✨ AIRE (NVIDIA's automated CI agent) here! ✨🤖 🔍🚨 I detected that the CI pipeline on your PR #31 has failed — but no worries, I'm already on it! 💪🔧 🛠️🔬 I'm automatically diagnosing the root cause right now and preparing a fix for you. ⏳✅ 🔔💬 I'll ping you the moment the fix is ready to review — nothing you need to do for now. Sit back and relax! 🌿😌 💙🙏 Thanks for your patience — AIRE's got your back! 🚀🌟 |
Summary
kpi_analyze.pybuiltfinal_kpi_dfwithclass_name(line 88) but theto_csvcolumn list at line 112 omitted itkpi_calc.csvhad one unlabeled row per class — callers had to rely on stdout PrettyTable order to identify rows, breakingdeft_verify.pyKPI parsing"class_name"to the column list (one-liner)Test plan
test_class_name_in_csv_columns— class_name present in saved CSVtest_class_name_values_preserved— values round-trip correctlytest_old_column_list_lacks_class_name— documents the regression🤖 Generated with Claude Code