Change8

v0.34.0

📦 huggingface-hubView on GitHub →
13 features🐛 12 fixes1 deprecations🔧 5 symbols

Summary

This release introduces 'Jobs', a powerful new CLI and Python API for running compute tasks on Hugging Face infrastructure using Docker-like commands. Additionally, the Hugging Face CLI has been officially renamed from `huggingface-cli` to `hf`, and the InferenceClient gained image-to-image support.

Migration Steps

  1. If using the CLI, update scripts and habits to use `hf` instead of `huggingface-cli` (e.g., use `hf jobs run` instead of `huggingface-cli jobs run`).
  2. If using Tiny-Agents, update configuration files to the new VSCode-like format to properly handle secrets and environment variables.

✨ New Features

  • Introduction of the new `hf jobs` command-line interface for running and managing compute jobs on Hugging Face infrastructure.
  • Jobs CLI supports familiar Docker-like commands: `run`, `ps`, `logs`, `inspect`, `cancel`.
  • Jobs support running on various hardware flavors including CPUs, T4/A10G/A100 GPUs, and TPUs via a simple flag.
  • Jobs can execute commands within Docker images, HF Spaces, or custom containers.
  • Live log streaming for running jobs.
  • Python API for jobs introduced with functions like `run_job` and `list_jobs`.
  • Experimental UV Runner (`hf jobs uv run`) for running Python scripts with inline dependencies.
  • The Hugging Face CLI has been officially renamed from `huggingface-cli` to `hf`.
  • InferenceClient now supports `image-to-image` task for Replicate and fal.ai providers.
  • InferenceClient now accepts `PIL.Image` objects directly as input.
  • Tiny-Agents updated input format to align more closely with VSCode config format, improving environment variable and secret handling.
  • Xet integration is now stable and production-ready, handling a majority of file transfers on new repos.
  • Improved progress reporting for Xet uploads.

🐛 Bug Fixes

  • Fixed headers handling and secrets management in Tiny-Agents.
  • Kept empty dictionaries out of the chat completion payload in Tiny-Agents.
  • Fixed recursive filtering in Inference Providers.
  • Removed default parameter values for text generation in Inference.
  • Correctly built chat completion URL with query parameters in Inference.
  • Updated Tiny-Agents example.
  • Fixed "failed to parse tools" error caused by mcp EXIT_LOOP_TOOLS not conforming to ChatCompletionInputFunctionDefinition model.
  • Added tool call to messages in Tiny-Agents.
  • Omitted parameters for default tools in Tiny-Agents.
  • Fixed payload preparation to correctly merge parameters into the output dictionary.
  • Fixed inference_endpoints health check to use GET `healthRoute` instead of GET /.
  • Updated hf_api.py.

Affected Symbols

⚡ Deprecations

  • The legacy `huggingface-cli` command is officially deprecated, although it remains available without breaking changes for now.