Allow huggingface-hub 2.x (widen cap from <2 to <3)

Đang mở Phù hợp với người mới
#1,110 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@davanstrien đang làm issue này rồi.

Từ ngày 30/10/2026.

  • #1117 của @davanstrien — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
72/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
huggingface, python
Lĩnh vực
backend

Hướng nghiên cứu

Đọc các đặc tả phụ thuộc trong packages/data-designer/pyproject.toml và packages/data-designer-engine/pyproject.toml; yêu cầu là nới giới hạn phiên bản trên của huggingface-hub trong cả hai tệp. Các bộ kiểm thử của gói được báo cáo là đã chạy qua với hub 2.3.0, nhưng có thêm một kiểm thử thất bại do văn bản lỗi của click thay đổi trong tests/cli/test_main.py::test_app_rejects_unknown_options_before_script_separator. Công việc hoàn tất khi cả hai giới hạn đều cho phép các phiên bản thấp hơn 3 và kiểm thử đó xử lý thông báo đã thay đổi nếu tệp khóa được nâng cấp.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement triaged
Priority Level

Medium (Nice to have)

Is your feature request related to a problem? Please describe.

data-designer and data-designer-engine pin huggingface-hub>=1.0.1,<2. huggingface_hub 2.x has been out since September (current release: 2.3.0), and transformers, datasets and diffusers already allow <3. With the current cap, Data Designer can't be installed alongside packages that need hub 2.x, and its users stay on 1.x.

Describe the solution you'd like

Widen the cap to huggingface-hub>=1.0.1,<3 in both packages/data-designer/pyproject.toml and packages/data-designer-engine/pyproject.toml.

I ran the package test suites (as in ci.yml) at 4bb221e on a clean Linux box, once on the current lock and once with the lock upgraded to hub 2.3.0:

Package hub 1.6.0 (current lock) hub 2.3.0
data-designer-config 830 passed 830 passed
data-designer-engine 2862 passed 2862 passed
data-designer 8 failed, 1236 passed 9 failed, 1235 passed

The 8 failures on both versions come from my environment: no jq, and the tests running as root. The one extra failure is test-only, and it comes from click, not from hub:

  • huggingface_hub 2.3.0 requires click>=8.4.2 (1.x depended on typer instead). So upgrading the lock also moves click from 8.3.3 to 8.4.2
  • click 8.4.2 adds a "Did you mean '--num-records'?" hint to unknown-option errors, and the error box wraps the text. So tests/cli/test_main.py::test_app_rejects_unknown_options_before_script_separator, which checks for the exact string "No such option: --num-recrods", no longer matches
  • Checking for No such option and --num-recrods separately (or normalising whitespace) would make the test pass on both click versions

Data Designer's own hub usage (HfApi, HfFileSystem, DatasetCard, HfHubHTTPError) passed unchanged on 2.3.0.

Describe alternatives you've considered

Widening the cap without upgrading the lock (only the specifier lines change in uv.lock). That keeps CI on hub 1.6.0 while letting users install 2.x. It's the smallest change, but the lock would no longer cover 2.x in CI.

Agent Investigation

I used Claude Code to find where the cap came from, check the code for APIs that huggingface_hub 2.0 removed, and run the test suites above. The cap dates from the package restructure in #240 (January 2026), before hub 2.0 existed. Data Designer uses none of the APIs removed in 2.0 (upload_large_folder, duplicate_space, stop_sequences, etc.) and doesn't catch httpx transport errors directly.

Additional context

huggingface_hub 2.0's breaking changes are the HTTP stack moving from httpx to httpx2 and the removal of APIs deprecated in 1.x: https://github.com/huggingface/huggingface_hub/blob/main/docs/source/en/concepts/migration_v2.md

I work at Hugging Face and am happy to open the PR (cap change, plus the test fix if you want it) once this is triaged.

Checklist
  • I've reviewed existing issues and the documentation
  • This is a design proposal, not a "please build this" request
Ngôn ngữ chính
Python
Star
2.4k
Fork
243
Merge trung bình
1 ngày 2 giờ
Pull request đã merge (30 ngày)
86

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NVIDIA-NeMo/DataDesigner

Tất cả issue của NVIDIA-NeMo/DataDesigner

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.