Skip to content

fix(ci): install networkx in test images - #14771

Merged
furionw merged 2 commits into
ai-dynamo:mainfrom
bzsuni:fix/ci-test-networkx
Sep 14, 2026
Merged

furionw merged 2 commits into
ai-dynamo:mainfrom
bzsuni:fix/ci-test-networkx

Conversation

@bzsuni

@bzsuni bzsuni commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Overview:

Add networkx to container/deps/requirements.test.txt.

benchmarks/router/tests/test_common.py imports benchmarks.router.common, which eventually imports networkx. Pytest collects the test tree before marker filtering, so when networkx is missing, collection fails before the Triton and Planner CPU test selections can run.

This is the collection failure that became visible after #14760 fixed the PR workflow startup failure.

Details:

container/Dockerfile.test installs the shared test requirements used by these CPU test images. Adding networkx there keeps the router benchmark module collectable without changing production runtime dependencies.

#14671 takes a different approach by skipping this benchmark module when networkx is unavailable. This PR installs the test dependency instead.

Validation:

  • Router benchmark unit tests: 3 passed with networkx 3.6.1.
  • Fresh CI will validate Triton and Planner CPU collection.

Where should the reviewer start?

container/deps/requirements.test.txt

Related Issues

🚫 This PR is NOT linked to an issue:

  • Confirmed — no related issue

Summary by CodeRabbit

  • Tests
    • Added the networkx package as a test dependency for router benchmark coverage.

@copy-pr-bot

copy-pr-bot Bot commented Sep 13, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@bzsuni
bzsuni deployed to external_collaborator September 13, 2026 01:24 — with GitHub Actions Active
@bzsuni
bzsuni deployed to external_collaborator September 13, 2026 01:24 — with GitHub Actions Active
@github-actions github-actions Bot added the fix label Sep 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

👋 Hi bzsuni! Thank you for contributing to ai-dynamo/dynamo.

Just a reminder: The NVIDIA Test Github Validation CI runs an essential subset of the testing framework to quickly catch errors.Your PR reviewers may elect to test the changes comprehensively before approving your changes.

🚀

@github-actions github-actions Bot added external-contribution Pull request is from an external contributor container labels Sep 13, 2026

@nnshah1 nnshah1 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.

Approving — correct, minimal fix. This resolves the networkx collection error that fails every CPU test job: benchmarks/router/tests/test_common.py transitively imports networkx via benchmarks.router.common → prefix_data_generator.synthesizer, and it wasn't installed in the test image. Verified the whole chain against current main.

This unblocks the repo-wide CI failures alongside #14760 (the framework startup fix).

Nit (non-blocking): most neighbors in this file pin exact versions (nats-py==2.12.0, etc.); consider pinning networkx==X.Y.Z for reproducibility. Fine to land as-is given it's an urgent unblock.

The one red check here is lychee (Docs-link-check), which is a separate known-broken job unrelated to this change.

— Neelay + 🤖

@bzsuni
bzsuni marked this pull request as ready for review September 14, 2026 00:30
@bzsuni
bzsuni requested a review from a team as a code owner September 14, 2026 00:30
@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 36d73f88-24c9-48e9-9052-fde2c320561c

📥 Commits

Reviewing files that changed from the base of the PR and between 4a3943c and fb5b1d9.

📒 Files selected for processing (1)
  • container/deps/requirements.test.txt

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


Walkthrough

The test-only requirements add the unpinned networkx dependency for router benchmark tests that synthesize import graphs during whole-tree collection.

Changes

Router benchmark test dependency

Layer / File(s) Summary
Test dependency declaration
container/deps/requirements.test.txt
Adds unpinned networkx to the test-only dependency list.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to fb5b1

This test-only dependency enables router benchmark collection without changing production runtime dependencies; no concrete merge-blocking risk is evidenced.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description explains the change, technical cause, affected test images, validation results, reviewer starting point, and confirms that no related issue exists. It satisfies the required template s…
Title check ✅ Passed The title clearly and concisely describes the main change: installing networkx in test images through the test dependency requirements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

@biswapanda biswapanda 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.

lgtm. Thanks for fixing this issue.

@biswapanda

Copy link
Copy Markdown
Contributor

/ok to test fb5b1d9

Router benchmark tests import graph synthesis during pytest collection,
before marker filtering excludes unrelated tests. Lean CPU test images
lack networkx, so this import aborts collection in Triton and Planner jobs.

Declare networkx in the shared test requirements installed by
Dockerfile.test and development images. This keeps benchmark tests
collectable without skipping them and leaves production runtime
requirements unchanged.

Signed-off-by: bzsuni <bingzhe.sun@daocloud.io>
@bzsuni
bzsuni force-pushed the fix/ci-test-networkx branch from fb5b1d9 to 844e19e Compare September 14, 2026 08:15
@bzsuni
bzsuni deployed to external_collaborator September 14, 2026 08:15 — with GitHub Actions Active
@bzsuni
bzsuni deployed to external_collaborator September 14, 2026 15:05 — with GitHub Actions Active
@furionw

furionw commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

/ok to test 5b37619

This branch was successfully deployed

1 active deployment
external_collaborator — 5b37619f Deployed Sep 14, 2026 by bzsuni via ok-to-test #17922
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

container external-contribution Pull request is from an external contributor fix size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants