Skip to main content

Top-level package for Epoch AI client library.

Project description

This repository contains the Python client library of Epoch AI. At the moment, only one feature is supported: reading from our database of ML models and benchmark results.

Installation

pip install epochai

Usage

Reading from our Airtable database of ML models and benchmark results

A few preparatory steps are required:

  1. Open our Airtable base
  2. Airtable doesn't allow public API access, so you'll have to make a copy of the base (unless you are an Epoch AI team member).
  3. Define the AIRTABLE_BASE_ID environment variable with the ID of the base you just copied. (The ID is in the URL and starts with app.)
  4. Create an Airtable API key with access to the base, and the following scopes: data.records:read, schema.bases:read. Define the AIRTABLE_API_KEY environment variable with the key.

You're now ready to use the library. The database models are defined in epochai.airtable.models.

You can get started with our example script examples/airtable.py, or try the snippets below.

from epochai.airtable.models import MLModel, Task, Score, Organization, BenchmarkRun

# Get everything at the start to minimize API calls
scores = Score.all(memoize=True)
runs = BenchmarkRun.all(memoize=True)
models = MLModel.all(memoize=True)
tasks = Task.all(memoize=True)
organizations = Organization.all(memoize=True)

Print information about a model:

print_model_info("claude-3-5-sonnet-20240620")

Print the highest scores for a benchmark and scorer:

print_high_scores(
    task_path="bench.task.hendrycks_math.hendrycks_math_lvl_5",
    scorer="model_graded_equiv",
    scores=scores
)

Track the best-performing model to date over time:

print_performance_timeline(
    task_path="bench.task.gpqa.gpqa_diamond",
    scorer="choice",
    scores=scores
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

epochai-0.1.2.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

epochai-0.1.2-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file epochai-0.1.2.tar.gz.

File metadata

  • Download URL: epochai-0.1.2.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.6 Darwin/24.2.0

File hashes

Hashes for epochai-0.1.2.tar.gz
Algorithm Hash digest
SHA256 bfce211dd1077924ac0733b80590a6d000d03c738517d5b62e1fed8ec2922b23
MD5 393227f447fe6e82ea43dbfcef575aa0
BLAKE2b-256 ef88935dea93fc3f382c021cf02743431f1a9f8746c28e42851b816b5000d211

See more details on using hashes here.

File details

Details for the file epochai-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: epochai-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.6 Darwin/24.2.0

File hashes

Hashes for epochai-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2ffb817478e9cca78977189c6aa7abb88a17ceb028d0a756eaa2eb558f586553
MD5 a4190b94098d784b3a80b19fa8cb21c6
BLAKE2b-256 1980088267cfa64155ec1935d3c33c0e86c4ce23d7c5d9c2f4fd8d328924e6bd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page