Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
08ede7b to
6242982
Compare
6242982 to
006a537
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@tests/conftest.py`:
- Around line 188-224: The fixture nccl_tr's stdout_content is missing the
required marker that NCCLTestDefinition.was_run_successful() checks for; insert
the line "# Out of bounds values : 0 OK" into the multi-line stdout_content
(near where "# Avg bus bandwidth" is written) so was_run_successful() will
return True, and consider renaming one of the duplicate nccl_tr fixtures to
avoid confusion between the one in tests/conftest.py and the one in
tests/test_single_sbatch_runner.py.
Greptile OverviewGreptile SummaryThis PR successfully reorganizes the test suite to mirror the main source structure, creating a clearer, more maintainable test organization. Tests are now organized hierarchically by system type ( Key Changes:
Structure: The refactoring is purely structural with no logic changes, improving test discoverability and maintainability. Confidence Score: 5/5
Important Files Changed
Last reviewed commit: b95ecf7 |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
tests/workloads/nccl_test/test_performance_report_gen_strategy.py (1)
45-53:⚠️ Potential issue | 🟡 MinorRemove explicit assertion messages to let pytest introspection work.
Use plain asserts; the messages add noise and are discouraged in this repo.As per coding guidelines, "In pytest, rely on assertion introspection for failure details and avoid including explicit values in the assertion message (e.g., avoid f\"expected {x!r}, got {y!r}\"). Let pytest show actual vs expected. You may add concise context messages only when the assertion is not easily understandable from the expression alone."Suggested update
- assert csv_report_path.is_file(), "CSV report was not generated." + assert csv_report_path.is_file() - assert not df.empty, "CSV report is empty." + assert not df.empty - assert df["Size (B)"].dtype == int, "Size (B) is not an integer." - assert df["Time (us) Out-of-place"].dtype == float, "Time (us) Out-of-place is not a float." - assert df["Time (us) In-place"].dtype == float, "Time (us) In-place is not a float." + assert df["Size (B)"].dtype == int + assert df["Time (us) Out-of-place"].dtype == float + assert df["Time (us) In-place"].dtype == float - assert df["GPU Type"].iloc[0] == "H100", "GPU Type was not extracted correctly." - assert df["Devices per Node"].iloc[0] == 8, "Devices per Node is incorrect." - assert df["Ranks"].iloc[0] == 16, "Ranks is incorrect." + assert df["GPU Type"].iloc[0] == "H100" + assert df["Devices per Node"].iloc[0] == 8 + assert df["Ranks"].iloc[0] == 16 - assert gpu_type == expected_type, f"Failed to parse GPU type for {gpu_line}" + assert gpu_type == expected_typeAlso applies to: 70-72, 97-97
Summary
Tests structure now reflects the main sources folder structure with granular distribution:
tests/systems/<system name>tests/workloads/<workload name>Test Plan
Unit tests are sufficient
Additional Notes