Skip to content

Require huggingface_hub>=0.30.0 - #531

Open
SammyTourani wants to merge 1 commit into
google-research:masterfrom
SammyTourani:fix/issue-412
Open

SammyTourani wants to merge 1 commit into
google-research:masterfrom
SammyTourani:fix/issue-412

Conversation

@SammyTourani

Copy link
Copy Markdown

Fixes #412

Raise the minimum huggingface_hub in pyproject.toml from 0.28.0 to 0.30.0. This is a
one-line change.

TimesFM_2p5_200M_torch passes paper_url to PyTorchModelHubMixin, and huggingface_hub
only accepts that keyword from 0.30.0 (huggingface/huggingface_hub#2917). With 0.28.x or
0.29.x installed, both of which the current floor allows, import timesfm fails:

TypeError: ModelHubMixin.__init_subclass__() got an unexpected keyword argument 'paper_url'

pip does not upgrade huggingface_hub in that case, because the installed version already
satisfies >=0.28.0. This is the paper_url failure reported in #412. The proxies failure
that the issue is titled after was already fixed by #435, so with this change both failures
reported there are resolved.

Verification

Command: python -m pytest tests/ src/timesfm3/ --ignore=src/timesfm3/mlx -p no:cacheprovider -q
(fresh Python 3.11 venv, run once per huggingface_hub version)

Result:

  • huggingface_hub 0.29.3, allowed by the current floor: Interrupted: 3 errors during collection, 0 tests run. The collection errors are
    TypeError: ModelHubMixin.__init_subclass__() got an unexpected keyword argument 'paper_url'
    (tests/test_base_utils.py, tests/test_force_flip_invariance.py) and a follow-on
    KeyError: 'timesfm' (tests/test_model_loading.py).
  • huggingface_hub 0.30.0, the new floor: 114 passed
  • huggingface_hub 0.36.2: 114 passed
  • huggingface_hub 1.32.0: 114 passed, 1 warning. The warning was there before this change:
    test_model_loading.py passes proxies=, which huggingface_hub 1.x ignores.

MLX backend at the new floor (0.30.0, mlx 0.32.2): python -m pytest src/timesfm3/mlx -q →
20 passed, 14 skipped. The skipped tests require a cached TimesFM 3.0 checkpoint.

Install behaviour: I built wheels with python -m build and ran pip install "<wheel>[torch]"
into an environment that already had huggingface_hub 0.29.3.

  • Before: the wheel declares Requires-Dist: huggingface_hub>=0.28.0. pip leaves
    huggingface_hub at 0.29.3, and import timesfm raises the paper_url TypeError.
  • After: the wheel declares Requires-Dist: huggingface_hub>=0.30.0. pip upgrades
    huggingface_hub, and import timesfm succeeds.

proxies failure from #412, checked against current master: I put the real config.json
from google/timesfm-2.5-200m-pytorch next to randomly initialised weights and called
TimesFM_2p5_200M_torch.from_pretrained(path) with no extra arguments.

Environment: macOS arm64, Python 3.11, torch 2.14.0, jax 0.10.2, flax 0.12.8.

TimesFM_2p5_200M_torch passes paper_url to PyTorchModelHubMixin, which
huggingface_hub only accepts from 0.30.0. With 0.28.x/0.29.x, which the
previous floor allowed, `import timesfm` fails with
"ModelHubMixin.__init_subclass__() got an unexpected keyword argument
'paper_url'".
@google-cla

google-cla Bot commented Sep 24, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

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.

[Bug] TypeError: got an unexpected keyword argument 'proxies' when loading TimesFM 2.5 via from_pretrained

1 participant