alf-core
The lightweight, dependency-minimal foundation of ALF (Active Learning Framework).
alf-core provides the base classes, core data structures, and the active-learning loop
for iterative optimisation in computational science — optimising high-dimensional,
combinatorially vast search spaces where each label is expensive (wet-lab assays,
simulations, measurements). It ships with no ML-framework dependencies (only numpy,
pandas, scipy), so it is standalone and domain-agnostic. For ready-to-use models,
datasets, and acquisition functions, install
alf-tools.
Installation
pip install alf-core
Quick start
alf-core is the framework layer: you supply your own BaseDataset and BaseModel
subclasses (or install alf-tools
for ready-made ones), then wire them into the active-learning loop.
from alf_core import (
DatasetSearch,
DesignTask,
Optimizer,
Oracle,
Surrogate,
TerminalStateLogger,
)
# Bring your own BaseDataset, BaseModel, and AcquisitionFunction subclasses
dataset = MyDataset(...)
surrogate = Surrogate(model=MyModel())
optimizer = Optimizer(acquisition_fn=MyAcquisition(), search_fn=DatasetSearch())
oracle = Oracle(scorer=dataset)
# Run the active-learning loop for 5 rounds, acquiring 100 candidates per round
task = DesignTask(num_acq_rounds=5, acq_batch_size=100)
state = task.setup(dataset=dataset, surrogate=surrogate)
task.run(
state=state,
state_loggers=[TerminalStateLogger()],
optimizer=optimizer,
oracle=oracle,
)
For a complete, runnable alf-core-only example (a bootstrap-ensemble surrogate and a
Probability of Improvement acquisition function built from scratch with numpy/scipy), see the
ALF Core Quickstart notebook.
Key concepts
ALF runs the active-learning loop over a small set of swappable components:
- Dataset (
BaseDataset) — loads, splits, and queries candidate data - Model (
BaseModel) — the surrogate/oracle/generator backbone you implement - Surrogate (
Surrogate) — wraps a model to predict fitness and uncertainty - Oracle (
Oracle) — returns ground-truth labels (offline pool or live scorer) - Optimizer (
Optimizer) — proposes the next batch via acquisition + search - Acquisition function (
AcquisitionFunction) — scores candidates to acquire - Search strategy (
BaseSearch) — defines the candidate pool to score - State (
State) — tracks rounds, history, and metrics across the loop - Tasks (
DesignTask,SupervisedTask,ZeroShotTask) — drive the multi-round loop, fixed-data training, or no-train evaluation
Documentation
- Core concepts: how the components fit together
- API reference: every class and method
- Glossary: terms and benchmark metrics
- Tutorials: tutorials/
- Full documentation: instadeepai.github.io/alf
- Ready-to-use tools: alf-tools
License
Apache License 2.0 — see LICENSE.
Metadata
Release files for alf_core 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| alf_core-0.1.0.tar.gz | 48.8 kB | Without provenance | Details for alf_core-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| alf_core-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for alf_core-0.1.0-py3-none-any.whl |
Total release size: 116.9 kB
Release files / alf_core-0.1.0.tar.gz
| Download URL | alf_core-0.1.0.tar.gz |
|---|---|
| Size | 48.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e11d2c71d06b050e1150ab639ff93f1a36183d9ad496515718d462b66faccae2
|
|
BLAKE2b-256 checksum How to use checksums |
ab412a9d2e327078f1dc7937bbfaf55a930e14f0145430f0840a26adac69a5e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.20 {"installer":{"name":"uv","version":"0.12.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / alf_core-0.1.0-py3-none-any.whl
| Download URL | alf_core-0.1.0-py3-none-any.whl |
|---|---|
| Size | 68.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1d28f16285b50d5106f2a9cb534068d46c26ba2cc73df4bc07ba33c64c6afdbe
|
|
BLAKE2b-256 checksum How to use checksums |
c6d2b012de334fe8d220ee39513a5352b52b420c2be8a0a3f34df3361e37b07a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.20 {"installer":{"name":"uv","version":"0.12.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for alf_core 0.1.0
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.