refactor(runtime): remove Python interpreter bridges - #1003
Open
yifeif-nv wants to merge 1 commit into
Open
Conversation
yifeif-nv
force-pushed
the
agent/remove-runtime-hf-python
branch
2 times, most recently
from
August 22, 2026 18:56
f1be418 to
d57df2d
Compare
Collaborator
Author
|
/run-ci |
Community CPUStatus: PASSED
All required public CPU stages passed. |
yifeif-nv
force-pushed
the
agent/remove-runtime-hf-python
branch
from
August 22, 2026 19:46
d57df2d to
eac14e7
Compare
Collaborator
Author
|
/run-ci |
yifeif-nv
force-pushed
the
agent/remove-runtime-hf-python
branch
from
August 22, 2026 20:31
eac14e7 to
a1c6031
Compare
Collaborator
Author
|
/run-ci |
yifeif-nv
force-pushed
the
agent/remove-runtime-hf-python
branch
from
August 22, 2026 20:45
a1c6031 to
d95d8e4
Compare
Collaborator
Author
|
/run-ci |
yifeif-nv
force-pushed
the
agent/remove-runtime-hf-python
branch
from
August 22, 2026 21:07
d95d8e4 to
0d8bb88
Compare
Collaborator
Author
|
/run-ci |
yifeif-nv
force-pushed
the
agent/remove-runtime-hf-python
branch
from
August 22, 2026 21:42
0d8bb88 to
83cccf7
Compare
Collaborator
Author
|
/run-ci |
yifeif-nv
force-pushed
the
agent/remove-runtime-hf-python
branch
from
August 23, 2026 21:20
83cccf7 to
15e65f8
Compare
Collaborator
Author
|
/run-ci |
yifeif-nv
force-pushed
the
agent/remove-runtime-hf-python
branch
from
August 23, 2026 22:35
15e65f8 to
606c5df
Compare
Collaborator
Author
|
/run-ci |
yifeif-nv
force-pushed
the
agent/remove-runtime-hf-python
branch
from
August 23, 2026 23:07
606c5df to
6300af0
Compare
Collaborator
Author
|
/run-ci |
Collaborator
Author
|
run-internal-ci |
yifeif-nv
force-pushed
the
agent/remove-runtime-hf-python
branch
from
August 24, 2026 23:06
6300af0 to
be0b107
Compare
yifeif-nv
force-pushed
the
agent/remove-runtime-hf-python
branch
from
August 26, 2026 22:57
be0b107 to
bfc9df4
Compare
|
Important Review skippedToo many files! This PR contains 324 files, which is 24 over the limit of 300. To get a review, reduce the PR to 300 files or fewer by splitting it into smaller PRs or changing its base branch. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (324)
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
yifeif-nv
force-pushed
the
agent/remove-runtime-hf-python
branch
from
August 27, 2026 00:17
bfc9df4 to
f18f4f7
Compare
yifeif-nv
force-pushed
the
agent/remove-runtime-hf-python
branch
from
August 27, 2026 01:18
f18f4f7 to
6bca3bc
Compare
Remove interpreter paths from the native API, CLI, wrappers, benchmark, and E2E runtime surfaces. Delete the PersonaPlex tokenizer subprocess and Qwen3-Omni Talker worker, keep unsupported audio generation fail-closed, and add a repository guard against future interpreter or process-spawn bridges. Treat pre-1.0 runtime and model-plugin interfaces as current-epoch only: delete retired fields and overloads instead of carrying compatibility slots or symbols, require all artifacts to be rebuilt together, and reject stale model DSOs through the exact-match ABI v2 gate. Restore PersonaPlex output-plan coverage under its own model-owned test. Canonicalize nested decoder fields at the bundle config root so the root-only JSON parser never depends on recursive key scans. Keep structured encoders model-owned while preserving valid zero/list token IDs, generation-config EOS precedence, and model-owned overrides. BREAKING CHANGE: Remove --hf-python and the hf_python public fields and arguments. Core, wheel, bundles, and model DSOs must be rebuilt and upgraded together. Qwen3-Omni audio generation remains unavailable until a native Talker is implemented. Signed-off-by: yifeif-nv <277870278+yifeif-nv@users.noreply.github.com>
yifeif-nv
force-pushed
the
agent/remove-runtime-hf-python
branch
from
August 27, 2026 22:31
6bca3bc to
08b0f92
Compare
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.
Background
Native bundle inference still exposed a Hugging Face Python interpreter path through the CLI, C++ and C APIs, the Python wrapper, benchmarks, and E2E orchestration. PersonaPlex could launch a tokenizer subprocess, while Qwen3-Omni could launch a persistent Python Talker worker. That made Python availability part of deployed inference behavior.
Exit Criteria
libpythondependencies.trtmcruntime commands.Implementation
--hf-python,hf_pythonfields, and positional interpreter arguments from the CLI, C++ API, C ABI, Python wrapper, examples, benchmarks, validation tools, and E2E runtime commands.speech_text_prompt_idsand fails closed when a bundle configures onlyspeech_system_prompt. Prompt IDs use the shared JSON helper, and the unrelated output-planning tests formerly colocated with the subprocess seam now have a dedicated model-owned test.kind="hf_python"metadata, the tokenizer bridge asset, dead source-directory plumbing, and misleading tokenizer fallback messages.tests/tools/test_native_runtime_python_free.pyto the always-on source-quality architecture gate. Model proof also rejects directlibpythondependencies in scratch and selected-wheel runtime ELF artifacts, including the packaged benchmark worker.Change categories
Validation
Commands and Results
python3 -m tools.community_ci unit --scope all: 3,688 Python tests passed, 2 skipped; 20 allocator tests passed; 40 source-only C++ platform tests passed.python3 -m tools.community_ci unit --scope builder: 811 builder tests passed, 1 skipped.python3 -m pytest tests/builder/test_config.py tests/builder/test_config_coverage.py tests/builder/test_generation_config_eos.py tests/tools/test_native_runtime_python_free.py -q -p no:cacheprovider: 77 passed, including the SegFormer structured-config regression and native-runtime Python-free guard.PYTHONPATH=python:. python3 -m pytest tests/tools/test_github_actions_ci.py tests/tools/test_model_proof_inner.py tests/tools/test_selected_wheel_runtime.py tests/tools/test_model_proof_runner.py tests/tools/test_warm_hf_cache_static.py -q -p no:cacheprovider: 298 passed after rebasing across the CI cache and exact-case changes.python3 -m tools.community_ci source-quality --base github/main: cyclomatic complexity passed with maximum CCN 10; changed-file lint/formatting passed; 163 architecture tests passed.python3 -m tools.community_ci impact --base github/main: passed withmode=allandunit_scope=all.cmake --build /tmp/trtmc-pr1003-host.O0u5TS --target test_c_abi_entry test_optimized_runtime_host test_model_plugin_abi test_model_plugin_loader test_personaplex_speech_output_plan -j2: passed; the loader dependency rebuilt all 84 model DSOs.XDG_CACHE_HOME=/tmp/trtmc-pr1003-cache ctest --test-dir /tmp/trtmc-pr1003-host.O0u5TS --output-on-failure -R '^(test_c_abi_entry|test_optimized_runtime_host|test_model_plugin_abi|test_model_plugin_loader|test_personaplex_speech_output_plan)$': 5/5 passed.trtmc-dev-gb300:latestbuild oftest_personaplex_speech_pipelineandtest_personaplex_speech_output_plan, followed by their focused CTest: 2/2 passed without a GPU.python3 tools/model_ci.py validate: passed for 84 model families.python3 tools/test_impact.py --validate: passed with existing allowlist warnings.python3 tools/check_doc_file_references.py --strict website/docs: 107 documents, 0 errors, 0 warnings.python3 tools/legal_headers.py --check: 0 findings.git diff --check github/main...HEAD: passed.nm -D -Conlibtrtmc_core.so: only the current one-argument andLoadOptionsload/factory symbols remain; both retired four-argument symbols are absent.readelf -dplusnm -Dover the fresh core and all 84 model DSOs: 85 ELFs scanned, 84 ABI entrypoints present, 0 directlibpythondependencies.Hardware, Environment, and Revisions
08b0f9298da7bd4bfe845dfc1a8fac1511fdf512; base/main:7e6325412b2ab9a5e04aa9fe1b3f73cdcbb53c45.trtmc-dev-gb300:latest, TensorRT 11.1.0, CUDA toolkit 13.3, no NVIDIA driver or GPU attached; compile and CPU-only CTest only.fdaf4090a61cb315c138a1faee287ffd6c716309; Qwen3-Omni checkpoint revision remains26291f793822fb6be9555850f06dfe95f2d7e695. Neither checkpoint was loaded locally in this validation cycle.Not Run / Remaining Gaps
DT_NEEDEDguarantee. It does not claim a recursive third-party dependency closure or arbitrary runtimedlopen()coverage.Notes For Future Readers
--hf-pythonand everyhf_pythonfield or argument, then rebuild and upgrade core, CLI, wheel, bundles, and every model DSO together.trtmc buildand test/reference helpers may still use Python. The invariant targets loaded bundle execution, not the build control plane.Risk level
High risk because this deliberately breaks pre-1.0 source, binary, plugin, and bundle compatibility across the runtime stack and removes Qwen3-Omni audio behavior. The risk is controlled by mandatory whole-release rebuilds, an exact-match ABI gate, fail-closed unsupported paths, complete local CPU gates, and exact-head CI.