Skip to content

test: extend fast cpu tests so tests default as cpu#556

Merged
begumcig merged 3 commits intomainfrom
test/extend-fast-cpu-tests-so-tests-default-as-cpu
Mar 3, 2026
Merged

test: extend fast cpu tests so tests default as cpu#556
begumcig merged 3 commits intomainfrom
test/extend-fast-cpu-tests-so-tests-default-as-cpu

Conversation

@gsprochette
Copy link
Collaborator

Description

This PR makes cpu the default for tests, instead of relying on the cpu mark.

  • replace the cpu filter in "fast-cpu-tests" by "not (cuda or distributed)"
  • also filter out the style tests which are done during linting
  • mark some tests as cuda and one cmmd test as slow

In total, 64 new tests will be enforced for PRs. Running those tests (and the cmmd one) took 62s on a H100 without parallelisation, the slowest one took 17s and was therefore marked as slow. Here is the pytest summary:

17.18s call tests/evaluation/test_cmmd.py::test_evaluation_agent_parameter_validation
6.49s call tests/evaluation/test_task.py::test_metric_initialization_from_metric_name[clipiqa]
2.93s call tests/evaluation/test_task.py::test_metric_initialization_from_metric_name[pairwise_clip_score]
2.88s call tests/evaluation/test_task.py::test_metric_initialization_from_metric_name[clip_score]
2.56s call tests/evaluation/test_task.py::test_metric_initialization_from_metric_name[cmmd]
2.16s call tests/evaluation/test_task.py::test_metric_initialization_from_metric_name[aesthetic_laion]
1.35s call tests/telemetry/test_metrics_integration.py::test_otlp_export_to_collector
1.30s call tests/evaluation/test_task.py::test_metric_initialization_from_metric_name[lpips]
1.21s call tests/evaluation/test_task.py::test_metric_initialization_from_metric_name[dino_score]
1.12s call tests/evaluation/test_task.py::test_metric_initialization_from_metric_name[inference_memory]
1.11s call tests/evaluation/test_task.py::test_metric_initialization_from_metric_name[arniqa]
1.07s call tests/evaluation/test_task.py::test_metric_initialization_from_metric_name[fid]
1.06s call tests/evaluation/test_task.py::test_metric_initialization_from_metric_name[total_macs]
1.02s call tests/telemetry/test_metrics_integration.py::test_otlp_export_errors_shown_at_info_level
1.02s call tests/telemetry/test_metrics_integration.py::test_otlp_export_errors_not_shown_at_critical_level
0.94s call tests/evaluation/test_task.py::test_metric_initialization_from_metric_name[sharpness]
0.92s call tests/evaluation/test_task.py::test_metric_initialization_from_metric_name[accuracy]
0.90s call tests/evaluation/test_task.py::test_metric_initialization_from_metric_name[energy_consumed]
0.89s call tests/evaluation/test_task.py::test_metric_initialization_from_metric_name[disk_memory]
0.89s call tests/evaluation/test_task.py::test_metric_initialization_from_metric_name[perplexity]
0.89s call tests/evaluation/test_task.py::test_metric_initialization_from_metric_name[co2_emissions]
0.88s call tests/evaluation/test_task.py::test_metric_initialization_from_metric_name[total_time]
0.88s call tests/evaluation/test_task.py::test_metric_initialization_from_metric_name[ssim]
0.88s call tests/evaluation/test_task.py::test_metric_initialization_from_metric_name[latency]
0.87s call tests/evaluation/test_task.py::test_metric_initialization_from_metric_name[training_memory]
0.87s call tests/evaluation/test_task.py::test_metric_initialization_from_metric_name[throughput]
0.86s call tests/evaluation/test_task.py::test_metric_initialization_from_metric_name[psnr]
0.86s call tests/evaluation/test_task.py::test_metric_initialization_from_metric_name[total_params]
0.86s call tests/evaluation/test_task.py::test_metric_initialization_from_metric_name[recall]
0.85s call tests/evaluation/test_task.py::test_metric_initialization_from_metric_name[precision]
0.85s call tests/evaluation/test_task.py::test_metric_initialization_from_metric_name[msssim]
0.44s call tests/evaluation/test_dino_score.py::test_dino_score
0.04s call tests/telemetry/test_metrics.py::test_set_opentelemetry_log_level
0.02s call tests/algorithms/test_compatibility_symmetry.py::test_compatibility_symmetry
0.01s call tests/evaluation/test_sharpness.py::test_sharpness_blurry_vs_sharp
0.01s setup tests/telemetry/test_metrics.py::test_basic_decorator

(159 durations < 0.005s hidden. Use -vv to show these durations.)
=== short test summary info ===
FAILED tests/algorithms/test_compatibility_symmetry.py::test_compatibility_symmetry - AssertionError: Found 84 asymmetric compatibility relationships:
=== 1 failed, 64 passed, 629 deselected, 17 warnings in 61.80s (0:01:01) ===

The failed one is fixed by #555

Related Issue

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Checked the set difference between before and after with: pytest -m "old_conditions and not new_conditions" and pytest -m "new_conditions and not new_conditions"

The 64 new tests are listed above, 3 tests were executed before and won't anymore. I would that they shouldn't run:

  • test_full_integration[TestRingAttn_flux_tiny_random-cpu]
  • Function test_full_integration[TestRingAttn_wan_tiny_random-cpu]
  • Function test_full_integration[TestUpscale_sd_tiny_random-cpu]

All new tests are passing except the compatibility one which is fixed by #555

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Additional Notes

@gsprochette gsprochette requested a review from begumcig February 25, 2026 17:43
Copy link
Member

@begumcig begumcig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!

@gsprochette gsprochette force-pushed the test/extend-fast-cpu-tests-so-tests-default-as-cpu branch from 43e688f to 8a1ec19 Compare March 2, 2026 17:16
@begumcig begumcig merged commit 67be52d into main Mar 3, 2026
7 checks passed
@begumcig begumcig deleted the test/extend-fast-cpu-tests-so-tests-default-as-cpu branch March 3, 2026 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants