Skip to content

ci(test): enable pytest-xdist for cuopt Python tests#1486

Draft
ramakrishnap-nv wants to merge 1 commit into
mainfrom
feat/pytest-xdist-python-tests
Draft

ci(test): enable pytest-xdist for cuopt Python tests#1486
ramakrishnap-nv wants to merge 1 commit into
mainfrom
feat/pytest-xdist-python-tests

Conversation

@ramakrishnap-nv

Copy link
Copy Markdown
Collaborator

Summary

  • Add pytest-xdist to test_python_common dependencies (propagated to conda envs and pyproject.toml files via dependency file generator)
  • Pass -n auto to the non-nightly cuopt pytest invocation in ci/run_cuopt_pytests.sh
  • Server tests (run_cuopt_server_pytests.sh) are unchanged — they bind a fixed port (localhost:18900) that would conflict across parallel workers

The script already cds into python/cuopt/cuopt where xdist + coverage is known to work (noted in the existing comment on line 7).

Test plan

  • CI conda-python-tests job shows parallel test workers in the log
  • Test results and coverage report are complete (no missing tests)
  • conda-python-tests wall time is reduced compared to baseline
  • Server tests are unaffected

🤖 Generated with Claude Code

Add pytest-xdist to test_python_common dependencies and pass -n auto
to the non-nightly cuopt pytest invocation to parallelize tests across
available CPUs. Server tests are excluded due to fixed-port binding
(localhost:18900). The run_cuopt_pytests.sh script already cd-s into
python/cuopt/cuopt where xdist+coverage is known to work.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Ramakrishna Prabhu <ramakrishnap@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Jun 26, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@ramakrishnap-nv ramakrishnap-nv self-assigned this Jun 29, 2026
@ramakrishnap-nv ramakrishnap-nv added non-breaking Introduces a non-breaking change improvement Improves an existing functionality labels Jun 29, 2026
@ramakrishnap-nv

Copy link
Copy Markdown
Collaborator Author

/ok to test eb9a30f

@github-actions

Copy link
Copy Markdown

CI Test Summary

8 failed · 23 passed · 0 skipped

conda-python-tests / 12.9.2, 3.14, amd64, ubuntu22.04, h100, latest-driver, latest-deps — 2 failed tests
  • tests/linear_programming/test_incumbent_callbacks.py::test_incumbent_get_set_callback[/mip/swath1.mps]
  • tests/linear_programming/test_cpu_only_execution.py::TestCPUOnlyExecution::test_warmstart_cpu_only
conda-python-tests / 12.2.2, 3.11, amd64, rockylinux8, l4, earliest-driver, oldest-deps — 1 failed test
  • tests/linear_programming/test_cpu_only_execution.py::TestCPUOnlyExecution::test_warmstart_cpu_only
conda-python-tests / 13.3.0, 3.13, amd64, ubuntu26.04, rtxpro6000, latest-driver, latest-deps — 1 failed test
  • tests/linear_programming/test_python_API.py::test_incumbent_get_set_solutions
conda-python-tests / 12.2.2, 3.12, amd64, ubuntu22.04, l4, latest-driver, latest-deps — 1 failed test
  • tests/linear_programming/test_cpu_only_execution.py::TestCPUOnlyExecution::test_warmstart_cpu_only
wheel-tests-cuopt / 12.9.2, 3.11, amd64, ubuntu22.04, l4, latest-driver, oldest-deps — 24 failed tests
  • tests/linear_programming/test_incumbent_callbacks.py::test_incumbent_get_set_callback[/mip/swath1.mps]
  • tests/routing/test_initial_solutions.py::test_initial_solutions[TestOption.SKIP_DEPOTS]
  • tests/linear_programming/test_lp_solver.py::test_heuristics_only
  • tests/routing/test_solver_settings.py::test_dump_config
  • tests/routing/test_solver.py::test_min_vehicles_respected[vehicle_fixed_costs1]
  • tests/routing/test_solver_settings.py::test_verbose_mode
  • tests/routing/test_vehicle_properties.py::test_vehicle_max_costs
  • tests/routing/test_vehicle_properties.py::test_vehicle_types
  • tests/routing/test_solver_settings.py::test_dump_results
  • tests/routing/test_vehicle_properties.py::test_single_vehicle_with_match
  • tests/routing/test_vehicle_properties.py::test_order_to_vehicle_match
  • tests/routing/test_vehicle_properties.py::test_time_windows
  • tests/routing/test_re_routing.py::test_re_routing
  • tests/routing/test_vehicle_properties.py::test_vehicle_dependent_service_times
  • tests/routing/test_initial_solutions.py::test_initial_solutions[TestOption.PDP]
  • tests/routing/test_solver.py::test_min_vehicles_respected[vehicle_fixed_costs0]
  • tests/socp/test_socp.py::test_socp_3_barrier_solution
  • tests/routing/test_vehicle_properties.py::test_vehicle_fixed_costs
  • tests/routing/test_vehicle_properties.py::test_heterogenous_breaks
  • tests/routing/test_vehicle_properties.py::test_empty_routes_with_breaks
  • tests/routing/test_vehicle_properties.py::test_vehicle_max_times
  • tests/routing/test_solver.py::test_pdptw
  • tests/routing/test_initial_solutions.py::test_initial_solutions[TestOption.BREAKS]
  • tests/routing/test_vehicle_properties.py::test_vehicle_to_order_match
wheel-tests-cuopt / 12.2.2, 3.11, arm64, ubuntu22.04, a100, latest-driver, latest-deps — 2 failed tests
  • tests/linear_programming/test_python_API.py::test_model
  • tests/linear_programming/test_cpu_only_execution.py::TestCuoptCliCPUOnly::test_cli_mip_remote
wheel-tests-cuopt / 13.3.0, 3.14, arm64, ubuntu26.04, l4, latest-driver, latest-deps — 19 failed tests
  • tests/linear_programming/test_incumbent_callbacks.py::test_incumbent_get_set_callback[/mip/neos5-free-bound.mps]
  • tests/linear_programming/test_incumbent_callbacks.py::test_incumbent_get_set_callback[/mip/swath1.mps]
  • tests/linear_programming/test_lp_solver.py::test_heuristics_only
  • tests/routing/test_initial_solutions.py::test_initial_solutions[TestOption.SKIP_DEPOTS]
  • tests/routing/test_solver.py::test_min_vehicles_respected[vehicle_fixed_costs1]
  • tests/routing/test_data_model.py::test_order_constraints
  • tests/routing/test_initial_solutions.py::test_initial_solutions[TestOption.BREAKS]
  • tests/routing/test_initial_solutions.py::test_initial_solutions[TestOption.VRP]
  • tests/routing/test_solver_settings.py::test_dump_results
  • tests/routing/test_solver.py::test_solomon
  • tests/routing/test_re_routing.py::test_re_routing
  • tests/routing/test_vehicle_properties.py::test_time_windows
  • tests/routing/test_vehicle_properties.py::test_vehicle_max_times
  • tests/routing/test_initial_solutions.py::test_initial_solutions[TestOption.PDP]
  • tests/routing/test_vehicle_properties.py::test_vehicle_types
  • tests/routing/test_vehicle_properties.py::test_vehicle_locations
  • tests/routing/test_vehicle_properties.py::test_single_vehicle_with_match
  • tests/routing/test_solver.py::test_min_vehicles_respected[vehicle_fixed_costs0]
  • tests/routing/test_vehicle_properties.py::test_empty_routes_with_breaks
wheel-tests-cuopt / 13.0.3, 3.12, arm64, rockylinux8, l4, latest-driver, latest-deps — 11 failed tests
  • tests/linear_programming/test_lp_solver.py::test_heuristics_only
  • tests/linear_programming/test_incumbent_callbacks.py::test_incumbent_get_set_callback[/mip/swath1.mps]
  • tests/routing/test_initial_solutions.py::test_initial_solutions[TestOption.SKIP_DEPOTS]
  • tests/routing/test_vehicle_properties.py::test_vehicle_max_times
  • tests/routing/test_initial_solutions.py::test_initial_solutions[TestOption.PDP]
  • tests/routing/test_vehicle_properties.py::test_vehicle_types
  • tests/routing/test_vehicle_properties.py::test_heterogenous_breaks
  • tests/routing/test_re_routing.py::test_re_routing
  • tests/routing/test_vehicle_properties.py::test_time_windows
  • tests/routing/test_vehicle_properties.py::test_empty_routes_with_breaks
  • tests/routing/test_vehicle_properties.py::test_vehicle_dependent_service_times

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant