Skip to main content

3lc-compute-plugin-huggingface

Hugging Face datasets inside the 3LC Hub: browse the Hub with its own vocabularies, preview any dataset without downloading it, import a split into a 3LC table with the media copied to your storage or referenced in place, and share a 3LC table back as a Hugging Face dataset with a card and a licence.

A 3LC compute-service plugin (kind compute, section Data Ops, id = "huggingface"), isolated in its own venv (provision_extra = "huggingface").

What the page does

  • Datasets. Search plus the Hub's own filters — modality (image, video, audio, text, tabular, document, 3D, geospatial, time series), size category, format, licence, task — sorted by trending, downloads, likes or updated. The result list and the detail pane share one screen; the page never scrolls.
  • Preview. Configs and splits with row counts and parquet sizes, rows with thumbnails, per-split filtering ("label"=3, numeric ranges) and text search where the Hub offers it, class distributions. All of it comes from Hugging Face's datasets-server; nothing is downloaded to look.
  • Import. Tick the columns in the preview header; the drawer takes project, dataset and table names, where the project goes (this computer or the cloud root), all rows / the first N / the current filter, and — for image columns — copy to storage (a folder or bucket URL, with a URL alias) or reference Hugging Face files when the dataset stores each image as a file. The licence is acknowledged on every import. The job reads the dataset's parquet branch (refs/convert/parquet) with column projection and filters, in batches.
  • Share a table. A 3LC table → a new dataset repository: parquet, a README dataset card with the licence you choose, private by default, images included as files or left as URLs.

Token

The person's own token is a Hugging Face Connection they choose on the page (the Hub's PLUGIN_API.chooseCredential("huggingface")); the host hands its value to this plugin's jobs and to the routes plugin.toml lists under credential_routes. After it: HF_TOKEN / HUGGINGFACE_HUB_TOKEN as the worker's environment had it at start, then the compute service's Hugging Face CLI login (~/.cache/huggingface/token), then — for one release — a token an earlier version of the page saved in the plugin's settings. None is ever returned to the browser or logged. A token is needed for gated or private datasets and for sharing (write access).

Routes (mounted under /api/plugins/huggingface/)

Route Answer
GET /hf/vocab {modality, size_categories, format, license, task_categories} as [{id, label}]
GET /hf/search?q&modality&size&format&license&task&sort&page&limit {items:[card…], page, limit, has_more}
GET /hf/dataset?id= licence, card, configs → splits (rows, bytes), features per config, parquet files, importable + reason
GET /hf/rows?id&config&split&offset&length&where&q {features, rows:[{idx, cells}], total, partial, filtered, note}; image cells {type:"image", src, width, height}
GET /hf/statistics?id&config&split {statistics:[{column, type, stats}]}
GET /hf/token {token_set, token_source} for the caller (connection, env, hub, settings or "")
GET/POST /hf/settings the same without the caller's Connection; POST {"token": "-"} removes a saved token
GET /project-root, GET /browse, POST /upload-temp the SDK's shared data-source routes

Jobs go through the generic POST /run with mode: "import" (dataset, config, split, parquet_files, columns, row_limit, where, project/dataset/table names, project_root_url, media copy/reference, media_target, alias_token, license) or mode: "export" (table_url, repo_id, private, license, include_media, description).

Dev setup

uv sync --extra huggingface
uv pip install --python .venv/bin/python -e ../3lc-compute-plugin-sdk   # until the SDK with /project-root ships
uv run --no-sync pytest

Tests never reach Hugging Face: every HTTP call goes through hub_api._http_get, every file read through the importer's seams. Point a dev compute at this checkout with TLC_COMPUTE_EXTERNAL_PLUGIN_DIRS=.../src.

POC development and publishing

Staged 3LC builds (the 3lc core and SDK 0.5) resolve from the private staging index (pypi.3lc.ai/repositories/prereleases), declared as the explicit staging index in pyproject.toml; everything else comes from PyPI. Set only the index credentials in your shell (keep them out of source files):

export UV_INDEX_STAGING_USERNAME="<staging index username>"
export UV_INDEX_STAGING_PASSWORD="<staging index token>"
uv sync --locked --group dev --extra huggingface
uv run --no-sync pytest

The Release workflow builds verified artifacts on manual runs. publish=true uploads them to the private staging index (prereleases) using the CLOUDREPO_USERNAME / CLOUDREPO_PASSWORD secrets; publishing is disabled by default. The timestamp, run and attempt suffix stamps the distribution and manifest together.

The separate v* tag path provides PyPI Trusted Publishing plumbing. Configure the PyPI project's trusted publisher before using that path; no public release is needed during POC.

Metadata

Release files for 3lc-compute-plugin-huggingface 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for 3lc-compute-plugin-huggingface 0.1.7
File Size Uploaded Provenance Actions
3lc_compute_plugin_huggingface-0.1.7.tar.gz 414.9 kB Without provenance Details for 3lc_compute_plugin_huggingface-0.1.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for 3lc-compute-plugin-huggingface 0.1.7
File Interpreter ABI Platform Actions
3lc_compute_plugin_huggingface-0.1.7-py3-none-any.whl Python 3 none any Details for 3lc_compute_plugin_huggingface-0.1.7-py3-none-any.whl

Total release size: 572.5 kB

Release files / 3lc_compute_plugin_huggingface-0.1.7.tar.gz

Download URL 3lc_compute_plugin_huggingface-0.1.7.tar.gz
Size 414.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1656dca050060dcccd924272c4fcb86cae2108454d5f1b3d09271770a61831ac
BLAKE2b-256 checksum
How to use checksums
68817bf7690d3e5dc8356e9f6a661807fc6456e693605bf068076c8f17abf906
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.22

Release files / 3lc_compute_plugin_huggingface-0.1.7-py3-none-any.whl

Download URL 3lc_compute_plugin_huggingface-0.1.7-py3-none-any.whl
Size 157.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
74a201dd760a5df445dd55f68d7c29dbf6b9d7851b319cbd1488db0d49edf419
BLAKE2b-256 checksum
How to use checksums
3c313e210fb772d294e788b99d2df6bf0e77bcb12fdcb232bb2fe9a6cce2813e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.22

Security for 3lc-compute-plugin-huggingface 0.1.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.7 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page