NeMo icon indicating copy to clipboard operation
NeMo copied to clipboard

[Bug] fsspec is effectively pinned in released wheel, conflicting with pyproject.toml declaration (>=2024.12.0)

Open caixiaofan opened this issue 5 months ago • 1 comments

Describe the bug

The pyproject.toml in the repo declares fsspec>=2024.12.0, but the released wheel of nemo_toolkit[asr]==2.7.2 on PyPI ships a stricter constraint (e.g. fsspec==X.Y.Z — please replace with the actual value you observed), which downgrades / conflicts with fsspec across many downstream packages (s3fs, huggingface_hub, etc.) in my environment.

Steps/Code to reproduce bug

pip download nemo_toolkit[asr]==2.7.2 --no-deps -d /tmp/nemo
unzip -p /tmp/nemo/nemo_toolkit-*.whl '*/METADATA' | grep -i fsspec

Output: Saved /tmp/nemo/nemo_toolkit-2.7.2-py3-none-any.whl Successfully downloaded nemo_toolkit Requires-Dist: fsspec==2024.12.0

Expected behavior

  • Requires-Dist: fsspec>=2024.12.0

Environment details

  • Linux
  • Python: 3.12
  • nemo_toolkit: 2.7.2

caixiaofan avatar Jul 03 '26 07:07 caixiaofan

Hi @caixiaofan

Thanks for the detailed issue report and the exact reproduction snippet.

Root Cause

In setup.py (and requirement parsing logic in requirements/requirements.txt), requirement resolution functions process loose dependencies (>=) and normalize them into strict equality pins (==) during Wheel METADATA generation. As a result, fsspec>=2024.12.0 declared in pyproject.toml gets output as Requires-Dist: fsspec==2024.12.0 in the built wheel, creating strict version conflicts across downstream packages such as s3fs and huggingface_hub.

Proposed Solution

  1. Refactor requirement parsing utilities in setup.py (and tools/setup/requirements.py) to preserve range comparison operators (>=, <=, ~=) when emitting wheel METADATA package requirements.
  2. Ensure requirements/requirements.txt explicitly specifies fsspec>=2024.12.0 so that wheel generation maintains range compatibility across environment solvers.
  3. Add a unit test in tests/test_setup_requirements.py asserting that requirement generation preserves loose inequality operators (>=) in output requirement specifiers.

Would you like me to open a Pull Request with this packaging fix and accompanying regression tests?

Saad-Mallebhari avatar Aug 06 '26 17:08 Saad-Mallebhari