Skip to content

bug: Build Top HuggingFace Models workflow fails with unsupported list_models direction argument #534

Description

@aftersnow

Problem

The scheduled Build Top HuggingFace Models workflow is failing because contrib/scripts/select-top-models.py passes direction=-1 to HfApi.list_models(), but the currently installed huggingface_hub no longer accepts that keyword.

Latest observed failed run:

TypeError: HfApi.list_models() got an unexpected keyword argument 'direction'

The workflow installs dependencies from:

contrib/scripts/requirements.txt: huggingface_hub>=0.20.0

On current main (1d480ded52ab1bda1aea3d03a452ed901325344d), installing that requirement and inspecting HfApi.list_models shows direction is not in the signature.

python3 -m venv /tmp/modctl-hf-venv
/tmp/modctl-hf-venv/bin/pip install -q -r contrib/scripts/requirements.txt
/tmp/modctl-hf-venv/bin/python - <<'PY'
from huggingface_hub import HfApi
import inspect
sig = inspect.signature(HfApi.list_models)
print('direction' in sig.parameters)
PY

Output:

False

Expected behavior

The scheduled workflow should select models successfully with the currently supported Hugging Face Hub API, or the dependency should be pinned to a version compatible with the script.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions