Skip to content

Release funasr-onnx 0.4.2 without Torch runtime dependency#3242

Draft
LauraGPT wants to merge 3 commits into
mainfrom
codex/funasr-onnx-0.4.2
Draft

Release funasr-onnx 0.4.2 without Torch runtime dependency#3242
LauraGPT wants to merge 3 commits into
mainfrom
codex/funasr-onnx-0.4.2

Conversation

@LauraGPT

@LauraGPT LauraGPT commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • bump funasr-onnx from 0.4.1 to the immutable 0.4.2 release candidate;
  • add a release-contract test that requires jieba, rejects Torch as a runtime dependency, and rejects Torch imports in the ONNX package source;
  • add Python 3.11/3.12 CI that builds the wheel and sdist, runs twine check, installs the wheel in a clean environment, runs pip check, imports all four public entry points, and uploads the release candidate artifact.

Why

The source fixes for #2604 are already on main: SenseVoice post-processing is NumPy-only and the missing jieba dependency is declared. PyPI still serves funasr-onnx==0.4.1, however, so users continue to receive the old Torch-importing wheel. Re-uploading the existing version is not safe; this PR creates a new version and makes the release contract reproducible.

This PR does not close #2604 by itself. Keep the issue open until 0.4.2 is uploaded to PyPI and the downloaded PyPI wheel passes the same smoke test.

Verification

  • release contract: 4 tests passed;
  • python -m build: wheel and sdist built successfully;
  • twine check: both distributions passed;
  • fresh Python 3.11.15 and 3.12.3 environments: 34 packages compatible, funasr-onnx==0.4.2, Torch absent, jieba present, and Paraformer, Fsmn_vad, CT_Transformer, SenseVoiceSmall all import successfully;
  • real CPU inference from the newly built wheel, with Torch absent, using the official quantized SenseVoice ONNX model:
    • input: 16 kHz mono, 5.55 seconds;
    • output: <|zh|><|NEUTRAL|><|Speech|><|withitn|>欢迎大家来体验达摩院推出的语音识别模型。;
  • Black, compileall, workflow semantic checks, and git diff --check passed.

Local release-candidate checksums:

42243d2d5f91b679220206bdc4424861127bb7814693fae38ce4026f4e10cbca  funasr_onnx-0.4.2-py3-none-any.whl
c13e1d6b832c902afc6716a07d9ed70ec33394102a34bb8c0f3bb87ccfe65435  funasr_onnx-0.4.2.tar.gz

Post-merge release gate

A maintainer still needs to upload the final artifacts with the project PyPI credential. After upload, download funasr-onnx==0.4.2 from PyPI into fresh Python 3.11 and 3.12 environments and repeat the no-Torch dependency/import smoke before closing #2604.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request bumps the version of funasr_onnx to 0.4.2 and introduces a new contract test suite to verify the release version, ensure that torch is not listed in the runtime dependencies, and confirm that there are no torch imports in the package source. Feedback suggests improving the dependency parsing logic in the tests to robustly handle other PEP 508 operators (like != or ~=) using regular expressions, preventing potential false negatives in the torch-free dependency check.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread tests/test_funasr_onnx_release.py
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.

funasr_onnx移除对torch依赖

1 participant