ci: parallelize ng_test_all in-process (+max_concurrency)#1596
Closed
wprazuch wants to merge 22 commits into
Closed
ci: parallelize ng_test_all in-process (+max_concurrency)#1596wprazuch wants to merge 22 commits into
wprazuch wants to merge 22 commits into
Conversation
Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
Contributor
Author
|
Measured speedup (real CI, full 114-module suite, same
2.0× faster (−50%), and the concurrent run is green — no flakiness introduced at concurrency=4 on the real suite. This is on a 2-core runner (overlapping I/O-bound venv builds); a larger |
Contributor
Author
|
Concurrency sweep (full suite,
4 already saturates the 2-core runner, so 8 is the same speed — but it's green (no memory pressure) and gives headroom to scale once |
Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
wprazuch
marked this pull request as draft
June 16, 2026 11:16
Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
wprazuch
added a commit
that referenced
this pull request
Jun 17, 2026
Ports #1596 onto the unified gym CLI (#1434). Adds +max_concurrency to ng_test_all: each module still runs in its own isolated subprocess/venv, but up to N run concurrently via a ThreadPoolExecutor, so local ng_test_all and CI both speed up (no matrix sharding). run_command gains an additive capture= param so concurrent module output is collected and printed atomically. Workflow runs on ${{ vars.TEST_RUNNER || 'ubuntu-latest' }} with TEST_CONCURRENCY (default 8). Targets martas/1434. Signed-off-by: Wojciech Prazuch <wprazuch@nvidia.com>
wprazuch
force-pushed
the
wprazuch/ng-test-concurrency
branch
from
June 17, 2026 08:53
a427748 to
8e8b6df
Compare
Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
…nt deprecation note Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
… to stderr) Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
…a single --model flag Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
Ports #1596 onto the unified gym CLI (#1434). Adds +max_concurrency to ng_test_all: each module still runs in its own isolated subprocess/venv, but up to N run concurrently via a ThreadPoolExecutor, so local ng_test_all and CI both speed up (no matrix sharding). run_command gains an additive capture= param so concurrent module output is collected and printed atomically. Workflow runs on ${{ vars.TEST_RUNNER || 'ubuntu-latest' }} with TEST_CONCURRENCY (default 8). Targets martas/1434. Signed-off-by: Wojciech Prazuch <wprazuch@nvidia.com>
Shared CI fixes for the martas/1434-stacked CLI work: pin uv (0.11.20 drops pinned deps -> 7 servers fail; = #1576) and pull main's graphwalks example_rollouts.jsonl (fixes its data validation). This branch is the base for the ng_validate (#1599) and config-error (#1609) PRs so the fixes live in one place. Drop when martas/1434 rebases on main. Signed-off-by: Wojciech Prazuch <wprazuch@nvidia.com>
wprazuch
added a commit
that referenced
this pull request
Jun 22, 2026
Ports #1596 onto the unified gym CLI (#1434). Adds +max_concurrency to ng_test_all: each module still runs in its own isolated subprocess/venv, but up to N run concurrently via a ThreadPoolExecutor, so local ng_test_all and CI both speed up (no matrix sharding). run_command gains an additive capture= param so concurrent module output is collected and printed atomically. Workflow runs on ${{ vars.TEST_RUNNER || 'ubuntu-latest' }} with TEST_CONCURRENCY (default 8). Targets martas/1434. Signed-off-by: Wojciech Prazuch <wprazuch@nvidia.com>
wprazuch
force-pushed
the
wprazuch/ng-test-concurrency
branch
from
June 22, 2026 13:45
2fdee46 to
eebfcf8
Compare
wprazuch
added a commit
that referenced
this pull request
Jun 22, 2026
Ports #1596 onto the unified gym CLI (#1434). Adds +max_concurrency to ng_test_all: each module still runs in its own isolated subprocess/venv, but up to N run concurrently via a ThreadPoolExecutor, so local ng_test_all and CI both speed up (no matrix sharding). run_command gains an additive capture= param so concurrent module output is collected and printed atomically. Workflow runs on ${{ vars.TEST_RUNNER || 'ubuntu-latest' }} with TEST_CONCURRENCY (default 8). Targets martas/1434. Signed-off-by: Wojciech Prazuch <wprazuch@nvidia.com>
wprazuch
added a commit
that referenced
this pull request
Jun 22, 2026
Ports #1596 onto the unified gym CLI (#1434). Adds +max_concurrency to ng_test_all: each module still runs in its own isolated subprocess/venv, but up to N run concurrently via a ThreadPoolExecutor, so local ng_test_all and CI both speed up (no matrix sharding). run_command gains an additive capture= param so concurrent module output is collected and printed atomically. Workflow runs on ${{ vars.TEST_RUNNER || 'ubuntu-latest' }} with TEST_CONCURRENCY (default 8). Targets martas/1434. Signed-off-by: Wojciech Prazuch <wprazuch@nvidia.com>
wprazuch
added a commit
that referenced
this pull request
Jun 22, 2026
Ports #1596 onto the unified gym CLI (#1434). Adds +max_concurrency to ng_test_all: each module still runs in its own isolated subprocess/venv, but up to N run concurrently via a ThreadPoolExecutor, so local ng_test_all and CI both speed up (no matrix sharding). run_command gains an additive capture= param so concurrent module output is collected and printed atomically. Workflow runs on ${{ vars.TEST_RUNNER || 'ubuntu-latest' }} with TEST_CONCURRENCY (default 8). Targets martas/1434. Signed-off-by: Wojciech Prazuch <wprazuch@nvidia.com>
wprazuch
added a commit
that referenced
this pull request
Jun 22, 2026
Ports #1596 onto the unified gym CLI (#1434). Adds +max_concurrency to ng_test_all: each module still runs in its own isolated subprocess/venv, but up to N run concurrently via a ThreadPoolExecutor, so local ng_test_all and CI both speed up (no matrix sharding). run_command gains an additive capture= param so concurrent module output is collected and printed atomically. Workflow runs on ${{ vars.TEST_RUNNER || 'ubuntu-latest' }} with TEST_CONCURRENCY (default 8). Targets martas/1434. Signed-off-by: Wojciech Prazuch <wprazuch@nvidia.com>
wprazuch
added a commit
that referenced
this pull request
Jun 22, 2026
Ports #1596 onto the unified gym CLI (#1434). Adds +max_concurrency to ng_test_all: each module still runs in its own isolated subprocess/venv, but up to N run concurrently via a ThreadPoolExecutor, so local ng_test_all and CI both speed up (no matrix sharding). run_command gains an additive capture= param so concurrent module output is collected and printed atomically. Workflow runs on ${{ vars.TEST_RUNNER || 'ubuntu-latest' }} with TEST_CONCURRENCY (default 8). Targets martas/1434. Signed-off-by: Wojciech Prazuch <wprazuch@nvidia.com>
wprazuch
added a commit
that referenced
this pull request
Jun 22, 2026
Ports #1596 onto the unified gym CLI (#1434). Adds +max_concurrency to ng_test_all: each module still runs in its own isolated subprocess/venv, but up to N run concurrently via a ThreadPoolExecutor, so local ng_test_all and CI both speed up (no matrix sharding). run_command gains an additive capture= param so concurrent module output is collected and printed atomically. Workflow runs on ${{ vars.TEST_RUNNER || 'ubuntu-latest' }} with TEST_CONCURRENCY (default 8). Targets martas/1434. Signed-off-by: Wojciech Prazuch <wprazuch@nvidia.com>
wprazuch
added a commit
that referenced
this pull request
Jun 22, 2026
Ports #1596 onto the unified gym CLI (#1434). Adds +max_concurrency to ng_test_all: each module still runs in its own isolated subprocess/venv, but up to N run concurrently via a ThreadPoolExecutor, so local ng_test_all and CI both speed up (no matrix sharding). run_command gains an additive capture= param so concurrent module output is collected and printed atomically. Workflow runs on ${{ vars.TEST_RUNNER || 'ubuntu-latest' }} with TEST_CONCURRENCY (default 8). Targets martas/1434. Signed-off-by: Wojciech Prazuch <wprazuch@nvidia.com>
wprazuch
added a commit
that referenced
this pull request
Jun 22, 2026
Ports #1596 onto the unified gym CLI (#1434). Adds +max_concurrency to ng_test_all: each module still runs in its own isolated subprocess/venv, but up to N run concurrently via a ThreadPoolExecutor, so local ng_test_all and CI both speed up (no matrix sharding). run_command gains an additive capture= param so concurrent module output is collected and printed atomically. Workflow runs on ${{ vars.TEST_RUNNER || 'ubuntu-latest' }} with TEST_CONCURRENCY (default 8). Targets martas/1434. Signed-off-by: Wojciech Prazuch <wprazuch@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
+max_concurrency=Ntong_test_all(gym env test): each module still runs in its own isolated subprocess/venv, but up to N run concurrently via aThreadPoolExecutor. Benefits both localng_test_alland CI (no matrix sharding).run_commandgains an additivecapture=param so concurrent module output is collected and printed atomically instead of interleaving.Targets
martas/1434Ported onto the unified-CLI epic (#1434): the concurrency machinery (
_ModuleTestResult,_run_module_tests,_run_module_tests_all) lives incli/env.py(wheretest_allnow resides). Sequential (max_concurrency=1) behaviour is unchanged.CI
Workflow runs on
${{ vars.TEST_RUNNER || 'ubuntu-latest' }}and passes+max_concurrency=${TEST_CONCURRENCY}(TEST_CONCURRENCYrepo var, default 8) — scale the runner/concurrency with no code change.Tests
TestRunModuleTestsAll(sequential order; concurrent runs each module once; real overlap) +test_capture_pipes_combined_output. 115/115test_cli+test_cli_setup_command+test_cli_mainpass; ruff + pre-commit clean.Supersedes the earlier matrix-sharding approach (#1577).