Skip to main content

hfjev

Classify Hugging Face datasets across typed semantic dimensions with TypeSafe Jev System One.

pip install hfjev

Quick start

import hfjev

dataset = hfjev('cornell-movie-review-data/rotten_tomatoes')
results = dataset.classify()

print(results[0]['answers'])

hfjev() loads any Hugging Face dataset, auto-adapts evaluation rubrics to the domain, and classifies each row in a single parallel System One call with calibrated probabilities.

Gated & private datasets

dataset = hfjev('meta-llama/Llama-2-7b', hf_token=os.environ['HF_TOKEN'], api_key=os.environ['TYPESAFE_API_KEY'])

Pass your Hugging Face User Access Token to authenticate gated or private datasets.

Custom dimensions

dataset = hfjev('ag_news')

dataset.adapt([
    {'id': 'tech_relevance', 'type': 'noul', 'instructions': 'Is this about artificial intelligence?'},
    {'id': 'urgency', 'type': 'score', 'instructions': 'Rate story urgency', 'criteria': ['Low', 'Breaking']}
])

results = dataset.classify()

adapt() overrides the default domain pack with your own Choice, Noul, or Score primitives.

Streaming evaluations

for row in dataset.stream():
    print(f"[Row {row['index']}]", row['answers'])

stream() yields evaluations row-by-row for live feeds and telemetry without blocking on batch completion.

Local files and in-memory lists

# Local JSON, JSONL, or CSV
local = hfjev('./reviews.json')

# In-memory list of strings or dicts
custom = hfjev([
    'The acting was phenomenal throughout.',
    'Pacing dragged during the second act.'
])

hfjev() detects intent directly from the input type.

CLI

hfjev cornell-movie-review-data/rotten_tomatoes --limit 5

Runs classifications directly from your terminal and prints formatted dimension scores and probabilities.

License

MIT © Hemanth.HM

Release files for hfjev 0.1.0

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

Source distribution (sdist)

Source distribution for hfjev 0.1.0
File Size Uploaded
hfjev-0.1.0.tar.gz 18.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hfjev 0.1.0
File Interpreter ABI Platform
hfjev-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 30.8 kB

Release files / hfjev-0.1.0.tar.gz

Download URL hfjev-0.1.0.tar.gz
Size 18.8 kB
Tags Source
SHA-256 checksum
How to use checksums
695f5167fb6b532bbaae921c1c652fad7971ebc6964aa986ae369e4c08909682
BLAKE2b-256 checksum
How to use checksums
73f7c1544c4dd281162064e723bbd4b7a0a3b18a4a58729189584551cc7e56c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / hfjev-0.1.0-py3-none-any.whl

Download URL hfjev-0.1.0-py3-none-any.whl
Size 12.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b83504e4ad1b92261133015448f69bd0c4466ea1033299f2b3c5692aa6342c3f
BLAKE2b-256 checksum
How to use checksums
200a933c0acb2f0aaaa106904464b417163d615dc39d31ba91931226dfc260ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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