Skip to content

build: releasing first beta version v0.1.0b0 - #185

Merged
olive005 merged 11 commits into
mainfrom
develop
Jul 10, 2026
Merged

build: releasing first beta version v0.1.0b0#185
olive005 merged 11 commits into
mainfrom
develop

Conversation

@olive005

@olive005 olive005 commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

This PR contains several changes related to the first beta release of alf.

A few changes like the introduction of Colab notebook links needs to be tested when the repo is public, before merging.

chrbrunk and others added 4 commits July 10, 2026 10:45
* ci: add ci release job and introduce small bug in top-level pyproject.toml to verify the version check

* ci: fix early-failing release ci job

* ci: fix linters

* chore: add init files to packages (#179)

* Update release.yml

* change version to a0

* Update release.yml

* revert version

* build: bump version to beta version b0

---------

Co-authored-by: Shikha Surana <114497416+surana01@users.noreply.github.com>
Co-authored-by: Shikha <s.surana@instadeep.com>
Co-Authored-By: olive005 <o.gallup@instadeep.com>
* docs: improve tutorial notebooks (setup, offline/online fixes, explanations)

Address reviewer feedback across the tutorial notebooks:

- Add a standard, aligned "Setup" section + optional commented `%pip install`
  box to every tutorial so they work in both dev mode and a plain pip install.
- tutorials/pyproject.toml: drop the now-unused pyrosetta-installer dep and add
  esm2/chemprop/guacamol/protein/molecule dependency-groups mirroring the root,
  so `uv sync --group <name>` works from tutorials/ (fixes the ESM-2 group error).
- Offline design: Experiment Overview numbering -> bullets; note the surrogate
  is not pre-trained; add Greedy-vs-advanced-acquisition note; reduce logging;
  fix Step 10 metrics (iloc[-2], iloc[1:-1], use the DataFrame index, no "round"
  column); add a results-interpretation paragraph.
- Online design: align Step 0 setup with offline; replace the ~30-min PyRosetta
  oracle with a fast, pip-installable in-silico oracle (a CNNModel trained on the
  full GFP dataset via Oracle(scorer=...)); mutate over the DNA alphabet to match
  the GFP nucleotide sequences; apply the same Step 10 metric/plot fixes; add
  results interpretation.
- GP/CNN/Ensemble: more inter-cell explanation and results commentary; ensemble
  and guacamol silence RDKit fingerprint-API deprecation noise at import.
- ESM-2: link the Installation Guide, GPU note, CPU-time note on PLL scoring, and
  a note that the small/short-training validation plot is illustrative.
- Chemprop: document the required chemprop extra.
- ProteinGym: add ProteinGym link + citation, recommend the offline tutorial
  first, and drop the NaN round-0/summary rows when printing/plotting.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: apply pre-commit (ruff E402 noqa, nbstripout, eof) to tutorials

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix: address PR review on tutorials (online flat-curve note, round count, repro)

- online: explain the (expected) flat fitness curve honestly — single-nucleotide
  moves give the CNN oracle near-constant signal; reframe as a mechanics demo and
  point to the offline tutorial for the optimisation payoff.
- online: seed torch before training the in-silico oracle for reproducibility;
  read metrics via save_path (consistent with offline).
- offline + online: fix off-by-one in the printed "Total Rounds" count (the
  trailing experiment-summary row was being counted as a round).

Both notebooks re-executed end-to-end and pass; pre-commit clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* docs: add explanatory paragraphs above code blocks and below plots

Address the reviewer's storytelling rule of thumb across the lighter tutorials:
a short paragraph above every code block explaining what/why, and a paragraph
below every plot interpreting the result. Filled gaps in guacamol, ensemble,
esm2, gp, proteingym, chemprop, cnn and the two design tutorials. Markdown-only
additions — code cells are unchanged from the previous commit, so all notebooks
still execute as before.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* docs: interpret remaining plots and introduce proteingym component steps

Close the residual storytelling gaps a reviewer flagged: GP's first 1D fit and
final 2D field plots now have explicit uncertainty interpretation (the core GP
lesson), the GuacaMol correlation heatmap and aspirin-overlay figure are
interpreted, and ProteinGym Steps 5 and 7 (acquisition, optimizer) gain
explanatory prose. Markdown-only; code cells unchanged, all notebooks still run.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* docs: British spelling in tutorial prose and comments (team-review)

Apply the repo's British-spelling convention across the tutorial markdown,
comments and print messages: analyse, visualise, initialise, optimisation,
behaviour. Limited to prose/comments/print-strings — code identifiers and
matplotlib kwargs (Optimizer, optimizer, color=) are untouched, so execution
is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: move seaborn from default tutorial deps to the guacamol group

seaborn is only used by the GuacaMol tutorial, so it doesn't belong in the
default `[project.dependencies]`. Move it into the `guacamol` group alongside
`alf_tools[guacamol]`; `uv sync --group guacamol` (and the notebook's optional
pip box) still provide it. Verified the GuacaMol tutorial runs end-to-end after
the change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Revert "chore: move seaborn from default tutorial deps to the guacamol group"

Keep seaborn as a default tutorial dependency, per preference.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* docs: MLIP-style onboarding — live pip-install cell + Open-in-Colab badges

Make every tutorial open-and-run for a new user with no repo clone (inspired by
the MLIP tutorials):

- Add an "Open in Colab" badge under each title.
- Replace the dev-mode-first Setup with a Setup that LEADS with a live (uncommented)
  `%pip install` cell installing ALF (+ that tutorial's deps) from the git repo;
  dev-mode (clone + uv sync) is now a one-line "skip this cell" note.
- CPU PyTorch by default with a commented GPU line; a note that this collapses to
  `pip install alf_tools`/`alf_core` once ALF is on PyPI. Tracks `main` for now
  (version tags coming soon).

Per-notebook install targets derived from actual imports (core vs tools, esm2/
chemprop/guacamol extras, matplotlib/pandas/seaborn/umap). Validated the new path
end-to-end in a fresh venv (quickstart installed alf_core from git and ran);
notebook bodies are unchanged from the previous commit and all 16 still pass the
paragraph audit. pre-commit clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix: install alf_core from git in tools-based tutorials (PyPI stub is a placeholder)

`alf_tools` depends on `alf_core`, and the only `alf-core` on PyPI is an empty
0.0.0 placeholder, so `%pip install "...#subdirectory=tools"` alone resolves the
stub and the notebook then fails at `import alf_core`. Prepend an explicit
`"alf_core @ git+...#subdirectory=core"` to every tools-based install cell so pip
uses the real package from git (mirrors the two-step install in the docs).

Verified in a fresh venv: installing both from git imports alf_core, Candidate,
CNNModel and GFP successfully. Collapses to `pip install alf_tools[...]` once ALF
is published to PyPI. Core-only notebooks are unaffected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* docs: make tutorial result analysis robust to the metrics.csv/summary.csv split (#159)

Rework Step 10 in the offline, online and proteingym tutorials to select acquisition
rounds via metrics.dropna(subset=["acquired_candidates/round_mean"]) instead of positional
iloc. This drops the initial round-0 row and any trailing per-experiment summary row, so the
analysis is correct whether summary metrics live in metrics.csv (current) or a separate
summary.csv (PR #159). X-axis uses the `round` column when present, else the index.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* docs: graft #151 code-cell splitting into model notebooks; MNIST quickstart onboarding

Post-merge reconciliation of PR #151:
- gp/cnn/ensemble/chemprop: kept our versions (rich prose, plot interpretations, Colab
  onboarding, British spelling) and grafted #151's finer code-cell splitting
  (semantics-preserving: executable code byte-identical, only cell boundaries + intros added).
- alf_core_quickstart (now #151's MNIST demo): re-applied our onboarding — Open-in-Colab
  badge + live `%pip install` (alf-core git URL) replacing the static install note.
- nbstripout/eof normalisation on the #151 extending_base_classes notebooks.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* docs: guard empty acquisition metrics and note summary.csv (review fixes)

Address LOW review findings on the Step 10 analysis cells:
- offline + online: raise a clear ValueError if metrics.csv has no acquisition
  rounds, before indexing the acquired-batch metrics with .iloc[-1].
- offline: note that per-round metrics are in metrics.csv while per-experiment
  aggregates (e.g. auc_top_k) are written to summary.csv (per #159).

Verified: offline and online run end-to-end against #159's logger, no NaN.

Co-Authored-By: olive005 <o.gallup@instadeep.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix: move proteingym

* docs: note Colab availability under the badge; fix proteingym links after move

- Add a caption under every Open-in-Colab badge: it only works once ALF is
  public / on PyPI, so internal users aren't surprised by a 404 today.
- proteingym moved experiments/ -> datasets/: repoint its own badge URL to the
  datasets/ path and fix its links to the offline tutorial (now ../experiments/).

Co-Authored-By: olive005 <o.gallup@instadeep.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* docs: add PyPI-swap TODO above each git install + Colab runtime note

- Add a per-tutorial `# TODO(pypi)` comment above each git-based `%pip install`
  giving the exact PyPI command to switch to once ALF is published, e.g.
  `%pip install "alf_tools[esm2]" matplotlib pandas umap-learn` (derived from
  each notebook's actual deps; core-only tutorials use `alf_core`).
- Add a short Colab note to each Setup section (first install may take a few
  minutes; restart the runtime if prompted; pick a GPU runtime + uncomment the
  GPU line). Core-only notebooks omit the GPU hint.

torch is left as a default dependency (alf_tools requires it; pulled in
automatically). Heavy extras keep the standard extras-group install — no
special optional-install handling added.

Co-Authored-By: olive005 <o.gallup@instadeep.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* docs: list the ProteinGym tutorial in the tutorials index

Add the ProteinGym tutorial under "Go deeper on datasets" (it lives in
tutorials/datasets/ after the move) — a discoverability gap that pre-dated the
move. Links to the notebook and notes it mirrors the offline design loop.

Co-Authored-By: olive005 <o.gallup@instadeep.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: remove Colab badges, captions and Colab notes from tutorials

The Colab-specific onboarding (Open-in-Colab badge, its caption, the Colab
runtime note, and "or on Google Colab" phrasing) is being split into a separate
PR (branch feat/colab-badge -> improve/tutorials). The live pip-install
onboarding, PyPI TODOs and links stay here.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Co-Authored-By: olive005 <o.gallup@instadeep.com>

* feat: add Open-in-Colab badges and Colab guidance to tutorials

Re-adds the Colab-specific onboarding split out of improve/tutorials: the
"Open in Colab" badge + caption on each notebook, the Colab runtime note
(restart / GPU hint), and the "or on Google Colab" setup phrasing. This branch
targets improve/tutorials so the Colab support lands as its own PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Co-Authored-By: olive005 <o.gallup@instadeep.com>

* fix: naturalise writing, american --> britix spelling

Co-Authored-By: olive005 <o.gallup@instadeep.com>

* docs: drop TODO(pypi) comments from tutorial install cells

The eventual git-install -> PyPI swap is tracked in #175, so the per-notebook
TODO(pypi) scaffolding is redundant. The live git-based %pip install and the
optional GPU line are unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Co-Authored-By: olive005 <o.gallup@instadeep.com>

* ci: switch tests_and_linters runners to ubuntu-latest for public repo

Migrates the linters and tests jobs off the private instadeep-ci /
instadeep-ci-4 runners now that the repo is going public, per issue #175.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CPprWaGCsxTbZFPyG6JD3s

* chore: use PyPI installs in tutorial notebooks

Replace the git+https ALF installs in tutorial notebooks with their PyPI
package names (alf_core / alf_tools), keeping the tools extras (e.g.
alf_tools[esm2]). PyPI is not published yet, but the notebooks now point
at the intended install path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: olive005 <o.gallup@instadeep.com>

* fix: separate args

Co-Authored-By: olive005 <o.gallup@instadeep.com>

* fix: update nbstripout

Co-Authored-By: olive005 <o.gallup@instadeep.com>

* ci: show diff on pre-commit failure

Add --show-diff-on-failure to the pre-commit run so hooks that rewrite
files in place (e.g. nbstripout) print the exact diff of what changed,
making CI lint failures diagnosable instead of a bare "files were
modified by this hook".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: olive005 <o.gallup@instadeep.com>

* fix: change kernelspec; This prevents nbstripout from preserving language_info.version and other volatile fields which cause diffs across environments.

Co-Authored-By: olive005 <o.gallup@instadeep.com>

* fix: linting in pre commit yaml

Co-Authored-By: olive005 <o.gallup@instadeep.com>

* fix: rm nbstripout hook

Co-Authored-By: olive005 <o.gallup@instadeep.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
@chrbrunk chrbrunk changed the title Develop build: releasing first beta version v0.1.0b0 Jul 10, 2026
@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown

Coverage

Core Coverage Report
FileStmtsMissCoverMissing
core/alf_core
   __init__.py170100% 
core/alf_core/dataclasses
   __init__.py90100% 
   candidate.py70987%37–38, 87–88, 113, 115, 134, 143, 145
   labelled_candidates.py61296%213–214
   predictions.py36197%74
   results.py28196%83
   round_metrics.py90100% 
   state.py250100% 
   surrogate_epoch_metrics.py130100% 
core/alf_core/dataset
   base_dataset.py128794%112, 211, 328, 338, 340, 345, 353
   splitting_utils.py72888%64–65, 70, 202, 207, 214, 236, 238
core/alf_core/model
   base_model.py38586%76, 91, 104, 116, 154
   normaliser.py820100% 
core/alf_core/optimizer
   acquisition_function.py6183%39
   optimizer.py320100% 
   search.py451175%43, 55, 71, 83, 95, 117, 160, 172, 185–186, 199
core/alf_core/oracle
   oracle.py21385%72–74
core/alf_core/surrogate
   surrogate.py200100% 
core/alf_core/tasks
   base_task.py28292%66, 87
   design_task.py42197%116
   supervised_task.py210100% 
   zeroshot_task.py150100% 
core/alf_core/utils
   enums.py50100% 
   state_logger.py85989%64, 78, 119–120, 192, 226–227, 292, 311
core/alf_core/utils/metrics
   __init__.py60100% 
   acquisition_batch.py59493%38, 119–120, 131
   aggregate.py41197%158
   base.py510100% 
   calibration.py220100% 
   classification.py54688%176–177, 180, 183–185
   regression.py1490100% 
TOTAL12907194% 

Tests Skipped Failures Errors Time
396 0 💤 0 ❌ 0 🔥 3.837s ⏱️

@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown

Coverage

Tools Coverage Report
FileStmtsMissCoverMissing
tools/alf_tools
   __init__.py20100% 
tools/alf_tools/datasets
   __init__.py7271%27–28
   flip.py96297%199, 307
   gfp.py28196%61
   proteingym.py118595%71, 198, 226, 283, 294
tools/alf_tools/datasets/guacamol
   __init__.py30100% 
   guacamol_dataset.py1692088%118, 181–182, 185–187, 284–289, 295–299, 354, 372, 383
   guacamol_scoring.py209199%209
   guacamol_utils.py1221091%216–220, 230, 240–241, 370–371
tools/alf_tools/models
   __init__.py40880%54–55, 65–66, 78–79, 91–92
   chemprop.py185597%185, 278, 322, 403–404
   cnn.py227796%290, 386, 436, 518, 522, 545, 656
   ensemble.py1301588%98, 112, 116, 189, 246–247, 253, 255–256, 276, 283, 344–345, 347–348
   esm2.py3432094%34–35, 76, 93, 164, 184, 195, 211, 307, 352, 362, 518, 526, 539, 597, 655, 663, 669, 707, 843
   esmfold.py112595%25–26, 123–124, 255
   gp.py2762092%128, 324, 362, 405, 412–413, 415, 465, 470, 542–544, 546, 548–550, 589, 660, 831, 928
   mlip.py1382681%101, 115, 123, 136, 209, 232–234, 269, 271, 298–300, 302–304, 311–312, 343, 363–364, 366–368, 370–371
   mlp.py204498%272, 307, 460, 510
   pyrosetta.py84840%15–17, 19–21, 23, 25, 27–32, 39, 42, 64–70, 73–74, 77–79, 82–83, 89, 102, 105–106, 108, 110, 112, 114, 116, 137–139, 144–145, 150–152, 155–158, 160, 162, 176–177, 183, 185, 187–188, 190–192, 194, 200, 202, 212, 214, 232–235, 238–241, 243, 247–249, 251, 256, 262, 264, 270
tools/alf_tools/models/esm_utils
   __init__.py00100% 
   config.py58198%143
   loss.py57885%67, 101, 119, 123–125, 128–129
   scoring_function.py38976%81, 91, 100, 115–119, 123
tools/alf_tools/models/utils
   __init__.py60100% 
   botorch_model_wrapper.py81396%59, 179, 244
   botorch_utils.py87495%73–75, 105
   config_utils.py27292%67, 72
   data_utils.py230100% 
   sequence_utils.py240100% 
   torch_utils.py50100% 
tools/alf_tools/models/utils/mlip_utils
   __init__.py30100% 
   config.py210100% 
   data.py90594%85, 157, 250, 257, 312
   model_registry.py13192%55
tools/alf_tools/optimizer/acquisition_functions
   __init__.py80100% 
   botorch_acquisition.py127695%290, 307, 316, 331, 410, 413
   botorch_samplers.py21385%88, 90, 117
   core_set.py46393%41–42, 95
   expected_improvement.py181327%46–52, 54, 56–58, 60, 64
   greedy.py60100% 
   thompson_sampling.py180100% 
   ucb.py13192%56
tools/alf_tools/utils
   __init__.py20100% 
   constants.py50100% 
TOTAL329029491% 

Tests Skipped Failures Errors Time
840 4 💤 0 ❌ 0 🔥 1m 28s ⏱️

Comment thread .pre-commit-config.yaml Outdated
olive005 added 6 commits July 10, 2026 13:42
Co-Authored-By: olive005 <o.gallup@instadeep.com>
Co-Authored-By: olive005 <o.gallup@instadeep.com>
Co-Authored-By: olive005 <o.gallup@instadeep.com>
Co-Authored-By: olive005 <o.gallup@instadeep.com>
Co-Authored-By: olive005 <o.gallup@instadeep.com>
Co-Authored-By: olive005 <o.gallup@instadeep.com>
@CLAassistant

CLAassistant commented Jul 10, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Comment thread .github/workflows/release.yml Outdated
Co-Authored-By: olive005 <o.gallup@instadeep.com>

@chrbrunk chrbrunk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@olive005
olive005 merged commit 3e25740 into main Jul 10, 2026
7 checks passed
@olive005
olive005 deleted the develop branch July 10, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants