Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions skills/_bootstrap_skill.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
name: _bootstrap_skill
description: Meta-skill the agent runs when a user requests a lensing capability that isn't covered by an existing skill. Walks through confirming scope, identifying source repos, reading the relevant API, drafting the new skill in the the workspace house style, adding any missing wiki content, and registering the skill in the index. Use only when a genuinely new skill is needed — don't invoke for variants that an existing skill already handles.
description: Meta-skill the agent runs when a user requests a lensing capability that isn't covered by an existing skill. Walks through confirming scope, identifying source repos, reading the relevant API, drafting the new skill in the workspace house style, adding any missing wiki content, and registering the skill in the index. Use only when a genuinely new skill is needed — don't invoke for variants that an existing skill already handles.
---

# Bootstrapping a new the workspace skill
# Bootstrapping a new workspace skill

When the user wants something this workspace can't already do, your job is to create a
new skill that can do it, and to teach the user the underlying API along the way. This
Expand Down
4 changes: 2 additions & 2 deletions skills/_style.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
name: _style
description: Writing guide for every the workspace skill. Read first before adding or revising a skill. Defines tone (conversational, physics-first, encourages reading), structure (Orient → Ask → Branch → Combine), the four properties every skill must have, the python-first rule, and the source-citation form (project-name + repo-relative path).
description: Writing guide for every workspace skill. Read first before adding or revising a skill. Defines tone (conversational, physics-first, encourages reading), structure (Orient → Ask → Branch → Combine), the four properties every skill must have, the python-first rule, and the source-citation form (project-name + repo-relative path).
---

# How to write a the workspace skill
# How to write a workspace skill

This file is a meta-skill: it does not help a user run a lensing task directly. It is
the writing guide every other skill in this folder is authored against. Read it before
Expand Down
5 changes: 3 additions & 2 deletions skills/contribute-upstream.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,11 @@ Commit conventions:

- Subject must follow the repo's conventional style: `feat:`, `fix:`, `docs:`, `chore:`.
- The body explains **why**, not just what changed.
- Include the required trailer:
- Include the required trailer, naming the **current session's model** (per `AGENTS.md`
"Commit cadence"), e.g.:

```text
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude <model name> <noreply@anthropic.com>
```

If hooks fail, fix the underlying issue and create a new commit. Do not use `--no-verify`.
Expand Down
11 changes: 6 additions & 5 deletions skills/start-new-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ Store as `PROJECT_NAME`.
Store as `PROJECT_DESCRIPTION`.

### 3. Datasets
> **Datasets to include?** They live under `dataset/<sample>/<dataset_name>/` (`<sample>` a
> grouping dir, e.g. `imaging/`); each needs at least `data.fits`, `noise_map.fits`,
> `info.json` (see `wiki/core/operations/dataset.md`). Point me at paths to copy, or skip and
> add later.
> **Datasets to include?** In a project they live under `data/<sample>/<dataset_name>/`
> (`<sample>` a grouping dir, e.g. `imaging/`; the assistant clone's equivalent folder is
> `dataset/`); each needs at least `data.fits`, `noise_map.fits`, `info.json` (see
> `wiki/core/operations/dataset.md`). Point me at paths to copy, or skip and add later.

### 4. Modeling scripts
> **Modeling scripts?** They live in `scripts/`, normally adapted from `autolens_workspace`.
Expand All @@ -66,7 +66,8 @@ reproducible-science subset; generate the thin assistant layer; refer back for e
- `config/` (PyAutoConf YAML — required: pipelines `conf.instance.push(config, output)`)
- `activate.sh` (sourced locally and by HPC batch scripts)
- `scripts/` (the chosen pipeline(s), or empty + `/init-slam` later)
- datasets (Step 3) into `dataset/<sample>/...`
- datasets (Step 3) into `data/<sample>/...` (the project's tracked-by-README data tree —
see the `.gitignore` below and the Publish gate, which audits `git ls-files data/`)

**Generate the lean project tree:**
```
Expand Down
9 changes: 5 additions & 4 deletions wiki/core/api/searches.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ Source: `PyAutoFit:autofit/non_linear/search/mle/drawer.py`.
| Production, multi-modal expected | `Nautilus(n_live=400)` |
| Bayesian evidence comparison | `Nautilus` or `DynestyStatic` |
| Posterior refinement around known mode | `Emcee` or `Zeus` |
| Very high-D (>50 params) | `UltraNest` |
| Find a starting point fast | `PySwarms` or `BFGS` |
| Very high-D (>50 params) | `Nautilus(n_live=400+)` |
| Find a starting point fast | `BFGS` or `LBFGS` |
| Check that the prior is sane | `Drawer` |

## Shared knobs
Expand All @@ -160,8 +160,9 @@ Every search accepts:
- `name: str` — identifier; combined with the model hash to form `unique_id`.
- `unique_tag: Optional[str]` — extra discriminator for runs that share path + name.
- `number_of_cores: int` — parallel likelihood evals.
- `iterations_per_update: int` — checkpoint cadence.
- `force_pickle_overwrite: bool` — overwrite on restart.
- `iterations_per_quick_update: int` / `iterations_per_full_update: int` — checkpoint
cadence (quick intermediate writes vs full output + visualisation).
- `silence: bool` — suppress console output.

See `PyAutoFit:autofit/non_linear/search/abstract_search.py` for the common base
class.
Expand Down
15 changes: 9 additions & 6 deletions wiki/core/concepts/non_linear_search.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ PyAutoFit groups searches into three families.
Estimates the Bayesian evidence by sweeping a shrinking iso-likelihood surface.
Naturally handles multi-modal posteriors. The right default for lensing.

- **Nautilus** — fast, modern, well-tuned. The workspace' default.
- **Nautilus** — fast, modern, well-tuned. The workspace's default.
- **DynestyStatic / DynestyDynamic** — alternative, well-tested.
- **UltraNest** — reactive, scales to higher dimensions.

(UltraNest is not currently exposed as a public `autofit` search class — see
[`../api/searches.md`](../api/searches.md).)

### MCMC

Expand All @@ -50,10 +52,11 @@ Finds the single max-likelihood point. No posterior; no errors. Used for
exploration, gradient-based refinement, or producing a starting point for an MCMC
chain.

- **BFGS** — gradient descent.
- **PySwarms** — particle swarm.
- **BFGS / LBFGS** — gradient descent (LBFGS = limited-memory variant).
- **Drawer** — random prior draws. Debugging only.

(PySwarms is not currently exposed as a public `autofit` search class.)

## When to use which

| Situation | Pick |
Expand All @@ -62,8 +65,8 @@ chain.
| Production posterior, multi-modal expected | `Nautilus` (n_live=300+) |
| Posterior refinement around a known mode | `Emcee` or `Zeus` |
| Bayesian evidence comparison | `Nautilus` or `DynestyStatic` |
| Very high-dim model (>50 free parameters) | `UltraNest` |
| Fast exploration / sanity check | `PySwarms` or `BFGS` |
| Very high-dim model (>50 free parameters) | `Nautilus` (n_live=400+) |
| Fast exploration / sanity check | `BFGS` or `LBFGS` |
| Confirming the prior gives reasonable models | `Drawer` |

## Prior chaining
Expand Down
5 changes: 3 additions & 2 deletions wiki/core/concepts/samples_and_posteriors.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ Source: `PyAutoFit:autofit/non_linear/samples/`.

The flavour of `Samples` depends on the search:

- **`SamplesNest`** — nested-sampler output (Nautilus, Dynesty, UltraNest).
- **`SamplesNest`** — nested-sampler output (Nautilus, Dynesty).
- **`SamplesMCMC`** — Emcee, Zeus.
- **`SamplesMLE`** — BFGS, PySwarms, Drawer.
- The optimizers (BFGS / LBFGS, Drawer) return a plain `Samples` without
posterior semantics (no `SamplesMLE` class is exposed).

All share the same accessor API.

Expand Down
4 changes: 2 additions & 2 deletions wiki/core/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ Physics + framework material the skills lean on.
Task-oriented catalogues — comprehensive lists of what's available, with one-line
"when to use" notes.

- [Non-linear searches](./api/searches.md) — Nautilus, Dynesty, Emcee, Zeus,
UltraNest, PySwarms, BFGS, Drawer.
- [Non-linear searches](./api/searches.md) — Nautilus, Dynesty (static/dynamic),
Emcee, Zeus, BFGS/LBFGS, Drawer.
- [Light profile catalogue](./api/light_profile_catalog.md).
- [Mass profile catalogue](./api/mass_profile_catalog.md).
- [Datasets](./api/datasets.md) — Imaging, Interferometer, PointDataset.
Expand Down
Loading