Skip to main content

Work in Progress

Manipulating Ersilia's dataframes

eosframes is a library for manipulating inputs and outputs from the Ersilia Model Hub. It splits, assembles, converts, scales, and summarises tabular model output files.

Installation

Python ≥ 3.8 is required.

pip install eosframes

Or from source:

git clone https://github.com/ersilia-os/eosframes.git
cd eosframes
pip install -e .

Quick start

Every file the library reads or writes encodes a model ID and version in its filename, e.g. eos4e40_v1.csv (model eos4e40, version v1).

# Slice a big input CSV into chunks for parallel model runs
eosframes split compounds.csv -o chunks/ --chunksize 10000

# Stitch the per-batch outputs back into one file
eosframes append eos4e40_v1_000.csv eos4e40_v1_001.csv -o eos4e40_v1.csv

# Combine outputs from multiple models, side by side
eosframes stack eos4e40_v1.csv eos7m30_v1.csv -o project_eosmix.csv

Everything the CLI does is also importable:

from eosframes import read_csv, hstack, fit, transform

df = read_csv("eos4e40_v1.csv")
params = fit(df)
scaled = transform(df, params)

Run eosframes --help (or eosframes <command> --help) for inline help.

Commands

Command Purpose
split Slice any CSV into chunk files for parallel model runs.
convert CSV ↔ H5, or assemble a chunks folder.
append Vertically concatenate batches from the same model.
dedupe Drop duplicate rows by key.
stack Horizontally combine outputs from different models.
unstack Split a stacked file back into per-model files.
summary Per-feature stats from a local file.
info Model metadata fetched from GitHub.
columns Feature definitions fetched from GitHub.
fit Fit a type-aware robust scaler and save its parameters.
transform Apply a saved scaler to a file.

See docs/cli.md for every flag, example, and refusal condition.

fit and transform stream in bounded memory — fit walks one column at a time, transform one row-chunk at a time — so they handle files far larger than RAM (wide fingerprint frames, tens of GB). Tune --chunksize to trade memory for throughput.

Scripts

scripts/build_scaler.sh builds and packages a scaler for one model in a single step: it pulls the model's precalculations from the isaura store over the Ersilia reference library (data/ersilia_reference_library_v0.csv), fits an eosframes scaler, and compresses the transformer into a versioned zip.

scripts/build_scaler.sh <model_id> <version>      # e.g. eos4e40 v1

The artifact is written to:

output/ersilia_reference_library_v0/<model_id>/<version>/scaler-<eosframes-major>.zip

(e.g. output/ersilia_reference_library_v0/eos4e40/v1/scaler-1.zip), containing a single <model_id>_<version>_transformer.json. The bucket defaults to isaura-public; override it with the PROJECT_NAME environment variable.

Prerequisites: isaura and eosframes on PATH, and a running local isaura MinIO engine (isaura engine --start).

Documentation

  • docs/cli.md — every CLI command, all flags, examples, and error patterns.
  • docs/nomenclature.md — every recognised filename / directory pattern, the strict/lenient contract, and the two stack modes.
  • docs/scaling.md — the type-aware robust scaler: column kinds, how each is picked, quantization / imputation, and the bounded-memory streaming fit/transform for large files.

About the Ersilia Open Source Initiative

The Ersilia Open Source Initiative is a tech-nonprofit fueling sustainable research in the Global South. Ersilia's main asset is the Ersilia Model Hub, an open-source repository of AI/ML models for drug discovery.

Ersilia Logo

Metadata

Release files for eosframes 1.2.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 eosframes 1.2.0
File Size Uploaded
eosframes-1.2.0.tar.gz 58.4 kB Details

Built distribution (wheel)

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

Total release size: 121.4 kB

Release files / eosframes-1.2.0.tar.gz

Download URL eosframes-1.2.0.tar.gz
Size 58.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8b315e0936a4fd270b831aa9a590d77c6d1cab991a74972e6bb1aa6c9c17e484
BLAKE2b-256 checksum
How to use checksums
9b8207f94d6caf8ceb213bbbd41ae3e8385a8c2b1ebd2dc489321422d5e66533
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.12.3 Linux/6.17.0-1022-azure

Release files / eosframes-1.2.0-py3-none-any.whl

Download URL eosframes-1.2.0-py3-none-any.whl
Size 62.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
db33dfdda06dcf21f441dc63e05a6dc53eb39d1c357c45f7d8cf18dd462de0e0
BLAKE2b-256 checksum
How to use checksums
14d7fdef7fb2664f929c94168f56384fff5bf3453865b751a9c2d9a012e8e0f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.12.3 Linux/6.17.0-1022-azure

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.1.0

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