Skip to content

build: move Python AIConfigurator onto the published aisimulate 0.1.0.dev2 wheel - #13721

Closed
thaihuynhxyz wants to merge 5 commits into
ai-dynamo:mainfrom
thaihuynhxyz:build/aic-core-published-0.11.0
Closed

thaihuynhxyz wants to merge 5 commits into
ai-dynamo:mainfrom
thaihuynhxyz:build/aic-core-published-0.11.0

Conversation

@thaihuynhxyz

@thaihuynhxyz thaihuynhxyz commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Overview:

main pins the 2026-07-28 AIConfigurator pre-release, 0.11.0.dev20260728, at
five Python declaration sites. AIConfigurator has since been folded into
aisimulate: the published aisimulate wheel vendors both aiconfigurator and
aiconfigurator_core and declares no AIConfigurator dependency of its own.

This moves the Python side onto aisimulate==0.1.0.dev2 and drops the five
standalone AIConfigurator pins, which that single wheel now supplies.

Why the original approach was wrong

The first version of this PR pinned aiconfigurator==0.11.0. That is
unsatisfiable. aisimulate is a hard dependency of ai-dynamo, and the
published 0.1.0.dev1 wheel requires exactly aiconfigurator==0.11.0.dev20260728.
The planner image resolves requirements.planner.txt with no AIConfigurator
override, so pinning 0.11.0 breaks the image build. The review bot flagged
this correctly.

This also unblocks ai-dynamo[trtllm]

main cannot currently resolve ai-dynamo[trtllm] on Python 3.11–3.13.
Resolved with uv pip compile for x86_64-unknown-linux-gnu, Python 3.12:

requirements result
aisimulate==0.1.0.dev1 + tensorrt-llm==1.3.0rc24 unresolvable: the vendored AIConfigurator requires numpy>=1.26.4,<1.27, TensorRT-LLM requires numpy>=2.0,<2.4
aisimulate==0.1.0.dev2 + tensorrt-llm==1.3.0rc24 resolves at numpy==2.3.5

0.1.0.dev2 requires numpy>=2.1,<3, which intersects TensorRT-LLM's range.

Details:

Python dependency sites

  • pyproject.toml — bump the core aisimulate pin to 0.1.0.dev2 and narrow
    its marker to python_version >= '3.11' and python_version < '3.14', matching
    the wheel's requires_python of >=3.11,<3.14. Without the lower bound a
    3.10 resolve fails on missing wheels instead of skipping the dependency.
  • pyproject.toml — remove the mocker extra. It held only
    aiconfigurator-core, which the core aisimulate dependency now provides, so
    the extra installs nothing.
  • pyproject.toml — remove the two [tool.uv] conflicts entries that existed
    solely to keep the mocker extra away from trtllm and vllm over NumPy.
  • benchmarks/pyproject.toml, container/deps/requirements.planner.txt,
    container/deps/requirements.frontend.txt — drop the standalone
    aiconfigurator / aiconfigurator-core pins. The planner file keeps its
    plotext<6 pin, which stays correct: aisimulate requires
    plotext>=5.3.2,<6 itself, so the two agree.
  • container/deps/requirements.aisimulate.txt — bump the staged wheel to
    0.1.0.dev2.

Rust

  • Cargo.toml — bump aisimulate-core to =0.1.0-dev.2 so the crate matches
    the wheel. tests/dependencies/test_aisimulate_consistency.py enforces that
    equality.
  • The three lockfiles are regenerated, not hand-edited. 0.1.0-dev.2 pulls in
    parquet 55 (with thrift, snap, zstd, integer-encoding, twox-hash,
    seq-macro), plus pep440_rs, quick_cache and unscanny. Root gains 12
    packages, lib/bindings/kvbm 15, and lib/bindings/python 3 — the last one
    only needs pep440_rs, quick_cache and unscanny because it already had
    the rest.

The lockfile diff is purely additive — no package is removed from any of the
three locks. Each was regenerated by cargo update -p aisimulate-core --precise 0.1.0-dev.2 on Linux under the toolchain pinned in rust-toolchain.toml, and
cargo metadata --locked passes in all three workspaces.

Tests and docs

  • tests/dependencies/test_aiconfigurator_consistency.py is rewritten. It used
    to assert that nine AIConfigurator pins agreed with each other; seven of those
    sites no longer exist. It now asserts that no standalone pin remains and that
    aiconfigurator and aiconfigurator_core import from the aisimulate wheel.
  • lib/bindings/python/src/dynamo/_internal/aic.py,
    lib/bindings/python/tests/test_aic_capacity.py,
    tests/wheels/smoke_install.py, benchmarks/mocker/README.md — updated for
    the removed extra.

Known gap for maintainers to rule on: Python 3.10

aisimulate 0.1.0.dev2 dropped Python 3.10 (requires_python: >=3.11,<3.14),
while this project still declares 3.10 supported in three places:
requires-python = ">=3.10", a Programming Language :: Python :: 3.10
classifier, and an abi3 cp310 ai-dynamo-runtime wheel.

Python before after
3.10 AIConfigurator via the core aisimulate 0.1.0.dev1 dependency no AIConfigurator available
3.11–3.12 via the core dependency; the mocker extra added nothing via the core dependency
3.13 the core marker excluded aisimulate, so the mocker extra was the only source via the core dependency

So 3.13 improves and 3.10 regresses. On 3.10 the mocker and replay backends now
raise from dynamo._internal.aic.estimate_num_gpu_blocks; that error message is
updated to name the supported 3.11–3.13 window rather than point at an extra
that no longer exists. CI is unaffected: the matrix runs 3.11, 3.12 and 3.13,
and test_mocker_extra_install_clean_room uses sys.executable.

Deliberately not resolved here. Raising requires-python to >=3.11 and
dropping the 3.10 classifier is a support-policy decision, not a build fix.
Happy to fold it into this PR if maintainers prefer.

Where should the reviewer start?

  1. pyproject.toml — the core pin, its marker, and the removed mocker extra.
    This is the whole change in miniature.
  2. Cargo.toml — the crate bump. The three lockfiles carry most of the diff
    but are machine-generated and additive, so they need no line-by-line read.
  3. tests/dependencies/test_aiconfigurator_consistency.py — the rewrite. Worth
    confirming the new assertions are the ones you want, since the old ones
    cannot survive this change.

Validation

  • uv pip compile resolution matrix above (Linux, Python 3.12).
  • Readiness gate, measured internally: with aisimulate 0.1.0.dev2 the
    aggregated planner's AIC gate reports readiness=ready on an observation set
    where 0.11.0.dev20260728 reports insufficient_data. This is the original
    motivation for the change. The input came from an internal benchmark run that
    is not public, so treat it as context rather than something reproducible from
    this branch. Nothing in the diff depends on it.
  • Package-count check: aiconfigurator-core alone resolves to 9 packages, all a
    strict subset of the 77 pulled by aisimulate 0.1.0.dev2, so removing the
    mocker extra changes no resolved install on 3.11–3.13.
  • Lockfiles regenerated on Linux under the rust-toolchain.toml 1.96.1
    toolchain. cargo metadata --locked passes in all three workspaces. The
    branch is merged up to date with main, and the locks were regenerated on
    top of that merge rather than merged textually — a text-merged lockfile is
    not a valid lockfile, which is what an earlier push got wrong.
  • pytest tests/dependencies/ — the aisimulate and aiconfigurator
    consistency suites pass. The two test_kvbm_imports.py failures are
    container-only (/opt/dynamo/wheelhouse/) and reproduce identically on an
    unmodified checkout.

Related Issues

That DEP defines the AIConfigurator repository and artifact transition to
AISimulate. This PR is the Dynamo-side consumer of it. Cross-referenced from
#13920, which states the AIC artifact transition remains defined by AIC #1517.

Not a duplicate of #13280. That one pins AIC 0.11.0 on the release branch;
this one moves main onto the post-migration aisimulate wheel.

AI assistance

AI assistance was used for dependency-resolution analysis and for drafting this
description. Every resolution claim above was produced by running uv pip compile or cargo metadata and was reviewed line by line before submission.

main still pins the 2026-07-28 AIC pre-release across all five Python
requirement sites and the aic-forward-pass crate, so every nightly built
from main ships it. 0.11.0 has been published since 2026-08-17 and
release/1.4.0 already moved to it in ai-dynamo#13280; forward-port that pin so main
and the release line agree.

The stale wheel keeps the aggregated planner's AIC readiness gate shut:
aiconfigurator_core.sdk reports readiness=insufficient_data for the same
observation set that 0.11.0 accepts, so throughput scaling never arms on a
nightly-based deployment.

Co-authored-by: Claude
Signed-off-by: Thai Huynh VN <thaih@nvidia.com>
@thaihuynhxyz
thaihuynhxyz requested review from a team as code owners August 24, 2026 16:16
@copy-pr-bot

copy-pr-bot Bot commented Aug 24, 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.

@thaihuynhxyz
thaihuynhxyz temporarily deployed to external_collaborator August 24, 2026 16:16 — with GitHub Actions Inactive
@thaihuynhxyz
thaihuynhxyz temporarily deployed to external_collaborator August 24, 2026 16:16 — with GitHub Actions Inactive
@github-actions github-actions Bot added the build label Aug 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

👋 Hi thaihuynhxyz! 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 and removed external-contribution Pull request is from an external contributor labels Aug 24, 2026

@devin-ai-integration devin-ai-integration Bot 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Review 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: 390ebd79-1ce2-41b8-b492-fd411a722d84

📥 Commits

Reviewing files that changed from the base of the PR and between 759cb4e and 0b2c733.

⛔ Files ignored due to path filters (1)
  • lib/bindings/python/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • benchmarks/pyproject.toml
  • container/deps/requirements.frontend.txt
  • container/deps/requirements.planner.txt
  • lib/bindings/python/Cargo.toml
  • pyproject.toml

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


Walkthrough

The pull request replaces dated aiconfigurator development pins with stable 0.11.0 pins across benchmark, container, Python binding, and project dependency declarations.

Changes

Dependency pin updates

Layer / File(s) Summary
Align stable release pins
benchmarks/pyproject.toml, container/deps/requirements.*, lib/bindings/python/Cargo.toml, pyproject.toml
All listed aiconfigurator dependencies now use stable version 0.11.0.

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

Merge Risk: ⚪ Minimal · up to 0b2c7

This PR updates the Aiconfigurator dependency pins to the published 0.11.0 release without code changes; no actionable merge-blocking risk remains beyond normal CI and review checks.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title is concise and describes the migration of Python AIConfigurator dependencies to the published aisimulate wheel. This matches the detailed PR description, although the supplied PR objective…
Description check ✅ Passed The description is complete and includes the required Overview, Details, reviewer guidance, and Related Issues sections. It provides dependency, Rust, testing, compatibility, and scope details. The is…
Full details: Docstring Coverage

Explanation

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 files. (5 skipped: 5 unsupported.)

Full details: Title check

Explanation

The title is concise and describes the migration of Python AIConfigurator dependencies to the published aisimulate wheel. This matches the detailed PR description, although the supplied PR objectives and file summary still describe a direct aiconfigurator 0.11.0 update.

Full details: Description check

Explanation

The description is complete and includes the required Overview, Details, reviewer guidance, and Related Issues sections. It provides dependency, Rust, testing, compatibility, and scope details. The issue reference uses a full URL instead of the template's Relates to #1517`` format, but the required relationship is clear.


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

Comment thread container/deps/requirements.planner.txt Outdated
# Keep both layers on the same published AIC dev release.
aiconfigurator==0.11.0.dev20260728
# Keep both layers on the same published AIC release.
aiconfigurator==0.11.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This exact aiconfigurator==0.11.0 pin conflicts with the still-staged aisimulate==0.1.0.dev1 wheel, whose metadata requires aiconfigurator==0.11.0.dev20260728, so planner image dependency resolution can fail. Fix: update the staged aisimulate release to one built against AIC 0.11.0, or keep the AIC pins aligned with the current aisimulate wheel.

🤖 AI Fix

In container/deps/requirements.aisimulate.txt and pyproject.toml, replace aisimulate==0.1.0.dev1 with a published aisimulate version whose Requires-Dist pins aiconfigurator==0.11.0 and aiconfigurator-core==0.11.0; if no such wheel exists, revert the AIC pins in container/deps/requirements.planner.txt, container/deps/requirements.frontend.txt, benchmarks/pyproject.toml, pyproject.toml, and lib/bindings/python/Cargo.toml to the 0.11.0.dev20260728 release family.

@thaihuynhxyz thaihuynhxyz Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Confirmed, and it is the second half of your fix that applies — no such wheel exists.

aisimulate 0.1.0.dev1 is the only release on either index (pypi.org and pypi.nvidia.com), and it is the last artifact cut before AIConfigurator was merged into AISimulate, which is why its metadata still pins the pre-release:

when what
2026-08-14 aisimulate 0.1.0.dev1 wheels uploaded to PyPI
2026-08-17 AISimulate merges full AIConfigurator into its own package
2026-08-19 #13478 stages that wheel here

Reproduced the conflict exactly as you describe:

Because aisimulate==0.1.0.dev1 depends on aiconfigurator==0.11.0.dev20260728
and you require aiconfigurator==0.11.0, we can conclude that your requirements
and aisimulate==0.1.0.dev1 are incompatible.

One correction worth recording for whoever picks this up next: the first half of your suggested fix will not become available either. Current AISimulate already ships aiconfigurator and aiconfigurator_core as its own packages rather than depending on them, so no future release will pin AIC at all. Once a release publishes, the right change here is to drop the standalone aiconfigurator / aiconfigurator-core requirements and take both packages from aisimulate — not to bump this pin. I have asked the AISimulate owners to cut a release from main.

So I am taking your second option and holding this PR rather than merging it.

Leaving the motivation on the record, since the problem outlives the pin: on a main-built nightly the aggregated planner's AIC readiness gate returns insufficient_data for an observation set that 0.11.0 accepts, so it never arms scaling — the A/B is in the description. Deployments on released images are unaffected, since v1.4.0 and v1.4.1 both carry AIC 0.11.0.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Unheld — the release published, and it confirms the second path.

aisimulate 0.1.0.dev2 went to PyPI on 2026-08-27, the day after the comment
above. Its metadata carries no aiconfigurator requirement at all, as expected:
it now ships aiconfigurator and aiconfigurator_core inside its own wheel.

So this PR no longer bumps the pin. It drops the standalone aiconfigurator /
aiconfigurator-core requirements from all five Python sites and takes both
packages from aisimulate. The title and description are updated to match.

A second effect worth recording, since it is not visible from this line alone:
main cannot resolve ai-dynamo[trtllm] today on Python 3.11–3.13. The AIC
vendored in dev1 needs numpy>=1.26.4,<1.27, while TensorRT-LLM 1.3.0rc24
needs numpy>=2.0,<2.4. dev2 needs numpy>=2.1,<3 and resolves at
numpy==2.3.5, so this change fixes that conflict as a side effect.

One regression to flag: dev2 requires Python >=3.11,<3.14, so 3.10 loses
access to AIConfigurator. The version-by-version table and the open
support-policy question are in the description.

0.1.0.dev2 vendors aiconfigurator / aiconfigurator_core. Pinning AIC
0.11.0 next to it does not resolve (numpy 2 vs 1.26). The planner
image installs both requirement files in one uv pip install.

Co-authored-by: Cursor
Signed-off-by: Thai Huynh VN <thaih@nvidia.com>
@thaihuynhxyz
thaihuynhxyz temporarily deployed to external_collaborator September 1, 2026 01:04 — with GitHub Actions Inactive
@thaihuynhxyz thaihuynhxyz changed the title build: use published Aiconfigurator 0.11.0 on main build: use aisimulate 0.1.0.dev2 (drop standalone AIC pins) Sep 1, 2026
Match the Rust crate to the aisimulate wheel the Python side pins.

Regenerated on Linux under the 1.96.1 toolchain in rust-toolchain.toml.
Cargo drops six kvbm-* entries from lib/bindings/python/Cargo.lock:
nothing in that workspace reaches them, so the lock had been carrying
dead entries. That crate's only relevant dependency is dynamo-llm, whose
block-manager feature pulls nixl-sys, cudarc, nix and aligned-vec and no
kvbm crate. The root lock keeps all seven as real workspace members.
cargo metadata --locked passes in all three workspaces.

Co-authored-by: Cursor
Signed-off-by: Thai Huynh VN <thaih@nvidia.com>
The mocker extra only ever carried aiconfigurator-core, which now ships
inside aisimulate as a core dependency, so the extra installs nothing.
Its two [tool.uv] conflict entries go with it: both described a NumPy
clash against trtllm and vllm that 0.1.0.dev2 no longer has.

aisimulate 0.1.0.dev2 requires Python >=3.11, so the marker gains a
lower bound. Without it a 3.10 resolve fails on missing wheels instead
of skipping the dependency. Dynamo still declares 3.10 support, so AIC
is unavailable there; the estimator error now names the 3.11-3.13 window
rather than an extra that no longer exists.

test_aiconfigurator_consistency.py asserted that nine AIC pins agreed
with each other. Seven of those sites are gone, so it now asserts their
absence and that aiconfigurator and aiconfigurator_core import from the
aisimulate wheel.

Co-authored-by: Cursor
Signed-off-by: Thai Huynh VN <thaih@nvidia.com>
@thaihuynhxyz
thaihuynhxyz requested a review from a team as a code owner September 1, 2026 03:07
@thaihuynhxyz
thaihuynhxyz temporarily deployed to external_collaborator September 1, 2026 03:07 — with GitHub Actions Inactive
@pull-request-size pull-request-size Bot added size/L and removed size/S labels Sep 1, 2026
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Sep 1, 2026
@thaihuynhxyz thaihuynhxyz changed the title build: use aisimulate 0.1.0.dev2 (drop standalone AIC pins) build: move Python AIConfigurator onto the published aisimulate 0.1.0.dev2 wheel Sep 1, 2026
CI builds the merge of this branch into main, not the branch alone. Git
merged my regenerated lockfiles with main's textually and cleanly, but the
result was never produced by cargo, so `cargo metadata --locked` rejected
it and rust-clippy (lib/bindings/kvbm) failed.

Resolved by discarding the auto-merged lockfiles, taking main's, and
re-running `cargo update -p aisimulate-core --precise 0.1.0-dev.2` on Linux
under the pinned 1.96.1 toolchain. All three locks are cargo-generated and
`cargo metadata --locked` passes in all three workspaces.

The diff is now purely additive: main has since pruned the six unreachable
kvbm-* entries from lib/bindings/python/Cargo.lock on its own, so nothing
is removed.

Co-authored-by: Cursor
Signed-off-by: Thai Huynh VN <thaih@nvidia.com>
@thaihuynhxyz
thaihuynhxyz temporarily deployed to external_collaborator September 1, 2026 03:22 — with GitHub Actions Inactive
@thaihuynhxyz

Copy link
Copy Markdown
Contributor Author

Closing this in favour of #13665, which covers everything here and more.

After the review comment above I moved this branch off aiconfigurator==0.11.0
and onto aisimulate==0.1.0.dev2, dropped the five standalone AIConfigurator
pins, and regenerated the three lockfiles. CI then showed why the change cannot
stop at the Python side: aisimulate-core 0.1.0-dev.2 is a breaking Rust API
change, and dynamo-mocker fails to compile with 14 errors.

AgenticMooncakeRow was redesigned between the two crate versions:

dev.1 dev.2
timestamp, delay replaced by a required not_before_ms
tool_events, branches, prefix_reset, request_kind replaced by dependencies: Vec<AgenticDependency>
session_id: Option<String> session_id: String, plus required play_id and model
AgenticToolEvent no longer exported from replay::loadgen

lib/mocker/src/loadgen/dynamo.rs translates Dynamo's own agentic row into the
crate's field by field, so adopting dev.2 means re-expressing tool events and
branches as the new dependency graph. That is a design decision about the trace
model, not a mechanical fix.

Splitting the two halves is not an option either: the crate vendors AIC as well
as the wheel, and tests/dependencies/test_aisimulate_consistency.py requires
the two versions to match. That rule is correct, so a Python-only bump would
have to weaken it.

#13665 already ports all three affected files and carries the same Python pins,
so nothing here is left to land.

Two findings from this branch that #13665 may want, since neither is in its
description today:

1. It also fixes ai-dynamo[trtllm], which cannot resolve on main. Resolved
with uv pip compile for x86_64-unknown-linux-gnu, Python 3.12:

requirements result
aisimulate==0.1.0.dev1 + tensorrt-llm==1.3.0rc24 unresolvable: the vendored AIConfigurator needs numpy>=1.26.4,<1.27, TensorRT-LLM needs numpy>=2.0,<2.4
aisimulate==0.1.0.dev2 + tensorrt-llm==1.3.0rc24 resolves at numpy==2.3.5

dev2 needs numpy>=2.1,<3, which intersects TensorRT-LLM's range.

2. Python 3.10 loses AIConfigurator. dev2 declares
requires_python: >=3.11,<3.14, while the project still says 3.10 is supported
in three places: requires-python = ">=3.10", a
Programming Language :: Python :: 3.10 classifier, and an abi3 cp310
ai-dynamo-runtime wheel. #13665 uses the same marker, so it inherits this. On
3.10 the mocker and replay backends now raise from
dynamo._internal.aic.estimate_num_gpu_blocks. CI is unaffected, since the
matrix runs 3.11 to 3.13. Whether to raise requires-python is a support-policy
call rather than a build fix, so it seems worth a maintainer ruling on #13665.

AI assistance was used for this investigation.

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

Labels

build container documentation Improvements or additions to documentation size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant