Skip to main content

Async Multi Objective Hyperparameter PBT (fast-cython, parameterless)

Project description

zen-fronts

Async multi-objective PBT-style population management with a fast Monte‑Carlo selection core.

The library is a facade (ZenFronts) around three concerns:

  1. storing params / point lifecycle (including tombstones),
  2. storing per-point criterion stats (mu/trend/sigma2, async updates),
  3. periodic selection (refresh()) driven by a compiled MC ranking kernel.

Quick start (runnable demo)

pip install -e ".[dev,examples]"
python examples/demo_noisy_zdt1_snapshots.py --out out/demo --epochs 40

The demo writes PNG snapshots (2 panels per image):

  • left: objective space (mu) + semi‑transparent ellipses from sigma2
  • right: rank space (pareto_core stable ranks; the coordinates in which Pareto is computed)

How to run the main loop (operational semantics)

When is a point “ready”?

refresh() only considers points that are:

  • active (not tombstone), and
  • ready for every criterion.

This is a deliberate ready gate: if your objectives arrive asynchronously, you can keep calling update_crits(pid, {crit: value}, t=...) whenever a metric arrives, and call refresh() whenever you want to run selection. Only fully observed points participate.

What to do with new children?

perform_new() creates a child (via your mutator) and optionally removes a loser.

Important: the child is not ready until you evaluate it and call update_crits() for all criteria.

Recommended per-epoch pattern:

# 1) ingest metrics (sync evaluation OR async updates)
# 2) run selection
losers = zf.refresh(now=t)

for loser in losers:
    parent = zf.choose_parent(loser)
    child, _ = zf.perform_new(parent, looser=loser, remove_looser=True)

    # must evaluate child at least once, otherwise it stays invisible to refresh()
    vals = evaluate(zf.params(child))
    zf.update_crits(child, vals, t=t + 0.1)

Tombstones (remove_looser=True)

If you remove a loser, it becomes inactive:

  • params(pid) raises KeyError
  • info(pid) still works (history remains accessible)
  • the last info(pid)["selection"] snapshot is frozen (not overwritten by future refresh() calls)

This makes it safe to keep IDs for logging/auditing.


Picking percentile and n_samples

Let N = number of active & ready points and k = ceil(percentile * N).

  • percentile controls selection pressure.

    • Start with 0.2–0.3 for PBT-like loops.
    • For small N, keep k at least 2–3 to avoid jitter.
  • n_samples controls Monte‑Carlo stability.

    • Typical: 128–256 (increase for noisy objectives).

If you enable per-point distribution summaries (median/q25/q75), quantiles can be computed:

  • exactly (quantiles_mode_i=0),
  • streaming P² (quantiles_mode_i=1), or
  • auto by budget (quantiles_mode_i=2).

Contract guarantee: quantiles mode must not change winners/losers, mean/std, or quality score.


Selection stats contract (stable, versioned)

After refresh(), each active point gets a info(pid)["selection"] dict with schema metadata:

  • schema_name = "zen_fronts.selection_stats"
  • schema_version = "1.0.0"

Downstream code should validate/normalize the structure via:

from zen_fronts.selection.schema import validate_selection_stats

st = validate_selection_stats(zf.info(pid)["selection"])  # raises on incompatible schema

Backward-compatibility rule: newer minor/patch versions are accepted; newer major is rejected. Adding new fields is allowed.


Docs

  • docs/how_to_run_cycle.md — full guidance for readiness, children handling, async criteria, and tuning.

Benchmarks

Two benchmark scripts live in examples/:

1) Core benchmark (MC ranking only)

Measures only the compiled Monte‑Carlo ranking kernel (no facade/store overhead):

python examples/bench_mc_rank.py --out out/bench_mc_rank.csv

2) End-to-end loop benchmark ("as in production")

Measures a realistic cycle:

  • update criteria for all active points,
  • refresh() (including build_matrices + MC core),
  • replace losers (choose_parent + perform_new),
  • update criteria for each new child.
python examples/bench_refresh.py --out out/bench_refresh.csv \
  --Ns 128,256 --Ss 64,128,256,512 --epochs 30 --reps 3

Key scaling intuition:

  • time is ~linear in n_samples;
  • time is ~quadratic in N (domination matrix is N×N).

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

zen_fronts-1.0.4.tar.gz (470.2 kB view details)

Uploaded Source

Built Distributions

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

zen_fronts-1.0.4-cp312-cp312-win_amd64.whl (675.1 kB view details)

Uploaded CPython 3.12Windows x86-64

zen_fronts-1.0.4-cp312-cp312-win32.whl (641.7 kB view details)

Uploaded CPython 3.12Windows x86

zen_fronts-1.0.4-cp312-cp312-musllinux_1_2_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

zen_fronts-1.0.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

zen_fronts-1.0.4-cp312-cp312-macosx_11_0_arm64.whl (716.0 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

zen_fronts-1.0.4-cp311-cp311-win_amd64.whl (683.4 kB view details)

Uploaded CPython 3.11Windows x86-64

zen_fronts-1.0.4-cp311-cp311-win32.whl (651.4 kB view details)

Uploaded CPython 3.11Windows x86

zen_fronts-1.0.4-cp311-cp311-musllinux_1_2_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

zen_fronts-1.0.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

zen_fronts-1.0.4-cp311-cp311-macosx_11_0_arm64.whl (720.2 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

zen_fronts-1.0.4-cp310-cp310-win_amd64.whl (683.2 kB view details)

Uploaded CPython 3.10Windows x86-64

zen_fronts-1.0.4-cp310-cp310-win32.whl (652.7 kB view details)

Uploaded CPython 3.10Windows x86

zen_fronts-1.0.4-cp310-cp310-musllinux_1_2_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

zen_fronts-1.0.4-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

zen_fronts-1.0.4-cp310-cp310-macosx_11_0_arm64.whl (722.7 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file zen_fronts-1.0.4.tar.gz.

File metadata

  • Download URL: zen_fronts-1.0.4.tar.gz
  • Upload date:
  • Size: 470.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for zen_fronts-1.0.4.tar.gz
Algorithm Hash digest
SHA256 494d96a8e4c45a797341badf5e63f1e0f1146ea4f0b5cc268e9edd03d77bada1
MD5 8bf589e217c659d6ba82e478bc9d73d7
BLAKE2b-256 afd5f20f15a219832414ded46410310c86c70a152eaf4fcf0c3058495bd59391

See more details on using hashes here.

Provenance

The following attestation bundles were made for zen_fronts-1.0.4.tar.gz:

Publisher: publish.yml on TovarnovM/zen_fronts

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zen_fronts-1.0.4-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: zen_fronts-1.0.4-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 675.1 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for zen_fronts-1.0.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 03894f04c39be0fd41d81bdad1ed6ad09b4a27188eb83fd8c21a2d1a3773f165
MD5 d9953487f4589ff465855944d8c096be
BLAKE2b-256 01a1ec7dba7884d5fd3941fc58753763fd6a8fed5cf8ae60265c6b98121476f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for zen_fronts-1.0.4-cp312-cp312-win_amd64.whl:

Publisher: publish.yml on TovarnovM/zen_fronts

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zen_fronts-1.0.4-cp312-cp312-win32.whl.

File metadata

  • Download URL: zen_fronts-1.0.4-cp312-cp312-win32.whl
  • Upload date:
  • Size: 641.7 kB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for zen_fronts-1.0.4-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 2c27664801a7023c413cbf121d879db93ebedd4cf0c133c93772548384b87deb
MD5 8454cf9327a9b24270a6d11caf849566
BLAKE2b-256 d755725b102c0d39eb925406efa7d56b8737986297a387246964a45073d9b8fe

See more details on using hashes here.

Provenance

The following attestation bundles were made for zen_fronts-1.0.4-cp312-cp312-win32.whl:

Publisher: publish.yml on TovarnovM/zen_fronts

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zen_fronts-1.0.4-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for zen_fronts-1.0.4-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2fde1e92b0f3d16c9c223d9cb1136a66ebd4619b56e126555f3451313b919cb0
MD5 73e5c67b3b4835b50c2d9b78a79cb682
BLAKE2b-256 7e704bf8e6383ae3b8650018277242a915582d5e7f99998ca6f442df8fc22775

See more details on using hashes here.

Provenance

The following attestation bundles were made for zen_fronts-1.0.4-cp312-cp312-musllinux_1_2_x86_64.whl:

Publisher: publish.yml on TovarnovM/zen_fronts

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zen_fronts-1.0.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for zen_fronts-1.0.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4476576edcfedec77120d82fec25137f132289140359b314e4f30e8ccbfc5e02
MD5 a11c71dada05862592c93bd48b7df6ea
BLAKE2b-256 6b5fc32c445ca4b243469f62656f2c0fa15c8e0d4fe8b4b9dbe933d4d40ee1b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for zen_fronts-1.0.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on TovarnovM/zen_fronts

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zen_fronts-1.0.4-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for zen_fronts-1.0.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6eef6e55b3748d3aeb5082d23769ce97ed963fe00b95c4d5aac4e80bf4b13ee8
MD5 c84b85bbce2d9b11ea9a990902b35531
BLAKE2b-256 50f5d8978da040ca43410a28dbf4dedc75446a5cd3e7c0f6ea9b6da3180d0d12

See more details on using hashes here.

Provenance

The following attestation bundles were made for zen_fronts-1.0.4-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: publish.yml on TovarnovM/zen_fronts

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zen_fronts-1.0.4-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: zen_fronts-1.0.4-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 683.4 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for zen_fronts-1.0.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 cd6c3db2ce34bb82a91188ff5ecf08acd06057e199c77d0ebd7d908d5e3b5d18
MD5 5d14ec006db36c645edd80f2dca6bc03
BLAKE2b-256 501c782adc4df4a4a72f95b204c33880958ecf948147970a0415297b476ae4b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for zen_fronts-1.0.4-cp311-cp311-win_amd64.whl:

Publisher: publish.yml on TovarnovM/zen_fronts

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zen_fronts-1.0.4-cp311-cp311-win32.whl.

File metadata

  • Download URL: zen_fronts-1.0.4-cp311-cp311-win32.whl
  • Upload date:
  • Size: 651.4 kB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for zen_fronts-1.0.4-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 dd70bfd34f3a5c9f7fd5fbd2830148308b03eed372b1107371794265681f33c7
MD5 c44908c59ff4b1f3e628ab7b627ab78b
BLAKE2b-256 7eccca98bf50b487620f5e28794f7f16a90962d9b4f237b504f7bc3ff3fb26dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for zen_fronts-1.0.4-cp311-cp311-win32.whl:

Publisher: publish.yml on TovarnovM/zen_fronts

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zen_fronts-1.0.4-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for zen_fronts-1.0.4-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2830c56f7e815d6b0a7a6ab9c3274d8ff01ca13376075baa6d6ef1cadfdae0c7
MD5 408314ce2b176abf89760e7e94b53a60
BLAKE2b-256 a9b9b99c2087f8df7eca7189b0a7d199c7fffa342405015e797a84f53e27fcc0

See more details on using hashes here.

Provenance

The following attestation bundles were made for zen_fronts-1.0.4-cp311-cp311-musllinux_1_2_x86_64.whl:

Publisher: publish.yml on TovarnovM/zen_fronts

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zen_fronts-1.0.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for zen_fronts-1.0.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 dd56aff73a3d3d15aab7a80c166b9bb41f0b0845570d68dc4275cc8a21ee3c7d
MD5 c2db9aa4851e815b74daee78ed5505e9
BLAKE2b-256 f5373bcdf114bb55d7136ac5d3052230d0c6378db2dd8039f4b9a6de47eb6974

See more details on using hashes here.

Provenance

The following attestation bundles were made for zen_fronts-1.0.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on TovarnovM/zen_fronts

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zen_fronts-1.0.4-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for zen_fronts-1.0.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8f7413ef5bc76cc6f60ef005f83b1d9e4062584b91ff92922f28778127a57ef1
MD5 1241439d5bd81e5f5f77fdc649e0a1dc
BLAKE2b-256 5cc3a723038afdca87aa761d53aa1f4d539ffe4833c3dc67fb09a439554d6b14

See more details on using hashes here.

Provenance

The following attestation bundles were made for zen_fronts-1.0.4-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: publish.yml on TovarnovM/zen_fronts

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zen_fronts-1.0.4-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: zen_fronts-1.0.4-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 683.2 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for zen_fronts-1.0.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6a1026770d5761180c7d989abfa6363d2dbb39e1b0ff8a84e9f12b46c93aab7c
MD5 285dda14daa030c44471dbac0a4fefe9
BLAKE2b-256 55fbadf19801c253bddb33c64c9a6b052dbdb1b5344e38e035902fcedb755848

See more details on using hashes here.

Provenance

The following attestation bundles were made for zen_fronts-1.0.4-cp310-cp310-win_amd64.whl:

Publisher: publish.yml on TovarnovM/zen_fronts

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zen_fronts-1.0.4-cp310-cp310-win32.whl.

File metadata

  • Download URL: zen_fronts-1.0.4-cp310-cp310-win32.whl
  • Upload date:
  • Size: 652.7 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for zen_fronts-1.0.4-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 d6387a31dbe497e0ef5010a0326aaaee5ccccb080abc2d4f7a1e507a812fefc5
MD5 a0767f41d9de529c3c0d2a308234042d
BLAKE2b-256 8a2c67a125555f79ad0e931a3ecffeec805eacb4fac59db380f09b74054de386

See more details on using hashes here.

Provenance

The following attestation bundles were made for zen_fronts-1.0.4-cp310-cp310-win32.whl:

Publisher: publish.yml on TovarnovM/zen_fronts

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zen_fronts-1.0.4-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for zen_fronts-1.0.4-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 99cd2d7d2ad1fe080966643d62880343874d073bc85ccb1a65a4531800402edd
MD5 2f64f27479e7016c8da841c785a2cd16
BLAKE2b-256 1478b04cefb97b179432eb3b61f0ed68619e0393c41ec20b52e85a75933c4e6a

See more details on using hashes here.

Provenance

The following attestation bundles were made for zen_fronts-1.0.4-cp310-cp310-musllinux_1_2_x86_64.whl:

Publisher: publish.yml on TovarnovM/zen_fronts

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zen_fronts-1.0.4-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for zen_fronts-1.0.4-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ca129ce0c3651788aabc26171fb11ad1d9699e8c5624da2f069c396a70d9d671
MD5 9423798b521ac627e2f948ba7a2076e8
BLAKE2b-256 7d8e424dd9f999f7c405b043b49f0097f01f8a2808db9b067a416684442725e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for zen_fronts-1.0.4-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on TovarnovM/zen_fronts

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zen_fronts-1.0.4-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for zen_fronts-1.0.4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0ef7cc00c06750e9364e46f34302dff1d5f5c002ca864d8db838f2d01c5ae2a9
MD5 31d195f3d4890aadda7e5a604e48efac
BLAKE2b-256 7dec415a10893e71235804f51c95ed2d143bc4129f8ec4f09a6850b86198e7c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for zen_fronts-1.0.4-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: publish.yml on TovarnovM/zen_fronts

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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