Skip to content

Improve test suite performance - #434

Merged
tmigot merged 6 commits into
mainfrom
improve-tests-perf
Jun 19, 2026
Merged

Improve test suite performance#434
tmigot merged 6 commits into
mainfrom
improve-tests-perf

Conversation

@tmigot

@tmigot tmigot commented Jun 19, 2026

Copy link
Copy Markdown
Member

Summary

  • P-TEST-1: Merge NLS residual checks into test_one_problem — NLS problems were constructed 3× at default n; now constructed once as ADNLPModel (in Pass 1) and once as ADNLSModel (in the NLS branch), eliminating the separate pmap over nls_name_list
  • P-TEST-3: Gate probe_missing diagnostic blocks behind JULIA_TEST_DEBUG=1 — they serialised ~400 symbols to every worker on every CI run but made no assertion
  • P-TEST-4: Parallelise the adjusted-dimension warning loop with pmap — the ~100-problem sequential for loop now runs on the worker pool via check_adjusted_dim_warning
  • P-TEST-6: Reduce @testset node count — test_one_problem's 3–4 sibling testsets collapsed into one @testset "$pb"; test_in_place_residual's two testsets merged into one @testset "NLS $prob"
  • P-TEST-7: Fold adjusted-dimension warning checks into test_scalable — the separate pmap over scalable problems for warning checks is eliminated; each scalable item now carries a warn_checks field and the worker handles both the scalability and the warning assertions in one pass
  • Bonus: Replace remaining Module.eval(Symbol(...)) calls in meta_sanity_check, test_in_place_constraints, and test-scalable.jl with getfield; remove dead nvar/ncon assignments in test_compatibility and test_multi_precision

Test plan

  • CI passes on improve-tests-perf
  • No regressions in test-defined-problems, test-scalable, test-in-place-residual, test-utils

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings June 19, 2026 18:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR focuses on speeding up the OptimizationProblems.jl test suite by reducing repeated model construction, cutting down the number of testset nodes, removing unnecessary distributed work in normal CI runs, and replacing dynamic eval-based lookups with getfield.

Changes:

  • Replace multiple Module.eval(Symbol(...)) / eval(Meta.parse(...)) usages in tests with getfield-based lookups to avoid dynamic evaluation overhead.
  • Fold NLS residual checks into test_one_problem and remove the separate pmap over NLS problems.
  • Gate diagnostic “probe_missing” distributed logging behind JULIA_TEST_DEBUG=1 and move adjusted-dimension warning checks into the scalable test pass.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/test-utils.jl Replaces dynamic eval calls with getfield and removes unused dimension variables from tests.
test/test-scalable.jl Extends scalable tests to also assert adjusted-dimension warnings, eliminating a separate warning-check pass.
test/test-in-place-residual.jl Merges previously separate NLS testsets and exports nls_name_list to workers for use inside test_one_problem.
test/test-defined-problems.jl Gates distributed “missing symbol probe” diagnostics behind JULIA_TEST_DEBUG=1 to avoid CI overhead.
test/runtests.jl Collapses per-problem sub-testsets into one and runs NLS checks inline per problem instead of via a separate pmap.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tmigot
tmigot merged commit 2448482 into main Jun 19, 2026
16 checks passed
@tmigot
tmigot deleted the improve-tests-perf branch June 19, 2026 19:52
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