From 36d21dee7e595750721f2f7b5e0dffcd6c0dfc0f Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Tue, 24 Nov 2026 21:18:31 +0000 Subject: [PATCH] feat: runtime estimator, runtime_estimates.yaml and the memory cap hook (5E-3) Ships autolens/config/runtime_estimates.yaml (v2, from the autolens_profiling exporter), a cached schema-checked loader, the ported autolens_inference wall model, al.RuntimeEstimate / al.estimate_runtime and al.Setup. Lens analyses implement runtime_estimate() (the Estimate: line PyAutoFit logs after the Parallel: banner) and resources_per_eval() (5D's memory cap). Rows are matched by decision_id + setup_id and nearest instrument size, otherwise a band; labels say Nautilus heuristic / uncalibrated / no estimate. Closes #887 (likelihood-lifecycle phase 5E-3). Co-Authored-By: Claude Opus 5.5 --- autolens/__init__.py | 4 + autolens/analysis/analysis/dataset.py | 3 +- autolens/analysis/runtime_estimate.py | 704 ++++++ autolens/analysis/wall_model.py | 130 + autolens/config/runtime_estimates.yaml | 2233 +++++++++++++++++ autolens/point/model/analysis.py | 5 +- autolens/weak/model/analysis.py | 5 +- .../analysis/test_runtime_estimate.py | 513 ++++ 8 files changed, 3594 insertions(+), 3 deletions(-) create mode 100644 autolens/analysis/runtime_estimate.py create mode 100644 autolens/analysis/wall_model.py create mode 100644 autolens/config/runtime_estimates.yaml create mode 100644 test_autolens/analysis/test_runtime_estimate.py diff --git a/autolens/__init__.py b/autolens/__init__.py index e661fbb57..1978fb27b 100644 --- a/autolens/__init__.py +++ b/autolens/__init__.py @@ -139,6 +139,10 @@ from .weak.model.analysis import AnalysisWeak from .weak.simulator import SimulatorShearYX +from autoarray.setup.setup import Setup +from .analysis.runtime_estimate import RuntimeEstimate +from .analysis.runtime_estimate import estimate_runtime + from . import exc from . import mock as m from . import util diff --git a/autolens/analysis/analysis/dataset.py b/autolens/analysis/analysis/dataset.py index 686d7cc3a..824a56cec 100644 --- a/autolens/analysis/analysis/dataset.py +++ b/autolens/analysis/analysis/dataset.py @@ -28,6 +28,7 @@ from autogalaxy.analysis.analysis.dataset import AnalysisDataset as AgAnalysisDataset from autolens.analysis.analysis.lens import AnalysisLens +from autolens.analysis.runtime_estimate import AnalysisRuntimeEstimate from autolens.analysis.result import ResultDataset from autolens.analysis.positions import PositionsLH @@ -39,7 +40,7 @@ logger.setLevel(level="INFO") -class AnalysisDataset(AgAnalysisDataset, AnalysisLens): +class AnalysisDataset(AnalysisRuntimeEstimate, AgAnalysisDataset, AnalysisLens): @staticmethod def _save_dataset_fits(paths: af.AbstractPaths, hdu_list: HDUList) -> None: """Save the dataset for directory and database aggregators.""" diff --git a/autolens/analysis/runtime_estimate.py b/autolens/analysis/runtime_estimate.py new file mode 100644 index 000000000..a9287f079 --- /dev/null +++ b/autolens/analysis/runtime_estimate.py @@ -0,0 +1,704 @@ +""" +A run-time estimate for a lens model-fit, before it runs: `al.estimate_runtime(...)`. + +The estimate joins three things: + +- **The profiled per-evaluation cost** of the likelihood under the fit's compute setup, read from + `autolens/config/runtime_estimates.yaml` (schema `runtime-estimates`, version 2). That file is + generated by the autolens_profiling exporter (`scripts/misc/tooling/export_runtime_estimates.py + --copy-to`) from the PyAutoPulse snapshot; it is never edited by hand. +- **The expected number of evaluations**, from the Nautilus heuristic of the calibrated wall model + (`autolens.analysis.wall_model`, ported from autolens_inference `scripts/misc/wall/model.py`). Other + samplers get no estimate. +- **The parallel efficiency** of numba workers under Nautilus (the curve in the yaml header). + +Row matching (design call 2 of PyAutoLens#887): + +1. Rows with the setup's `decision_id` and `setup_id` (a setup chosen by `setup="auto"`). When the setup + has no decision (written by hand, or `PYAUTO_SETUP`), rows with its `setup_id`, the hardware class of + the setup (its `hardware_class`, else `cpu_many_core` / `gpu_a100` by device) and the analysis's + likelihood (`/`, or every likelihood of the dataset type when unknown). +2. Among those, the nearest instrument by size, in log distance: the masked image pixels of an imaging + dataset against `n_pixels_masked`, the visibilities of an interferometer dataset against `n_vis`. +3. When there is no size to match (point source, weak lensing, or a dataset giving none) and several + rows remain, the estimate is a min-max band across them; the memory cap uses the largest + `peak_rss_gb`. + +The analyses report the estimate through `AnalysisRuntimeEstimate`, a mixin on the lens analyses that +resolve a setup (imaging, interferometer, point, weak). PyAutoFit calls its duck-typed +`runtime_estimate(search, model, number_of_cores)` after the fit's `Parallel:` banner and its +`resources_per_eval()` when it resolves `number_of_cores="auto"`. +""" + +import functools +import logging +import math +from dataclasses import dataclass +from pathlib import Path +from typing import Dict, List, Optional, Tuple + +import yaml + +import autoarray as aa +from autoarray.setup.setup import setup_from + +from autolens.analysis import wall_model + +logger = logging.getLogger(__name__) + +RUNTIME_ESTIMATES_PATH = ( + Path(__file__).resolve().parent.parent / "config" / "runtime_estimates.yaml" +) + +RUNTIME_ESTIMATES_SCHEMA = "runtime-estimates" +RUNTIME_ESTIMATES_VERSION = 2 + +EVALS_MODEL = "nautilus-heuristic" + +#: Dataset types whose held-out check failed (interferometer 0.19-0.45x, weak 0.50-0.52x), plus datacube, +#: which has no phase-4 rows at all. +UNCALIBRATED_HELD_OUT = ("interferometer", "weak", "datacube") +UNCALIBRATED_NOTE = "uncalibrated (held-out 0.2–0.5×)" + +#: Dataset types whose size is a visibility count; every other type is sized by masked image pixels. +VISIBILITY_DATASET_TYPES = ("interferometer", "datacube") + +#: The dataset type of a point dataset whose positions fit is unknown: every `point_source_*` row. +POINT_DATASET_TYPE = "point" + +HARDWARE_CLASS_BY_DEVICE = {"cpu": "cpu_many_core", "gpu": "gpu_a100"} + + +@functools.lru_cache(maxsize=None) +def _load(path: str) -> Tuple[Tuple[dict, ...], Dict[int, float], str]: + with open(path) as f: + data = yaml.safe_load(f) + + schema = data.get("schema") if isinstance(data, dict) else None + version = data.get("version") if isinstance(data, dict) else None + + if schema != RUNTIME_ESTIMATES_SCHEMA or version != RUNTIME_ESTIMATES_VERSION: + raise ValueError( + f"The run-time estimates file {path} has schema {schema!r} version {version!r}; " + f"PyAutoLens reads schema {RUNTIME_ESTIMATES_SCHEMA!r} version " + f"{RUNTIME_ESTIMATES_VERSION}. Regenerate it with the autolens_profiling exporter " + f"(scripts/misc/tooling/export_runtime_estimates.py --copy-to )." + ) + + curve = wall_model.PARALLEL_EFFICIENCY + header = data.get("parallel_efficiency") or {} + try: + if header.get("curve"): + curve = {int(k): float(v) for k, v in header["curve"].items()} + except (AttributeError, TypeError, ValueError): + curve = wall_model.PARALLEL_EFFICIENCY + + return tuple(data.get("estimates") or ()), curve, str(data.get("tag")) + + +def load_runtime_estimates(path=None) -> dict: + """ + The run-time estimates table, loaded once per path and cached. + + Returns a dict with `rows` (a list of row dicts), `curve` (the numba parallel-efficiency curve + `{cores: efficiency}`, from the header or the ported fallback) and `tag` (the release pin the rows + were profiled on). + + Raises + ------ + ValueError + If the file is not schema `runtime-estimates` version 2. + """ + rows, curve, tag = _load(str(path or RUNTIME_ESTIMATES_PATH)) + return {"rows": [dict(row) for row in rows], "curve": dict(curve), "tag": tag} + + +@dataclass +class RuntimeEstimate: + """ + A run-time estimate for one fit. + + `wall_seconds` is the central estimate (a matched or single row); for a band it is `None` and + `wall_band` holds `(min, max)` seconds across the candidate rows. `ms_per_eval` is the profiled + per-evaluation cost of the matched row (the lower end of the band otherwise; `ms_per_eval_band` holds + both ends). `expected_evals` and the walls are `None` when the search is not Nautilus or the model is + unknown. + """ + + ms_per_eval: Optional[float] + record_id: Optional[str] + instrument: Optional[str] + matched_by: str + expected_evals: Optional[int] + evals_model: str + parallel_efficiency: Optional[float] + number_of_cores: int + wall_seconds: Optional[float] + wall_band: Optional[Tuple[float, float]] + calibrated: bool + note: Optional[str] = None + likelihood: Optional[str] = None + setup_id: Optional[str] = None + backend: Optional[str] = None + search_name: Optional[str] = None + n_live: Optional[int] = None + ms_per_eval_band: Optional[Tuple[float, float]] = None + expected_evals_band: Optional[Tuple[int, int]] = None + band_across: Optional[str] = None + supported_search: bool = True + + def line(self) -> str: + """ + The estimate as one log line, e.g. + + `Estimate: ~1.9 ms/eval (hst cell) · Nautilus n_live=150 ≈ 2.1e5 evals (heuristic) · η=0.55 on + 8 cores · ~7 min on this hardware` + """ + parts = [] + + if self.ms_per_eval_band is not None: + low, high = self.ms_per_eval_band + parts.append(f"~{_ms(low)}–{_ms(high)} ms/eval") + elif self.ms_per_eval is not None: + parts.append(f"~{_ms(self.ms_per_eval)} ms/eval ({self.instrument} cell)") + + if not self.supported_search: + parts.append( + f"no estimate for {self.search_name} (run-time model covers Nautilus only)" + ) + return "Estimate: " + " · ".join(parts) + + if self.expected_evals_band is not None: + low, high = self.expected_evals_band + parts.append( + f"Nautilus n_live={self.n_live} ≈ {_evals(low)}–{_evals(high)} evals " + f"(heuristic)" + ) + elif self.expected_evals is not None: + parts.append( + f"Nautilus n_live={self.n_live} ≈ {_evals(self.expected_evals)} evals (heuristic)" + ) + + if self.parallel_efficiency is not None: + cores = "core" if self.number_of_cores == 1 else "cores" + parts.append( + f"η={self.parallel_efficiency:.2f} on {self.number_of_cores} {cores}" + ) + elif self.backend == "jax": + parts.append("1 worker (JAX)") + + if self.wall_seconds is not None: + parts.append(f"~{_duration(self.wall_seconds)} on this hardware") + elif self.wall_band is not None: + low, high = self.wall_band + parts.append( + f"~{_duration_band(low, high)} (no size match; range across " + f"{self.band_across or 'instruments'})" + ) + + if not self.calibrated: + parts.append(self.note or UNCALIBRATED_NOTE) + + return "Estimate: " + " · ".join(parts) + + +def _evals(value: int) -> str: + mantissa, exponent = f"{value:.1e}".split("e") + return f"{mantissa}e{int(exponent)}" + + +def _ms(value: float) -> str: + if value >= 10: + return f"{value:.0f}" + return f"{value:.2g}" + + +def _unit(seconds: float) -> Tuple[float, str]: + if seconds < 90: + return 1.0, "s" + if seconds < 90 * 60: + return 60.0, "min" + if seconds < 48 * 3600: + return 3600.0, "h" + return 86400.0, "d" + + +def _fmt(value: float) -> str: + return f"{value:.0f}" if value >= 10 else f"{value:.2g}" + + +def _duration(seconds: float) -> str: + scale, unit = _unit(seconds) + return f"{_fmt(seconds / scale)} {unit}" + + +def _duration_band(low: float, high: float) -> str: + scale, unit = _unit(high) + return f"{_fmt(low / scale)}–{_fmt(high / scale)} {unit}" + + +def _is_nautilus(search) -> bool: + try: + import autofit as af + + if isinstance(search, af.Nautilus): + return True + except Exception: + pass + return "nautilus" in type(search).__name__.lower() + + +def _n_live(search) -> Optional[int]: + n_live = getattr(search, "n_live", None) + if n_live is None: + try: + from autonerves import conf + + n_live = conf.instance["non_linear"]["nest"]["Nautilus"]["search"]["n_live"] + except Exception: + n_live = None + try: + return int(n_live) if n_live is not None else None + except (TypeError, ValueError): + return None + + +def dataset_type_from(dataset) -> Optional[str]: + """ + The dataset type of the run-time table for a dataset: `imaging`, `interferometer`, `weak`, `point` + (the family `point_source_image` / `point_source_source`, which the positions fit decides) or `None` + for an unknown dataset. + """ + if isinstance(dataset, aa.Imaging): + return "imaging" + if isinstance(dataset, aa.Interferometer): + return "interferometer" + from autolens.weak.dataset import WeakDataset + + if isinstance(dataset, WeakDataset): + return "weak" + from autolens.point.dataset import PointDataset + + if isinstance(dataset, PointDataset): + return POINT_DATASET_TYPE + return None + + +def likelihood_from(dataset, model) -> Optional[str]: + """ + The `/` likelihood of a dataset and model, as the setup rules key it, or + `None` when it cannot be worked out (a point dataset needs its analysis's positions fit). + """ + from autolens.point.dataset import PointDataset + + if isinstance(dataset, PointDataset): + return None + + dataset_type = dataset_type_from(dataset) + + if dataset_type == "weak": + return "weak/isothermal" + + if dataset_type in ("imaging", "interferometer") and model is not None: + try: + from autogalaxy.analysis import setup_util + + key, _ = setup_util.setup_key_and_note_from(dataset=dataset, model=model) + return "/".join(key) + except Exception: + return None + + return None + + +def dataset_size_from(dataset, dataset_type: Optional[str]) -> Optional[float]: + """ + The size the run-time table matches instruments by: visibilities for an interferometer (or datacube) + dataset, masked image pixels for every imaging-type dataset; `None` when the dataset gives none. + """ + if dataset is None: + return None + try: + if dataset_type in VISIBILITY_DATASET_TYPES: + uv = getattr(dataset, "uv_wavelengths", None) + if uv is not None: + return float(uv.shape[0]) + return float(len(dataset.data)) + mask = getattr(dataset, "mask", None) + if mask is not None and hasattr(mask, "pixels_in_mask"): + return float(mask.pixels_in_mask) + except Exception: + return None + return None + + +def candidate_rows( + setup: aa.Setup, + likelihood: Optional[str] = None, + dataset_type: Optional[str] = None, + rows: Optional[List[dict]] = None, +) -> List[dict]: + """ + The run-time table rows a setup can be priced by, before size matching (see the module docstring). + """ + rows = load_runtime_estimates()["rows"] if rows is None else rows + + setup_id = setup.setup_id + + if setup.decision_id is not None: + matched = [ + row + for row in rows + if row.get("decision_id") == setup.decision_id + and row.get("setup_id") == setup_id + ] + if matched: + return matched + + hardware_class = setup.hardware_class or HARDWARE_CLASS_BY_DEVICE.get(setup.device) + + def wanted(row): + if row.get("setup_id") != setup_id: + return False + if hardware_class is not None and row.get("hardware_class") != hardware_class: + return False + row_likelihood = row.get("likelihood") or "" + if likelihood is not None: + return row_likelihood == likelihood + if dataset_type == POINT_DATASET_TYPE: + return row_likelihood.startswith("point_source_") + if dataset_type is not None: + return row_likelihood.split("/")[0] == dataset_type + return True + + return [row for row in rows if wanted(row)] + + +def match_rows( + candidates: List[dict], size: Optional[float] +) -> Tuple[List[dict], str]: + """ + The rows a fit is priced by and how they were chosen: `"single"` (one candidate), `"size"` (the + nearest instrument by log size) or `"band"` (several rows, no size to tell them apart). + """ + if len(candidates) <= 1: + return candidates, "single" + + if size is not None and size > 0: + sized = [] + for row in candidates: + dataset_type = _row_dataset_type(row) + field = ( + "n_vis" if dataset_type in VISIBILITY_DATASET_TYPES else "n_pixels_masked" + ) + value = row.get(field) + if value: + sized.append((abs(math.log(size) - math.log(float(value))), row)) + if sized: + nearest = min(distance for distance, _ in sized) + matched = [row for distance, row in sized if distance == nearest] + if len(matched) == 1: + return matched, "size" + return matched, "band" + + return candidates, "band" + + +def _row_dataset_type(row: dict) -> str: + return (row.get("likelihood") or "").split("/")[0] + + +def _per_call_s(row: dict) -> float: + override = wall_model.PER_CALL_OVERRIDE.get(row.get("record_id")) + if override is not None: + return override[0] + return float(row["ms_per_eval"]) / 1000.0 + + +def _wall_s(row: dict, evals: int, backend: str, cores: int, curve) -> float: + likelihood = row.get("likelihood") or "/" + dataset_type, _, variant = likelihood.partition("/") + per_eval = wall_model.PER_EVAL_OVERRIDE.get( + (dataset_type, variant, row.get("host_class")) + ) + if per_eval is not None: + stage = evals * per_eval[0] + else: + price = wall_model.effective_per_call( + _per_call_s(row), backend=backend, cores=cores, curve=curve + ) + stage = wall_model.stage_seconds(evals, price) + return wall_model.job_seconds([stage]) + + +def matched_rows_for( + dataset, model, setup: aa.Setup, likelihood: Optional[str] = None, rows=None +) -> Tuple[List[dict], List[dict], str]: + """ + `(candidates, matched, matched_by)` for a dataset, model and setup: the candidate rows of + `candidate_rows` and the rows `match_rows` prices the fit by. + """ + if likelihood is None: + likelihood = likelihood_from(dataset=dataset, model=model) + + dataset_type = ( + likelihood.split("/")[0] if likelihood else dataset_type_from(dataset) + ) + + candidates = candidate_rows( + setup=setup, likelihood=likelihood, dataset_type=dataset_type, rows=rows + ) + + candidate_types = {_row_dataset_type(row) for row in candidates} + if len(candidate_types) == 1: + dataset_type = candidate_types.pop() + + matched, matched_by = match_rows( + candidates, dataset_size_from(dataset, dataset_type) + ) + return candidates, matched, matched_by + + +def estimate_runtime( + dataset, + model, + search, + setup, + number_of_cores: int = 1, + likelihood: Optional[str] = None, +) -> Optional[RuntimeEstimate]: + """ + Estimate how long a Nautilus fit of `model` to `dataset` under the compute `setup` takes. + + Parameters + ---------- + dataset + The dataset fitted (an `al.Imaging`, `al.Interferometer`, `al.PointDataset` or + `al.WeakDataset`), used for its dataset type and size. + model + The model fitted: its `prior_count` sets the dimension of the Nautilus heuristic and its + pixelization the likelihood variant. + search + The non-linear search: only `af.Nautilus` gets an estimate (its `n_live`); any other search gets + an estimate whose line says there is none. + setup + The compute setup, an `al.Setup` or a setup_id string (e.g. `"numba_cpu_sparse_fp64"`). + number_of_cores + The worker count of the fit. For a numba setup the per-call is divided by + `cores * efficiency(cores)`; a JAX setup runs one worker and uses its per-call as is. + likelihood + The `/` likelihood, when the caller knows it (the analyses pass their setup + rule key); otherwise it is worked out from the dataset and model. + + Returns + ------- + A `RuntimeEstimate`, or `None` when there is no setup or the table has no row for it. + """ + setup = setup_from(setup) + if setup is None: + return None + + table = load_runtime_estimates() + curve = table["curve"] + + candidates, matched, matched_by = matched_rows_for( + dataset=dataset, + model=model, + setup=setup, + likelihood=likelihood, + rows=table["rows"], + ) + if not candidates: + return None + + backend = setup.backend + is_jax = backend == "jax" + cores = 1 if is_jax else max(1, int(number_of_cores or 1)) + + efficiency = ( + wall_model.parallel_efficiency(cores, curve=curve) + if backend == "numba" + else None + ) + + matched_types = sorted({_row_dataset_type(r) for r in matched}) + held_out = [t for t in matched_types if t in UNCALIBRATED_HELD_OUT] + no_factor = [ + t + for t in matched_types + if t not in wall_model.EVALS_FACTOR and t not in UNCALIBRATED_HELD_OUT + ] + calibrated = not held_out and not no_factor + if calibrated: + note = None + elif held_out: + note = UNCALIBRATED_NOTE + else: + note = f"uncalibrated (no evaluations factor for {', '.join(no_factor)})" + + ms_values = [float(row["ms_per_eval"]) for row in matched] + is_band = matched_by == "band" + row = matched[0] + + likelihoods = {r.get("likelihood") for r in matched} + band_across = "instruments" if len(likelihoods) == 1 else "likelihoods" + + estimate = RuntimeEstimate( + ms_per_eval=min(ms_values) if is_band else float(row["ms_per_eval"]), + record_id=None if is_band else row.get("record_id"), + instrument=None if is_band else row.get("instrument"), + matched_by=matched_by, + expected_evals=None, + evals_model=EVALS_MODEL, + parallel_efficiency=efficiency, + number_of_cores=cores, + wall_seconds=None, + wall_band=None, + calibrated=calibrated, + note=note, + likelihood=row.get("likelihood") if len(likelihoods) == 1 else None, + setup_id=setup.setup_id, + backend=backend, + search_name=type(search).__name__, + ms_per_eval_band=(min(ms_values), max(ms_values)) if is_band else None, + band_across=band_across if is_band else None, + ) + + if not _is_nautilus(search): + estimate.supported_search = False + estimate.evals_model = "none" + estimate.note = ( + f"no estimate for {type(search).__name__} (run-time model covers Nautilus only)" + ) + return estimate + + n_live = _n_live(search) + prior_count = getattr(model, "prior_count", None) + estimate.n_live = n_live + + if n_live is None or not prior_count: + return estimate + + evals = [ + wall_model.stage_evals(int(prior_count), n_live, _row_dataset_type(r)) + for r in matched + ] + estimate.expected_evals = evals[0] + if min(evals) != max(evals): + estimate.expected_evals = min(evals) + estimate.expected_evals_band = (min(evals), max(evals)) + + walls = [_wall_s(r, e, backend, cores, curve) for r, e in zip(matched, evals)] + + if is_band: + estimate.wall_band = (min(walls), max(walls)) + else: + estimate.wall_seconds = walls[0] + + return estimate + + +def resources_per_eval_from(rows: List[dict], matched_by: str) -> Optional[dict]: + """ + `{"cpus_per_eval", "peak_rss_gb"}` of the matched row, or for a band the largest of each across the + candidate rows (the conservative memory cap); `None` when neither is known. + """ + if not rows: + return None + + def largest(name): + values = [r.get(name) for r in rows if r.get(name)] + return max(values) if values else None + + if matched_by == "band": + cpus, peak = largest("cpus_per_eval"), largest("peak_rss_gb") + else: + cpus, peak = rows[0].get("cpus_per_eval"), rows[0].get("peak_rss_gb") + + if cpus is None and peak is None: + return None + return {"cpus_per_eval": cpus, "peak_rss_gb": peak} + + +class AnalysisRuntimeEstimate: + """ + Mixin giving a lens analysis that resolves a compute `setup` the two PyAutoFit hooks of the + run-time estimator: + + - `runtime_estimate(search, model, number_of_cores)`: the one `Estimate:` line PyAutoFit logs after + the fit's `Parallel:` banner (`autofit.non_linear.search.runtime.resolve_fit_parallel`). + - `resources_per_eval()`: `{"cpus_per_eval", "peak_rss_gb"}` of the matched profiling row, which + PyAutoFit uses to cap `number_of_cores="auto"` on a non-JAX analysis. + + Both return `None` when the analysis has no resolved setup, and neither ever raises. The mixin goes + first in the bases so its `resolve_setup` (which remembers the model, for the likelihood variant) + wraps PyAutoGalaxy's `AnalysisSetupMixin.resolve_setup`. + """ + + def resolve_setup(self, model): + self._runtime_estimate_model = model + return super().resolve_setup(model=model) + + def _runtime_likelihood_from(self, model) -> Optional[str]: + """ + The `/` setup rule key of this analysis, or `None` when unknown. A point or + weak analysis keys on its own settings (`setup_key_from`); an imaging or interferometer analysis + needs the model for its variant. + """ + try: + if hasattr(self, "setup_key_from"): + key = self.setup_key_from(model) + elif model is None: + return None + else: + key = self.setup_key_and_note_from(model)[0] + return "/".join(key) + except Exception: + return None + + def _runtime_estimate_from(self, search, model, number_of_cores): + setup = getattr(self, "setup", None) + if setup is None: + return None + if model is None: + model = getattr(self, "_runtime_estimate_model", None) + return estimate_runtime( + dataset=getattr(self, "dataset", None), + model=model, + search=search, + setup=setup, + number_of_cores=number_of_cores, + likelihood=self._runtime_likelihood_from(model), + ) + + def runtime_estimate(self, search, model=None, number_of_cores=1) -> Optional[str]: + """ + The `Estimate:` line for this fit (see `al.estimate_runtime`), or `None` without a setup. + """ + try: + estimate = self._runtime_estimate_from(search, model, number_of_cores) + except Exception as e: + logger.debug(f"Run-time estimate failed and was ignored: {e!r}") + return None + return None if estimate is None else estimate.line() + + def resources_per_eval(self) -> Optional[dict]: + """ + `{"cpus_per_eval", "peak_rss_gb"}` of the profiling row matched to this analysis's setup and + dataset (the largest across the candidate rows when no row is matched), or `None` without a setup. + """ + try: + setup = getattr(self, "setup", None) + if setup is None: + return None + model = getattr(self, "_runtime_estimate_model", None) + _, matched, matched_by = matched_rows_for( + dataset=getattr(self, "dataset", None), + model=model, + setup=setup, + likelihood=self._runtime_likelihood_from(model), + ) + return resources_per_eval_from(matched, matched_by) + except Exception as e: + logger.debug(f"resources_per_eval failed and was ignored: {e!r}") + return None diff --git a/autolens/analysis/wall_model.py b/autolens/analysis/wall_model.py new file mode 100644 index 000000000..9726e7951 --- /dev/null +++ b/autolens/analysis/wall_model.py @@ -0,0 +1,130 @@ +""" +The calibrated wall model behind `al.estimate_runtime`: how long a Nautilus fit takes, before it runs. + +Ported (constants and functions unchanged) from the autolens_inference repo, +`scripts/misc/wall/model.py` (autolens_inference#69, release pin 2026.10.25.1, fitted 2026-11-16). +Read that file for the derivation; the short version: + +For one stage with `d` free parameters and `n_live` live points:: + + evals = EVALS_A * n_live * d ** EVALS_B * EVALS_FACTOR[dataset_type] + seconds = evals * (FLOOR_S + price) + +and a job is `STARTUP_S` plus the sum of its stages. `price` is the per-call the fit pays: the +profiled per-call, divided by `cores * PARALLEL_EFFICIENCY[cores]` for numba (one process per Nautilus +worker); a JAX per-call already prices one evaluation on its device and is used as is. + +**Validity.** The model covers Nautilus only (with the phase-4 settings). It is calibrated in-sample: +0.56-1.59x on the phase-4 legs it was fitted to. Held out (a dataset type's own `EVALS_FACTOR` removed), +interferometer read 0.19-0.45x and weak 0.50-0.52x, so those dataset types are labelled uncalibrated. A +dataset type with no phase-4 row takes `EVALS_FACTOR` 1.0, an uncalibrated default. +""" + +from typing import Dict, List, Optional, Tuple + +#: evals = EVALS_A * n_live * d ** EVALS_B (least squares in log space over 231 completed, +#: non-resumed phase-4 stages outside interferometer; 2026-11-16). +EVALS_A = 4.30 +EVALS_B = 1.637 + +#: The median of measured / law evaluations per dataset type, over its phase-4 stages. +EVALS_FACTOR: Dict[str, float] = { + "cluster": 0.77, + "group": 0.79, + "imaging": 1.13, + "interferometer": 0.34, + "multi_dataset": 1.65, + "multi_galaxy": 1.06, + "point_source_image": 0.88, + "point_source_source": 0.81, + "weak": 0.42, +} + +#: Seconds per evaluation the fit spends outside the likelihood (Nautilus bookkeeping plus sample and +#: output writing). +FLOOR_S = 0.014 + +#: Seconds per job outside every stage: imports, dataset load, the first compile. +STARTUP_S = 30 + +#: numba's parallel efficiency under Nautilus's multiprocessing, by core count (phase-4 cores sweep, +#: imaging/rectangular/hst, numba_cpu_sparse_fp64). `al.estimate_runtime` prefers the curve in the +#: header of `autolens/config/runtime_estimates.yaml` (`parallel_efficiency.curve`) and falls back to +#: this one. +PARALLEL_EFFICIENCY: Dict[int, float] = { + 1: 1.0, + 2: 0.68, + 4: 0.62, + 8: 0.55, + 16: 0.36, + 32: 0.28, +} + +#: A parametric stage under numba costs about this many times the dataset type's JAX CPU MGE per-call. +NUMBA_PARAMETRIC_FACTOR = 3.0 + +#: Profiling records whose per-call does not price a fit's evaluation, by record id: `(seconds, why)`. +PER_CALL_OVERRIDE: Dict[str, Tuple[float, str]] = { + "lifecycle/b5dea27fcaf8b14ec9bb": ( + 0.110, + "multi_dataset/delaunay A100: the record's vmap.per_call (0.176 s) timed a batch of 3, " + "an OOM fallback, slower than the same record's single-jit median of 110 ms " + "(wiki/project/state.md, 2026-11-05)", + ), +} + +#: Whole per-evaluation costs (floor included) by `(dataset_type, variant, host_class)`: +#: `(seconds, why)`. Fitted to the legs they price (a measured wall in per-evaluation form). +PER_EVAL_OVERRIDE: Dict[Tuple[str, str, str], Tuple[float, str]] = { + ("cluster", "image_plane", "hpc_a100"): ( + 0.060, + "the image-plane PointSolver fit costs 15 ms per evaluation in the sampler and ~43 ms " + "per evaluation in stage output on the A100, against a 0.2 ms vmap per-call " + "(phase-4 413966: total_wall_s / likelihood_evals 0.056-0.060 s)", + ), + ("cluster", "image_plane", "hpc_ral_cpu"): ( + 0.049, + "as the A100 entry; RAL CPU 414145: total_wall_s / likelihood_evals 0.035-0.049 s", + ), +} + +#: Dataset types whose single search is the whole fit: no parametric opening stage to reprice. +SINGLE_SEARCH = {"point_source_source", "point_source_image", "cluster", "weak"} + + +def stage_evals(free_parameters: int, n_live: int, dataset_type: str) -> int: + """Evaluations one Nautilus stage takes, from its dimension and live points.""" + law = EVALS_A * n_live * free_parameters**EVALS_B + return round(law * EVALS_FACTOR.get(dataset_type, 1.0)) + + +def parallel_efficiency(cores: int, curve: Optional[Dict[int, float]] = None) -> float: + """The measured efficiency at `cores`; between sweep points, the next lower one.""" + curve = curve or PARALLEL_EFFICIENCY + known = [c for c in sorted(curve) if c <= cores] + return curve[known[-1]] if known else 1.0 + + +def effective_per_call( + per_call_s: float, + backend: str, + cores: int, + curve: Optional[Dict[int, float]] = None, +) -> float: + """What one evaluation costs the job: a numba per-call is one thread and Nautilus forks `cores` + workers; a JAX per-call (vmap) already prices one evaluation on the device. + + `backend` is the setup backend (`"numba"`) or the original model's `"numba_cpu"`.""" + if backend in ("numba", "numba_cpu"): + return per_call_s / (cores * parallel_efficiency(cores, curve=curve)) + return per_call_s + + +def stage_seconds(evals: int, price_s: float) -> float: + """Wall seconds for one stage of `evals` evaluations at `price_s` likelihood cost.""" + return evals * (FLOOR_S + price_s) + + +def job_seconds(stage_walls: List[float]) -> float: + """A job's wall: startup plus the stages it fits.""" + return STARTUP_S + sum(stage_walls) diff --git a/autolens/config/runtime_estimates.yaml b/autolens/config/runtime_estimates.yaml new file mode 100644 index 000000000..dd8935bee --- /dev/null +++ b/autolens/config/runtime_estimates.yaml @@ -0,0 +1,2233 @@ +# generated: scripts/misc/tooling/export_runtime_estimates.py from the PyAutoPulse +# day-zero snapshot; do not edit. Copied into PyAutoLens as +# autolens/config/runtime_estimates.yaml by likelihood lifecycle phase 5E. +schema: runtime-estimates +version: 2 +tag: "2026.10.25.1" +source: + repo: "PyAutoLabs/PyAutoPulse" + path: "snapshots/day_zero/lens.json" + profiling_commit: "e4811a25ddfbc087a66f561fe8b2b41a707885aa" + records_sha256: "ba3f63ab2c695dd40e98c3fc34ef8daefa8ce475d17c22532b67d9ea3d89518f" +parallel_efficiency: + curve: + 1: 1.0 + 2: 0.68 + 4: 0.62 + 8: 0.55 + 16: 0.36 + 32: 0.28 + likelihood: "imaging/rectangular" + setup_id: "numba_cpu_sparse_fp64" + kind: "measured" + source: "autolens_inference phase 4 (scripts/misc/wall/model.py PARALLEL_EFFICIENCY)" +size_fields: + n_pixels_masked: "unmasked image pixels the cell was timed at (per dataset for multi_dataset, per channel for datacube; the real-space mask for interferometer)" + n_vis: "visibilities the cell was timed at (per channel for datacube)" + source_pixels: "source-plane mesh pixels the profiling config fixes (the requested count; a Delaunay mesh may realise a few more vertices)" +cells: 116 +estimates: + - likelihood: "cluster/image_plane" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "simple" + setup_id: "jax_cpu_na_fp64" + role: "optimal" + decision_id: "cluster-image-plane-standard-cpu-many-core" + ms_per_eval: 6.14503 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 2.506 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 4719.0 + n_pixels_masked: null + n_vis: null + source_pixels: null + record_id: "lifecycle/86d6277f36e3c8ec1d2f" + - likelihood: "cluster/image_plane" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "simple" + setup_id: "jax_gpu_na_fp64" + role: "optimal" + decision_id: "cluster-image-plane-standard-gpu-a100" + ms_per_eval: 0.201313 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 2.99 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 19870.0 + n_pixels_masked: null + n_vis: null + source_pixels: null + record_id: "lifecycle/d92190013ae10eaa21f6" + - likelihood: "cluster/source_plane" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "simple" + setup_id: "jax_cpu_na_fp64" + role: "optimal" + decision_id: "cluster-source-plane-standard-cpu-many-core" + ms_per_eval: 0.246988 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 0.7195 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 117400.0 + n_pixels_masked: null + n_vis: null + source_pixels: null + record_id: "lifecycle/004001caf29a727421e0" + - likelihood: "cluster/source_plane" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "simple" + setup_id: "jax_gpu_na_fp64" + role: "optimal" + decision_id: "cluster-source-plane-standard-gpu-a100" + ms_per_eval: 0.052937 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 0.9531 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 75560.0 + n_pixels_masked: null + n_vis: null + source_pixels: null + record_id: "lifecycle/02df871c3e8378b505ca" + - likelihood: "datacube/delaunay" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "alma" + setup_id: "numba_cpu_sparse_fp64_wtilde" + role: "optimal" + decision_id: "datacube-delaunay-standard-cpu-many-core" + ms_per_eval: 9355.7 + per_eval_source: "warm_iid_median_s" + cpus_per_eval: 1 + devices_per_eval: 0 + peak_rss_gb: 3.692 + workers_per_node: 236 + bound_by: "cores" + calls_per_s_per_node: 25.23 + n_pixels_masked: 15380 + n_vis: 1000000 + source_pixels: 1250 + record_id: "lifecycle/5800a501664b981824d4" + - likelihood: "datacube/delaunay" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "alma" + setup_id: "jax_cpu_sparse_fp64_wtilde" + role: "secondary" + decision_id: "datacube-delaunay-standard-cpu-many-core" + ms_per_eval: 14294.3 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 4.471 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 2.029 + n_pixels_masked: 15380 + n_vis: 1000000 + source_pixels: 1250 + record_id: "lifecycle/8e374ab509e7626573da" + - likelihood: "datacube/delaunay" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "alma_high" + setup_id: "numba_cpu_sparse_fp64_wtilde" + role: "optimal" + decision_id: "datacube-delaunay-standard-cpu-many-core" + ms_per_eval: 17643.2 + per_eval_source: "warm_iid_median_s" + cpus_per_eval: 1 + devices_per_eval: 0 + peak_rss_gb: 13.56 + workers_per_node: 67 + bound_by: "memory" + calls_per_s_per_node: 3.797 + n_pixels_masked: 61572 + n_vis: 5000000 + source_pixels: 1250 + record_id: "lifecycle/3ea56488a996d6f0ffd1" + - likelihood: "datacube/delaunay" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "alma_high" + setup_id: "jax_cpu_sparse_fp64_wtilde" + role: "secondary" + decision_id: "datacube-delaunay-standard-cpu-many-core" + ms_per_eval: 22051.0 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 19.99 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 1.315 + n_pixels_masked: 61572 + n_vis: 5000000 + source_pixels: 1250 + record_id: "lifecycle/6669e2835516e93361f1" + - likelihood: "datacube/delaunay" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "sma" + setup_id: "numba_cpu_sparse_fp64_wtilde" + role: "optimal" + decision_id: "datacube-delaunay-standard-cpu-many-core" + ms_per_eval: 8444.13 + per_eval_source: "warm_iid_median_s" + cpus_per_eval: 1 + devices_per_eval: 0 + peak_rss_gb: 0.9098 + workers_per_node: 236 + bound_by: "cores" + calls_per_s_per_node: 27.95 + n_pixels_masked: 3852 + n_vis: 190 + source_pixels: 1250 + record_id: "lifecycle/5b411896dcf5b1cc5853" + - likelihood: "datacube/delaunay" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "sma" + setup_id: "jax_cpu_sparse_fp64_wtilde" + role: "secondary" + decision_id: "datacube-delaunay-standard-cpu-many-core" + ms_per_eval: 12906.9 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 1.456 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 2.247 + n_pixels_masked: 3852 + n_vis: 190 + source_pixels: 1250 + record_id: "lifecycle/649dfad640b1afce5631" + - likelihood: "datacube/delaunay" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "alma" + setup_id: "jax_gpu_sparse_fp64_wtilde" + role: "provisional_optimal" + decision_id: null + ms_per_eval: 1251.6 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 3.8 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 3.196 + n_pixels_masked: 15380 + n_vis: 1000000 + source_pixels: 1250 + record_id: "lifecycle/c3ed1c5a8847d28eb792" + - likelihood: "datacube/delaunay" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "alma_high" + setup_id: "jax_gpu_sparse_fp64_wtilde" + role: "provisional_optimal" + decision_id: null + ms_per_eval: 1436.66 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 15.49 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 2.784 + n_pixels_masked: 61572 + n_vis: 5000000 + source_pixels: 1250 + record_id: "lifecycle/5ddc372d7a91e6f979a8" + - likelihood: "datacube/delaunay" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "sma" + setup_id: "jax_gpu_sparse_fp64_wtilde" + role: "provisional_optimal" + decision_id: null + ms_per_eval: 1154.42 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 1.627 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 3.465 + n_pixels_masked: 3852 + n_vis: 190 + source_pixels: 1250 + record_id: "lifecycle/5a76ad3529beab044b72" + - likelihood: "datacube/delaunay" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "sma" + setup_id: "jax_gpu_dense_fp64_nufft" + role: "provisional_secondary" + decision_id: null + ms_per_eval: 1185.48 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 6.302 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 3.374 + n_pixels_masked: 3852 + n_vis: 190 + source_pixels: 1250 + record_id: "lifecycle/b62555fd25c854bfdf3d" + - likelihood: "group/delaunay" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "euclid" + setup_id: "numba_cpu_sparse_fp64" + role: "optimal" + decision_id: "group-delaunay-standard-cpu-many-core" + ms_per_eval: 803.73 + per_eval_source: "warm_iid_median_s" + cpus_per_eval: 1 + devices_per_eval: 0 + peak_rss_gb: 4.811 + workers_per_node: 191 + bound_by: "memory" + calls_per_s_per_node: 237.6 + n_pixels_masked: 17692 + n_vis: null + source_pixels: 1250 + record_id: "lifecycle/22696238c7226a6971dd" + - likelihood: "group/delaunay" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "euclid" + setup_id: "jax_cpu_sparse_fp64" + role: "secondary" + decision_id: "group-delaunay-standard-cpu-many-core" + ms_per_eval: 6054.31 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 4.635 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 4.79 + n_pixels_masked: 17692 + n_vis: null + source_pixels: 1250 + record_id: "lifecycle/f4474b23fc3ee5d4b43f" + - likelihood: "group/delaunay" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "euclid" + setup_id: "jax_gpu_dense_fp64" + role: "optimal" + decision_id: "group-delaunay-standard-gpu-a100" + ms_per_eval: 36.5633 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 5.992 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 109.4 + n_pixels_masked: 17692 + n_vis: null + source_pixels: 1250 + record_id: "lifecycle/826e517e5786c2398767" + - likelihood: "group/delaunay" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "euclid" + setup_id: "jax_gpu_sparse_fp64" + role: "secondary" + decision_id: "group-delaunay-standard-gpu-a100" + ms_per_eval: 55.5904 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 5.212 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 71.95 + n_pixels_masked: 17692 + n_vis: null + source_pixels: 1250 + record_id: "lifecycle/af408d3bf87b7b904f2d" + - likelihood: "group/mge" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "euclid" + setup_id: "jax_cpu_dense_fp64" + role: "optimal" + decision_id: "group-mge-standard-cpu-many-core" + ms_per_eval: 37.3681 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 1.257 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 776.1 + n_pixels_masked: 17692 + n_vis: null + source_pixels: null + record_id: "lifecycle/eb438402eb57e940aa63" + - likelihood: "group/mge" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "euclid" + setup_id: "jax_gpu_dense_fp64" + role: "optimal" + decision_id: "group-mge-standard-gpu-a100" + ms_per_eval: 0.827156 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 1.712 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 4836.0 + n_pixels_masked: 17692 + n_vis: null + source_pixels: null + record_id: "lifecycle/c631285eca889fc2c2c4" + - likelihood: "group/rectangular" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "euclid" + setup_id: "numba_cpu_sparse_fp64" + role: "optimal" + decision_id: "group-rectangular-standard-cpu-many-core" + ms_per_eval: 899.584 + per_eval_source: "warm_iid_median_s" + cpus_per_eval: 1 + devices_per_eval: 0 + peak_rss_gb: 4.474 + workers_per_node: 205 + bound_by: "memory" + calls_per_s_per_node: 227.9 + n_pixels_masked: 17692 + n_vis: null + source_pixels: 1225 + record_id: "lifecycle/a393fa2e139fd0560564" + - likelihood: "group/rectangular" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "euclid" + setup_id: "jax_cpu_sparse_fp64" + role: "secondary" + decision_id: "group-rectangular-standard-cpu-many-core" + ms_per_eval: 5920.17 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 4.39 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 4.899 + n_pixels_masked: 17692 + n_vis: null + source_pixels: 1225 + record_id: "lifecycle/acba8d20547d37e8f89c" + - likelihood: "group/rectangular" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "euclid" + setup_id: "jax_gpu_dense_fp64" + role: "optimal" + decision_id: "group-rectangular-standard-gpu-a100" + ms_per_eval: 29.8285 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 5.729 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 134.1 + n_pixels_masked: 17692 + n_vis: null + source_pixels: 1225 + record_id: "lifecycle/506bcbce87ad6c020945" + - likelihood: "group/rectangular" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "euclid" + setup_id: "jax_gpu_sparse_fp64" + role: "secondary" + decision_id: "group-rectangular-standard-gpu-a100" + ms_per_eval: 50.6614 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 4.881 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 78.96 + n_pixels_masked: 17692 + n_vis: null + source_pixels: 1225 + record_id: "lifecycle/34335ddd284ac5077dc2" + - likelihood: "imaging/delaunay" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "ao" + setup_id: "numba_cpu_sparse_fp64" + role: "optimal" + decision_id: "imaging-delaunay-standard-cpu-many-core" + ms_per_eval: 8671.3 + per_eval_source: "warm_iid_median_s" + cpus_per_eval: 1 + devices_per_eval: 0 + peak_rss_gb: 22.98 + workers_per_node: 40 + bound_by: "memory" + calls_per_s_per_node: 4.613 + n_pixels_masked: 384753 + n_vis: null + source_pixels: 1250 + record_id: "lifecycle/1f22a4a5fcd73276ec53" + - likelihood: "imaging/delaunay" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "ao" + setup_id: "jax_cpu_sparse_fp64" + role: "secondary" + decision_id: "imaging-delaunay-standard-cpu-many-core" + ms_per_eval: 81310.9 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 15.27 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 0.3567 + n_pixels_masked: 384753 + n_vis: null + source_pixels: 1250 + record_id: "lifecycle/e08b7a6ff7b9daea8790" + - likelihood: "imaging/delaunay" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "euclid" + setup_id: "numba_cpu_sparse_fp64" + role: "optimal" + decision_id: "imaging-delaunay-standard-cpu-many-core" + ms_per_eval: 819.972 + per_eval_source: "warm_iid_median_s" + cpus_per_eval: 1 + devices_per_eval: 0 + peak_rss_gb: 0.551 + workers_per_node: 236 + bound_by: "cores" + calls_per_s_per_node: 287.8 + n_pixels_masked: 3841 + n_vis: null + source_pixels: 1250 + record_id: "lifecycle/5556ca430bc180c2d536" + - likelihood: "imaging/delaunay" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "euclid" + setup_id: "jax_cpu_sparse_fp64" + role: "secondary" + decision_id: "imaging-delaunay-standard-cpu-many-core" + ms_per_eval: 1246.91 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 1.829 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 23.26 + n_pixels_masked: 3841 + n_vis: null + source_pixels: 1250 + record_id: "lifecycle/b202eb6f7da58a38882f" + - likelihood: "imaging/delaunay" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "hst" + setup_id: "numba_cpu_sparse_fp64" + role: "optimal" + decision_id: "imaging-delaunay-standard-cpu-many-core" + ms_per_eval: 951.684 + per_eval_source: "warm_iid_median_s" + cpus_per_eval: 1 + devices_per_eval: 0 + peak_rss_gb: 0.854 + workers_per_node: 236 + bound_by: "cores" + calls_per_s_per_node: 248.0 + n_pixels_masked: 15361 + n_vis: null + source_pixels: 1250 + record_id: "lifecycle/321ec1f6f2a5955a9a20" + - likelihood: "imaging/delaunay" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "hst" + setup_id: "jax_cpu_sparse_fp64" + role: "secondary" + decision_id: "imaging-delaunay-standard-cpu-many-core" + ms_per_eval: 2991.06 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 3.044 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 9.696 + n_pixels_masked: 15361 + n_vis: null + source_pixels: 1250 + record_id: "lifecycle/06a9dad80c65ecd81c6c" + - likelihood: "imaging/delaunay" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "jwst" + setup_id: "numba_cpu_sparse_fp64" + role: "optimal" + decision_id: "imaging-delaunay-standard-cpu-many-core" + ms_per_eval: 1744.6 + per_eval_source: "warm_iid_median_s" + cpus_per_eval: 1 + devices_per_eval: 0 + peak_rss_gb: 1.983 + workers_per_node: 236 + bound_by: "cores" + calls_per_s_per_node: 135.3 + n_pixels_masked: 42737 + n_vis: null + source_pixels: 1250 + record_id: "lifecycle/d93b4dad29e8a0f77987" + - likelihood: "imaging/delaunay" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "jwst" + setup_id: "jax_cpu_sparse_fp64" + role: "secondary" + decision_id: "imaging-delaunay-standard-cpu-many-core" + ms_per_eval: 6561.82 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 5.559 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 4.42 + n_pixels_masked: 42737 + n_vis: null + source_pixels: 1250 + record_id: "lifecycle/b5b87c504713b9831857" + - likelihood: "imaging/delaunay" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "ao" + setup_id: "jax_gpu_dense_fp64" + role: "optimal" + decision_id: "imaging-delaunay-standard-gpu-a100" + ms_per_eval: 347.868 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 35.53 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 11.5 + n_pixels_masked: 384753 + n_vis: null + source_pixels: 1250 + record_id: "lifecycle/fa028d54604cd08d3555" + - likelihood: "imaging/delaunay" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "ao" + setup_id: "jax_gpu_sparse_fp64" + role: "secondary" + decision_id: "imaging-delaunay-standard-gpu-a100" + ms_per_eval: 821.491 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 5.931 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 4.869 + n_pixels_masked: 384753 + n_vis: null + source_pixels: 1250 + record_id: "lifecycle/99d7c3c7623e3d43d059" + - likelihood: "imaging/delaunay" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "euclid" + setup_id: "jax_gpu_dense_fp64" + role: "optimal" + decision_id: "imaging-delaunay-standard-gpu-a100" + ms_per_eval: 14.4982 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 2.702 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 275.9 + n_pixels_masked: 3841 + n_vis: null + source_pixels: 1250 + record_id: "lifecycle/c07af59a8d393975dd28" + - likelihood: "imaging/delaunay" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "euclid" + setup_id: "jax_gpu_sparse_fp64" + role: "secondary" + decision_id: "imaging-delaunay-standard-gpu-a100" + ms_per_eval: 17.9555 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 1.842 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 222.8 + n_pixels_masked: 3841 + n_vis: null + source_pixels: 1250 + record_id: "lifecycle/371f67d50254479493ee" + - likelihood: "imaging/delaunay" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "hst" + setup_id: "jax_gpu_dense_fp64" + role: "optimal" + decision_id: "imaging-delaunay-standard-gpu-a100" + ms_per_eval: 34.1921 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 2.681 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 117.0 + n_pixels_masked: 15361 + n_vis: null + source_pixels: 1250 + record_id: "lifecycle/73c19173fcc983318b61" + - likelihood: "imaging/delaunay" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "hst" + setup_id: "jax_gpu_sparse_fp64" + role: "secondary" + decision_id: "imaging-delaunay-standard-gpu-a100" + ms_per_eval: 47.165 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 1.947 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 84.81 + n_pixels_masked: 15361 + n_vis: null + source_pixels: 1250 + record_id: "lifecycle/12c678df16e04f4f9011" + - likelihood: "imaging/delaunay" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "jwst" + setup_id: "jax_gpu_dense_fp64" + role: "optimal" + decision_id: "imaging-delaunay-standard-gpu-a100" + ms_per_eval: 69.6995 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 5.935 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 57.39 + n_pixels_masked: 42737 + n_vis: null + source_pixels: 1250 + record_id: "lifecycle/12348bea7be2ca70cffb" + - likelihood: "imaging/delaunay" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "jwst" + setup_id: "jax_gpu_sparse_fp64" + role: "secondary" + decision_id: "imaging-delaunay-standard-gpu-a100" + ms_per_eval: 107.599 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 2.21 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 37.18 + n_pixels_masked: 42737 + n_vis: null + source_pixels: 1250 + record_id: "lifecycle/d34ebb3d52e02dfb8b16" + - likelihood: "imaging/delaunay_nn" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "hst" + setup_id: "numba_cpu_sparse_fp64" + role: "optimal" + decision_id: "imaging-delaunay-nn-standard-cpu-many-core" + ms_per_eval: 1294.8 + per_eval_source: "warm_iid_median_s" + cpus_per_eval: 1 + devices_per_eval: 0 + peak_rss_gb: 0.831 + workers_per_node: 236 + bound_by: "cores" + calls_per_s_per_node: 182.3 + n_pixels_masked: 15361 + n_vis: null + source_pixels: 1250 + record_id: "lifecycle/05dde64a0eb7fdd0c4a1" + - likelihood: "imaging/delaunay_nn" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "hst" + setup_id: "jax_cpu_sparse_fp64" + role: "secondary" + decision_id: "imaging-delaunay-nn-standard-cpu-many-core" + ms_per_eval: 7248.95 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 10.74 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 4.001 + n_pixels_masked: 15361 + n_vis: null + source_pixels: 1250 + record_id: "lifecycle/1ae46b0872f10459a7c4" + - likelihood: "imaging/delaunay_nn" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "hst" + setup_id: "jax_gpu_dense_fp64" + role: "optimal" + decision_id: "imaging-delaunay-nn-standard-gpu-a100" + ms_per_eval: 41.7423 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 2.81 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 95.83 + n_pixels_masked: 15361 + n_vis: null + source_pixels: 1250 + record_id: "lifecycle/c661098ad46c65fa59b2" + - likelihood: "imaging/delaunay_nn" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "hst" + setup_id: "jax_gpu_sparse_fp64" + role: "secondary" + decision_id: "imaging-delaunay-nn-standard-gpu-a100" + ms_per_eval: 1148.99 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 2.277 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 3.481 + n_pixels_masked: 15361 + n_vis: null + source_pixels: 1250 + record_id: "lifecycle/70bcae3ab1c4777651f0" + - likelihood: "imaging/mge" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "ao" + setup_id: "jax_cpu_dense_fp64" + role: "optimal" + decision_id: "imaging-mge-standard-cpu-many-core" + ms_per_eval: 511.801 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 5.201 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 56.66 + n_pixels_masked: 384753 + n_vis: null + source_pixels: null + record_id: "lifecycle/3216ffc143645fb46c72" + - likelihood: "imaging/mge" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "euclid" + setup_id: "jax_cpu_dense_fp64" + role: "optimal" + decision_id: "imaging-mge-standard-cpu-many-core" + ms_per_eval: 7.0675 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 0.9645 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 4103.0 + n_pixels_masked: 3841 + n_vis: null + source_pixels: null + record_id: "lifecycle/190ebc582d9aba9aaa9c" + - likelihood: "imaging/mge" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "hst" + setup_id: "jax_cpu_dense_fp64" + role: "optimal" + decision_id: "imaging-mge-standard-cpu-many-core" + ms_per_eval: 16.2906 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 1.073 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 1780.0 + n_pixels_masked: 15361 + n_vis: null + source_pixels: null + record_id: "lifecycle/54979849c807d452c510" + - likelihood: "imaging/mge" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "jwst" + setup_id: "jax_cpu_dense_fp64" + role: "optimal" + decision_id: "imaging-mge-standard-cpu-many-core" + ms_per_eval: 50.5488 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 1.372 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 573.7 + n_pixels_masked: 42737 + n_vis: null + source_pixels: null + record_id: "lifecycle/4baa9bc04c8d24a713b6" + - likelihood: "imaging/mge" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "ao" + setup_id: "jax_gpu_dense_fp64" + role: "optimal" + decision_id: "imaging-mge-standard-gpu-a100" + ms_per_eval: 18.7845 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 3.247 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 212.9 + n_pixels_masked: 384753 + n_vis: null + source_pixels: null + record_id: "lifecycle/4b514c4262172f610fee" + - likelihood: "imaging/mge" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "euclid" + setup_id: "jax_gpu_dense_fp64" + role: "optimal" + decision_id: "imaging-mge-standard-gpu-a100" + ms_per_eval: 0.198513 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 1.188 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 20150.0 + n_pixels_masked: 3841 + n_vis: null + source_pixels: null + record_id: "lifecycle/770dce7d7db7a1fc3b53" + - likelihood: "imaging/mge" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "hst" + setup_id: "jax_gpu_dense_fp64" + role: "optimal" + decision_id: "imaging-mge-standard-gpu-a100" + ms_per_eval: 0.391534 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 1.275 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 10220.0 + n_pixels_masked: 15361 + n_vis: null + source_pixels: null + record_id: "lifecycle/8a475e9abd97a8c4a1c0" + - likelihood: "imaging/mge" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "jwst" + setup_id: "jax_gpu_dense_fp64" + role: "optimal" + decision_id: "imaging-mge-standard-gpu-a100" + ms_per_eval: 0.917986 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 1.567 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 4357.0 + n_pixels_masked: 42737 + n_vis: null + source_pixels: null + record_id: "lifecycle/0756e600e86d7ae6a462" + - likelihood: "imaging/rectangular" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "ao" + setup_id: "numba_cpu_sparse_fp64" + role: "optimal" + decision_id: "imaging-rectangular-standard-cpu-many-core" + ms_per_eval: 9982.18 + per_eval_source: "warm_iid_median_s" + cpus_per_eval: 1 + devices_per_eval: 0 + peak_rss_gb: 27.95 + workers_per_node: 32 + bound_by: "memory" + calls_per_s_per_node: 3.206 + n_pixels_masked: 384753 + n_vis: null + source_pixels: 1225 + record_id: "lifecycle/403420f8debaaa38956c" + - likelihood: "imaging/rectangular" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "ao" + setup_id: "jax_cpu_sparse_fp64" + role: "secondary" + decision_id: "imaging-rectangular-standard-cpu-many-core" + ms_per_eval: 76817.5 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 17.54 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 0.3775 + n_pixels_masked: 384753 + n_vis: null + source_pixels: 1225 + record_id: "lifecycle/d7020017fca2249bf32b" + - likelihood: "imaging/rectangular" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "euclid" + setup_id: "numba_cpu_sparse_fp64" + role: "optimal" + decision_id: "imaging-rectangular-standard-cpu-many-core" + ms_per_eval: 282.503 + per_eval_source: "warm_iid_median_s" + cpus_per_eval: 1 + devices_per_eval: 0 + peak_rss_gb: null + workers_per_node: null + bound_by: null + calls_per_s_per_node: null + n_pixels_masked: 3841 + n_vis: null + source_pixels: 1225 + record_id: "lifecycle/6060fdcfa2e5a4a0c168" + - likelihood: "imaging/rectangular" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "euclid" + setup_id: "jax_cpu_sparse_fp64" + role: "secondary" + decision_id: "imaging-rectangular-standard-cpu-many-core" + ms_per_eval: 910.615 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 1.782 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 31.85 + n_pixels_masked: 3841 + n_vis: null + source_pixels: 1225 + record_id: "lifecycle/4c53e409a27040f5d6a4" + - likelihood: "imaging/rectangular" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "hst" + setup_id: "numba_cpu_sparse_fp64" + role: "optimal" + decision_id: "imaging-rectangular-standard-cpu-many-core" + ms_per_eval: 696.736 + per_eval_source: "warm_iid_median_s" + cpus_per_eval: 1 + devices_per_eval: 0 + peak_rss_gb: 1.024 + workers_per_node: 236 + bound_by: "cores" + calls_per_s_per_node: 338.7 + n_pixels_masked: 15361 + n_vis: null + source_pixels: 1225 + record_id: "lifecycle/b62534053c00fb102bf4" + - likelihood: "imaging/rectangular" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "hst" + setup_id: "jax_cpu_sparse_fp64" + role: "secondary" + decision_id: "imaging-rectangular-standard-cpu-many-core" + ms_per_eval: 2963.01 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 2.864 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 9.787 + n_pixels_masked: 15361 + n_vis: null + source_pixels: 1225 + record_id: "lifecycle/2b5e34f509175fd4d030" + - likelihood: "imaging/rectangular" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "jwst" + setup_id: "numba_cpu_sparse_fp64" + role: "optimal" + decision_id: "imaging-rectangular-standard-cpu-many-core" + ms_per_eval: 1688.07 + per_eval_source: "warm_iid_median_s" + cpus_per_eval: 1 + devices_per_eval: 0 + peak_rss_gb: 1.983 + workers_per_node: 236 + bound_by: "cores" + calls_per_s_per_node: 139.8 + n_pixels_masked: 42737 + n_vis: null + source_pixels: 1225 + record_id: "lifecycle/304ac75d242dcbc2c22f" + - likelihood: "imaging/rectangular" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "jwst" + setup_id: "jax_cpu_sparse_fp64" + role: "secondary" + decision_id: "imaging-rectangular-standard-cpu-many-core" + ms_per_eval: 5753.56 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 5.339 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 5.04 + n_pixels_masked: 42737 + n_vis: null + source_pixels: 1225 + record_id: "lifecycle/9bb2e30e94491253641b" + - likelihood: "imaging/rectangular" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "ao" + setup_id: "jax_gpu_dense_fp64" + role: "optimal" + decision_id: "imaging-rectangular-standard-gpu-a100" + ms_per_eval: 317.109 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 33.17 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 12.61 + n_pixels_masked: 384753 + n_vis: null + source_pixels: 1225 + record_id: "lifecycle/d570569f32c953038fde" + - likelihood: "imaging/rectangular" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "ao" + setup_id: "jax_gpu_sparse_fp64" + role: "secondary" + decision_id: "imaging-rectangular-standard-gpu-a100" + ms_per_eval: 936.99 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 5.814 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 4.269 + n_pixels_masked: 384753 + n_vis: null + source_pixels: 1225 + record_id: "lifecycle/46db4990a22e25aee123" + - likelihood: "imaging/rectangular" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "euclid" + setup_id: "jax_gpu_dense_fp64" + role: "optimal" + decision_id: "imaging-rectangular-standard-gpu-a100" + ms_per_eval: 7.68368 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 2.622 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 520.6 + n_pixels_masked: 3841 + n_vis: null + source_pixels: 1225 + record_id: "lifecycle/456f7d65babc5524183a" + - likelihood: "imaging/rectangular" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "euclid" + setup_id: "jax_gpu_sparse_fp64" + role: "secondary" + decision_id: "imaging-rectangular-standard-gpu-a100" + ms_per_eval: 12.93 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 1.778 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 309.4 + n_pixels_masked: 3841 + n_vis: null + source_pixels: 1225 + record_id: "lifecycle/bc5ed323618c58fc7682" + - likelihood: "imaging/rectangular" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "hst" + setup_id: "jax_gpu_dense_fp64" + role: "optimal" + decision_id: "imaging-rectangular-standard-gpu-a100" + ms_per_eval: 24.6826 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 2.596 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 162.1 + n_pixels_masked: 15361 + n_vis: null + source_pixels: 1225 + record_id: "lifecycle/42f6a707360ce63b8150" + - likelihood: "imaging/rectangular" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "hst" + setup_id: "jax_gpu_sparse_fp64" + role: "secondary" + decision_id: "imaging-rectangular-standard-gpu-a100" + ms_per_eval: 40.5176 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 1.936 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 98.72 + n_pixels_masked: 15361 + n_vis: null + source_pixels: 1225 + record_id: "lifecycle/cc3f3365b6ac65388a93" + - likelihood: "imaging/rectangular" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "jwst" + setup_id: "jax_gpu_dense_fp64" + role: "optimal" + decision_id: "imaging-rectangular-standard-gpu-a100" + ms_per_eval: 60.7094 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 5.619 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 65.89 + n_pixels_masked: 42737 + n_vis: null + source_pixels: 1225 + record_id: "lifecycle/ec69a200557ea8212e5e" + - likelihood: "imaging/rectangular" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "jwst" + setup_id: "jax_gpu_sparse_fp64" + role: "secondary" + decision_id: "imaging-rectangular-standard-gpu-a100" + ms_per_eval: 107.325 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 2.188 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 37.27 + n_pixels_masked: 42737 + n_vis: null + source_pixels: 1225 + record_id: "lifecycle/bdffd9d6d157b3b66435" + - likelihood: "interferometer/delaunay" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "alma" + setup_id: "numba_cpu_sparse_fp64_wtilde" + role: "optimal" + decision_id: "interferometer-delaunay-standard-cpu-many-core" + ms_per_eval: 764.945 + per_eval_source: "warm_iid_median_s" + cpus_per_eval: 1 + devices_per_eval: 0 + peak_rss_gb: 1.549 + workers_per_node: 236 + bound_by: "cores" + calls_per_s_per_node: 308.5 + n_pixels_masked: 15380 + n_vis: 1000000 + source_pixels: 1250 + record_id: "lifecycle/5e9d64046821795b4651" + - likelihood: "interferometer/delaunay" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "alma" + setup_id: "jax_cpu_sparse_fp64_wtilde" + role: "secondary" + decision_id: "interferometer-delaunay-standard-cpu-many-core" + ms_per_eval: 2120.71 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 2.281 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 13.67 + n_pixels_masked: 15380 + n_vis: 1000000 + source_pixels: 1250 + record_id: "lifecycle/60747d6f7a1867da50c9" + - likelihood: "interferometer/delaunay" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "alma_high" + setup_id: "numba_cpu_sparse_fp64_wtilde" + role: "optimal" + decision_id: "interferometer-delaunay-standard-cpu-many-core" + ms_per_eval: 9328.69 + per_eval_source: "warm_iid_median_s" + cpus_per_eval: 1 + devices_per_eval: 0 + peak_rss_gb: 2.36 + workers_per_node: 236 + bound_by: "cores" + calls_per_s_per_node: 25.3 + n_pixels_masked: 61572 + n_vis: 5000000 + source_pixels: 1250 + record_id: "lifecycle/bfe464d85eab437c56be" + - likelihood: "interferometer/delaunay" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "alma_high" + setup_id: "jax_cpu_sparse_fp64_wtilde" + role: "secondary" + decision_id: "interferometer-delaunay-standard-cpu-many-core" + ms_per_eval: 7601.44 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 9.25 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 3.815 + n_pixels_masked: 61572 + n_vis: 5000000 + source_pixels: 1250 + record_id: "lifecycle/d54c6814c51c381564cf" + - likelihood: "interferometer/delaunay" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "jvla" + setup_id: "numba_cpu_sparse_fp64_wtilde" + role: "optimal" + decision_id: "interferometer-delaunay-standard-cpu-many-core" + ms_per_eval: 63799.2 + per_eval_source: "warm_iid_median_s" + cpus_per_eval: 1 + devices_per_eval: 0 + peak_rss_gb: 11.72 + workers_per_node: 78 + bound_by: "memory" + calls_per_s_per_node: 1.223 + n_pixels_masked: 384852 + n_vis: 25000000 + source_pixels: 1250 + record_id: "lifecycle/e63a97d451e1633c91aa" + - likelihood: "interferometer/delaunay" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "jvla" + setup_id: "jax_cpu_sparse_fp64_wtilde" + role: "secondary" + decision_id: "interferometer-delaunay-standard-cpu-many-core" + ms_per_eval: 51435.1 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 22.08 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 0.5638 + n_pixels_masked: 384852 + n_vis: 25000000 + source_pixels: 1250 + record_id: "lifecycle/757d2c2d7167cdef0457" + - likelihood: "interferometer/delaunay" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "sma" + setup_id: "numba_cpu_sparse_fp64_wtilde" + role: "optimal" + decision_id: "interferometer-delaunay-standard-cpu-many-core" + ms_per_eval: 279.344 + per_eval_source: "warm_iid_median_s" + cpus_per_eval: 1 + devices_per_eval: 0 + peak_rss_gb: 0.8607 + workers_per_node: 236 + bound_by: "cores" + calls_per_s_per_node: 844.8 + n_pixels_masked: 3852 + n_vis: 190 + source_pixels: 1250 + record_id: "lifecycle/b2d01ef74bf71e49d774" + - likelihood: "interferometer/delaunay" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "sma" + setup_id: "jax_cpu_sparse_fp64_wtilde" + role: "secondary" + decision_id: "interferometer-delaunay-standard-cpu-many-core" + ms_per_eval: 784.58 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 1.266 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 36.96 + n_pixels_masked: 3852 + n_vis: 190 + source_pixels: 1250 + record_id: "lifecycle/00838694b2c3c955a644" + - likelihood: "interferometer/delaunay" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "alma" + setup_id: "jax_gpu_sparse_fp64_wtilde" + role: "optimal" + decision_id: "interferometer-delaunay-standard-gpu-a100" + ms_per_eval: 20.8262 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 2.485 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 192.1 + n_pixels_masked: 15380 + n_vis: 1000000 + source_pixels: 1250 + record_id: "lifecycle/8dada4df3a4ed30d1721" + - likelihood: "interferometer/delaunay" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "alma_high" + setup_id: "jax_gpu_sparse_fp64_wtilde" + role: "optimal" + decision_id: "interferometer-delaunay-standard-gpu-a100" + ms_per_eval: 63.7075 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 4.13 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 62.79 + n_pixels_masked: 61572 + n_vis: 5000000 + source_pixels: 1250 + record_id: "lifecycle/ba12584bdfe8c2e16f30" + - likelihood: "interferometer/delaunay" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "jvla" + setup_id: "jax_gpu_sparse_fp64_wtilde" + role: "optimal" + decision_id: "interferometer-delaunay-standard-gpu-a100" + ms_per_eval: 465.185 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 14.33 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 8.599 + n_pixels_masked: 384852 + n_vis: 25000000 + source_pixels: 1250 + record_id: "lifecycle/3c33efbabefe647c901b" + - likelihood: "interferometer/delaunay" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "sma" + setup_id: "jax_gpu_sparse_fp64_wtilde" + role: "optimal" + decision_id: "interferometer-delaunay-standard-gpu-a100" + ms_per_eval: 11.3627 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 1.638 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 352.0 + n_pixels_masked: 3852 + n_vis: 190 + source_pixels: 1250 + record_id: "lifecycle/742eaf1292ed737e591e" + - likelihood: "interferometer/delaunay" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "sma" + setup_id: "jax_gpu_dense_fp64_nufft" + role: "secondary" + decision_id: "interferometer-delaunay-standard-gpu-a100" + ms_per_eval: 57.3507 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 4.932 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 69.75 + n_pixels_masked: 3852 + n_vis: 190 + source_pixels: 1250 + record_id: "lifecycle/ff5c53947f845ee5f2d8" + - likelihood: "interferometer/mge" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "sma" + setup_id: "jax_cpu_dense_fp64_nufft" + role: "optimal" + decision_id: "interferometer-mge-standard-cpu-many-core" + ms_per_eval: 83.2915 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 1.279 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 348.2 + n_pixels_masked: null + n_vis: 190 + source_pixels: null + record_id: "lifecycle/02e5496a9c9da3407d87" + - likelihood: "interferometer/mge" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "sma" + setup_id: "jax_gpu_dense_fp64_nufft" + role: "optimal" + decision_id: "interferometer-mge-standard-gpu-a100" + ms_per_eval: 0.599291 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 1.535 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 6675.0 + n_pixels_masked: null + n_vis: 190 + source_pixels: null + record_id: "lifecycle/4c9e3b4239cc98b8a7ff" + - likelihood: "interferometer/rectangular" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "alma" + setup_id: "numba_cpu_sparse_fp64_wtilde" + role: "optimal" + decision_id: "interferometer-rectangular-standard-cpu-many-core" + ms_per_eval: 888.771 + per_eval_source: "warm_iid_median_s" + cpus_per_eval: 1 + devices_per_eval: 0 + peak_rss_gb: 0.9298 + workers_per_node: 236 + bound_by: "cores" + calls_per_s_per_node: 265.5 + n_pixels_masked: 15380 + n_vis: 1000000 + source_pixels: 1225 + record_id: "lifecycle/4663f221c8c3ce49b76f" + - likelihood: "interferometer/rectangular" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "alma" + setup_id: "jax_cpu_sparse_fp64_wtilde" + role: "secondary" + decision_id: "interferometer-rectangular-standard-cpu-many-core" + ms_per_eval: 1928.96 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 2.301 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 15.03 + n_pixels_masked: 15380 + n_vis: 1000000 + source_pixels: 1225 + record_id: "lifecycle/41fd14e1f19bad947f24" + - likelihood: "interferometer/rectangular" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "alma_high" + setup_id: "numba_cpu_sparse_fp64_wtilde" + role: "optimal" + decision_id: "interferometer-rectangular-standard-cpu-many-core" + ms_per_eval: 8919.04 + per_eval_source: "warm_iid_median_s" + cpus_per_eval: 1 + devices_per_eval: 0 + peak_rss_gb: 2.327 + workers_per_node: 236 + bound_by: "cores" + calls_per_s_per_node: 26.46 + n_pixels_masked: 61572 + n_vis: 5000000 + source_pixels: 1225 + record_id: "lifecycle/d79f1b94f4b03452d745" + - likelihood: "interferometer/rectangular" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "alma_high" + setup_id: "jax_cpu_sparse_fp64_wtilde" + role: "secondary" + decision_id: "interferometer-rectangular-standard-cpu-many-core" + ms_per_eval: 7429.59 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 9.296 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 3.903 + n_pixels_masked: 61572 + n_vis: 5000000 + source_pixels: 1225 + record_id: "lifecycle/fe0f252f68dcc26d7d13" + - likelihood: "interferometer/rectangular" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "jvla" + setup_id: "numba_cpu_sparse_fp64_wtilde" + role: "optimal" + decision_id: "interferometer-rectangular-standard-cpu-many-core" + ms_per_eval: 61436.1 + per_eval_source: "warm_iid_median_s" + cpus_per_eval: 1 + devices_per_eval: 0 + peak_rss_gb: 10.96 + workers_per_node: 84 + bound_by: "memory" + calls_per_s_per_node: 1.367 + n_pixels_masked: 384852 + n_vis: 25000000 + source_pixels: 1225 + record_id: "lifecycle/15aded078686cdf03ff5" + - likelihood: "interferometer/rectangular" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "jvla" + setup_id: "jax_cpu_sparse_fp64_wtilde" + role: "secondary" + decision_id: "interferometer-rectangular-standard-cpu-many-core" + ms_per_eval: 48481.2 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 22.2 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 0.5982 + n_pixels_masked: 384852 + n_vis: 25000000 + source_pixels: 1225 + record_id: "lifecycle/99c70939e335d08c4cff" + - likelihood: "interferometer/rectangular" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "sma" + setup_id: "numba_cpu_sparse_fp64_wtilde" + role: "optimal" + decision_id: "interferometer-rectangular-standard-cpu-many-core" + ms_per_eval: 230.858 + per_eval_source: "warm_iid_median_s" + cpus_per_eval: 1 + devices_per_eval: 0 + peak_rss_gb: 0.8308 + workers_per_node: 236 + bound_by: "cores" + calls_per_s_per_node: 1022.0 + n_pixels_masked: 3852 + n_vis: 190 + source_pixels: 1225 + record_id: "lifecycle/0e27b1175ce084dff51e" + - likelihood: "interferometer/rectangular" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "sma" + setup_id: "jax_cpu_sparse_fp64_wtilde" + role: "secondary" + decision_id: "interferometer-rectangular-standard-cpu-many-core" + ms_per_eval: 643.916 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 1.222 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 45.04 + n_pixels_masked: 3852 + n_vis: 190 + source_pixels: 1225 + record_id: "lifecycle/29d350ddd936276d4121" + - likelihood: "interferometer/rectangular" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "alma" + setup_id: "jax_gpu_sparse_fp64_wtilde" + role: "optimal" + decision_id: "interferometer-rectangular-standard-gpu-a100" + ms_per_eval: 48.9684 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 1.361 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 81.69 + n_pixels_masked: 15380 + n_vis: 1000000 + source_pixels: 1225 + record_id: "lifecycle/fe32c3ee13ad9afc455c" + - likelihood: "interferometer/rectangular" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "alma_high" + setup_id: "jax_gpu_sparse_fp64_wtilde" + role: "optimal" + decision_id: "interferometer-rectangular-standard-gpu-a100" + ms_per_eval: 81.0585 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 4.101 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 49.35 + n_pixels_masked: 61572 + n_vis: 5000000 + source_pixels: 1225 + record_id: "lifecycle/2ab9504c46bb8170ba54" + - likelihood: "interferometer/rectangular" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "jvla" + setup_id: "jax_gpu_sparse_fp64_wtilde" + role: "optimal" + decision_id: "interferometer-rectangular-standard-gpu-a100" + ms_per_eval: 456.282 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 14.12 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 8.767 + n_pixels_masked: 384852 + n_vis: 25000000 + source_pixels: 1225 + record_id: "lifecycle/220d076d8421130e83cf" + - likelihood: "interferometer/rectangular" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "sma" + setup_id: "jax_gpu_sparse_fp64_wtilde" + role: "optimal" + decision_id: "interferometer-rectangular-standard-gpu-a100" + ms_per_eval: 6.74841 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 1.603 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 592.7 + n_pixels_masked: 3852 + n_vis: 190 + source_pixels: 1225 + record_id: "lifecycle/a39d6114339d546f6bd6" + - likelihood: "interferometer/rectangular" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "sma" + setup_id: "jax_gpu_dense_fp64_nufft" + role: "secondary" + decision_id: "interferometer-rectangular-standard-gpu-a100" + ms_per_eval: 51.9839 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 4.722 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 76.95 + n_pixels_masked: 3852 + n_vis: 190 + source_pixels: 1225 + record_id: "lifecycle/e44acbf15a2387706fa1" + - likelihood: "multi_dataset/delaunay" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "hst" + setup_id: "numba_cpu_sparse_fp64" + role: "optimal" + decision_id: "multi-dataset-delaunay-standard-cpu-many-core" + ms_per_eval: 2852.39 + per_eval_source: "warm_iid_median_s" + cpus_per_eval: 1 + devices_per_eval: 0 + peak_rss_gb: 3.245 + workers_per_node: 236 + bound_by: "cores" + calls_per_s_per_node: 82.74 + n_pixels_masked: 15361 + n_vis: null + source_pixels: 1250 + record_id: "lifecycle/f57f23fc63823bcdf1bc" + - likelihood: "multi_dataset/delaunay" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "hst" + setup_id: "jax_cpu_sparse_fp64" + role: "secondary" + decision_id: "multi-dataset-delaunay-standard-cpu-many-core" + ms_per_eval: 6214.28 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 3.944 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 4.667 + n_pixels_masked: 15361 + n_vis: null + source_pixels: 1250 + record_id: "lifecycle/f1dc379c56f5c2c7f32d" + - likelihood: "multi_dataset/delaunay" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "hst" + setup_id: "jax_gpu_dense_fp64" + role: "optimal" + decision_id: "multi-dataset-delaunay-standard-gpu-a100" + ms_per_eval: 176.305 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 3.701 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 22.69 + n_pixels_masked: 15361 + n_vis: null + source_pixels: 1250 + record_id: "lifecycle/b5dea27fcaf8b14ec9bb" + - likelihood: "multi_dataset/delaunay" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "hst" + setup_id: "jax_gpu_sparse_fp64" + role: "secondary" + decision_id: "multi-dataset-delaunay-standard-gpu-a100" + ms_per_eval: 204.146 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 3.635 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 19.59 + n_pixels_masked: 15361 + n_vis: null + source_pixels: 1250 + record_id: "lifecycle/b14372bc431d168fa7ff" + - likelihood: "multi_galaxy/delaunay" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "hst" + setup_id: "numba_cpu_sparse_fp64" + role: "optimal" + decision_id: "multi-galaxy-delaunay-standard-cpu-many-core" + ms_per_eval: 850.331 + per_eval_source: "warm_iid_median_s" + cpus_per_eval: 1 + devices_per_eval: 0 + peak_rss_gb: 3.348 + workers_per_node: 236 + bound_by: "cores" + calls_per_s_per_node: 277.5 + n_pixels_masked: 11304 + n_vis: null + source_pixels: 1250 + record_id: "lifecycle/fc2096cb1c848e64b674" + - likelihood: "multi_galaxy/delaunay" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "hst" + setup_id: "jax_cpu_sparse_fp64" + role: "secondary" + decision_id: "multi-galaxy-delaunay-standard-cpu-many-core" + ms_per_eval: 3721.1 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 3.5 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 7.793 + n_pixels_masked: 11304 + n_vis: null + source_pixels: 1250 + record_id: "lifecycle/d3102456687aef830651" + - likelihood: "multi_galaxy/delaunay" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "hst" + setup_id: "jax_gpu_dense_fp64" + role: "optimal" + decision_id: "multi-galaxy-delaunay-standard-gpu-a100" + ms_per_eval: 30.4978 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 4.781 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 131.2 + n_pixels_masked: 11304 + n_vis: null + source_pixels: 1250 + record_id: "lifecycle/5a510cca4fff0c0d5b58" + - likelihood: "multi_galaxy/delaunay" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "hst" + setup_id: "jax_gpu_sparse_fp64" + role: "secondary" + decision_id: "multi-galaxy-delaunay-standard-gpu-a100" + ms_per_eval: 45.2452 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 3.875 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 88.41 + n_pixels_masked: 11304 + n_vis: null + source_pixels: 1250 + record_id: "lifecycle/ec0a8fbc9c4e2d8b587e" + - likelihood: "multi_galaxy/mge" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "hst" + setup_id: "jax_cpu_dense_fp64" + role: "optimal" + decision_id: "multi-galaxy-mge-standard-cpu-many-core" + ms_per_eval: 26.5847 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 1.02 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 1091.0 + n_pixels_masked: 11304 + n_vis: null + source_pixels: null + record_id: "lifecycle/2ee75bc51ab781c2df4e" + - likelihood: "multi_galaxy/mge" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "hst" + setup_id: "jax_gpu_dense_fp64" + role: "optimal" + decision_id: "multi-galaxy-mge-standard-gpu-a100" + ms_per_eval: 0.580054 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 1.405 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 6896.0 + n_pixels_masked: 11304 + n_vis: null + source_pixels: null + record_id: "lifecycle/ad7e6ff9cd88a460649a" + - likelihood: "multi_galaxy/rectangular" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "hst" + setup_id: "numba_cpu_sparse_fp64" + role: "optimal" + decision_id: "multi-galaxy-rectangular-standard-cpu-many-core" + ms_per_eval: 1098.57 + per_eval_source: "warm_iid_median_s" + cpus_per_eval: 1 + devices_per_eval: 0 + peak_rss_gb: 3.201 + workers_per_node: 236 + bound_by: "cores" + calls_per_s_per_node: 214.8 + n_pixels_masked: 11304 + n_vis: null + source_pixels: 1225 + record_id: "lifecycle/a3ef052bb150d3365992" + - likelihood: "multi_galaxy/rectangular" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "hst" + setup_id: "jax_cpu_sparse_fp64" + role: "secondary" + decision_id: "multi-galaxy-rectangular-standard-cpu-many-core" + ms_per_eval: 3859.38 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 3.361 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 7.514 + n_pixels_masked: 11304 + n_vis: null + source_pixels: 1225 + record_id: "lifecycle/51f5d0ecf49223f09154" + - likelihood: "multi_galaxy/rectangular" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "hst" + setup_id: "jax_gpu_dense_fp64" + role: "optimal" + decision_id: "multi-galaxy-rectangular-standard-gpu-a100" + ms_per_eval: 21.8365 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 4.645 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 183.2 + n_pixels_masked: 11304 + n_vis: null + source_pixels: 1225 + record_id: "lifecycle/6d59cdcd3eb1e4abf967" + - likelihood: "multi_galaxy/rectangular" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "hst" + setup_id: "jax_gpu_sparse_fp64" + role: "secondary" + decision_id: "multi-galaxy-rectangular-standard-gpu-a100" + ms_per_eval: 38.1069 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 3.684 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 105.0 + n_pixels_masked: 11304 + n_vis: null + source_pixels: 1225 + record_id: "lifecycle/f6d5339ad2b2bd8b790b" + - likelihood: "point_source_image/image_plane" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "simple" + setup_id: "jax_cpu_na_fp64" + role: "optimal" + decision_id: "point-source-image-image-plane-standard-cpu-many-core" + ms_per_eval: 0.954017 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 0.9769 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 30400.0 + n_pixels_masked: null + n_vis: null + source_pixels: null + record_id: "lifecycle/6cbf08c848ae6cdb820f" + - likelihood: "point_source_image/image_plane" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "simple" + setup_id: "jax_gpu_na_fp64" + role: "optimal" + decision_id: "point-source-image-image-plane-standard-gpu-a100" + ms_per_eval: 0.395082 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 1.106 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 10120.0 + n_pixels_masked: null + n_vis: null + source_pixels: null + record_id: "lifecycle/6282556b81be530f7bce" + - likelihood: "point_source_source/source_plane" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "simple" + setup_id: "jax_cpu_na_fp64" + role: "optimal" + decision_id: "point-source-source-source-plane-standard-cpu-many-core" + ms_per_eval: 0.0648602 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 0.5467 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 447100.0 + n_pixels_masked: null + n_vis: null + source_pixels: null + record_id: "lifecycle/61082dc032d7280b3bd1" + - likelihood: "point_source_source/source_plane" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "simple" + setup_id: "jax_gpu_na_fp64" + role: "optimal" + decision_id: "point-source-source-source-plane-standard-gpu-a100" + ms_per_eval: 0.123113 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 0.6731 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 32490.0 + n_pixels_masked: null + n_vis: null + source_pixels: null + record_id: "lifecycle/fcb319f0f24b8cc9fd37" + - likelihood: "weak/isothermal" + hardware_class: "cpu_many_core" + host_class: "hpc_ral_cpu" + instrument: "simple" + setup_id: "jax_cpu_dense_fp64" + role: "optimal" + decision_id: "weak-isothermal-standard-cpu-many-core" + ms_per_eval: 0.0404069 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 0 + peak_rss_gb: 0.5278 + workers_per_node: 29 + bound_by: "cores" + calls_per_s_per_node: 717700.0 + n_pixels_masked: null + n_vis: null + source_pixels: null + record_id: "lifecycle/03601d3a29aca4f5c389" + - likelihood: "weak/isothermal" + hardware_class: "gpu_a100" + host_class: "hpc_a100" + instrument: "simple" + setup_id: "jax_gpu_dense_fp64" + role: "optimal" + decision_id: "weak-isothermal-standard-gpu-a100" + ms_per_eval: 0.00893486 + per_eval_source: "vmap.per_call" + cpus_per_eval: 8 + devices_per_eval: 1 + peak_rss_gb: 0.6455 + workers_per_node: 4 + bound_by: "gpus" + calls_per_s_per_node: 447700.0 + n_pixels_masked: null + n_vis: null + source_pixels: null + record_id: "lifecycle/fbd315b1a0e03f308c76" diff --git a/autolens/point/model/analysis.py b/autolens/point/model/analysis.py index 057b7364b..182de1089 100644 --- a/autolens/point/model/analysis.py +++ b/autolens/point/model/analysis.py @@ -32,6 +32,7 @@ raise_if_setup_unresolved, ) from autolens.analysis.exceptions import raise_fit_exception +from autolens.analysis.runtime_estimate import AnalysisRuntimeEstimate from autolens.point.fit.positions.image.pair_all import FitPositionsImagePairAllSolved from autolens.point.fit.dataset import FitPointDataset from autolens.point.fit.fluxes import FitFluxes @@ -44,7 +45,9 @@ logger = logging.getLogger(__name__) -class AnalysisPoint(AnalysisSetupNoOperator, AgAnalysis, AnalysisLens): +class AnalysisPoint( + AnalysisRuntimeEstimate, AnalysisSetupNoOperator, AgAnalysis, AnalysisLens +): Visualizer = VisualizerPoint Result = ResultPoint diff --git a/autolens/weak/model/analysis.py b/autolens/weak/model/analysis.py index 682199d84..21102e9c4 100644 --- a/autolens/weak/model/analysis.py +++ b/autolens/weak/model/analysis.py @@ -23,13 +23,16 @@ AnalysisSetupNoOperator, raise_if_setup_unresolved, ) +from autolens.analysis.runtime_estimate import AnalysisRuntimeEstimate from autolens.weak.dataset import WeakDataset from autolens.weak.fit import FitWeak from autolens.weak.model.result import ResultWeak from autolens.weak.model.visualizer import VisualizerWeak -class AnalysisWeak(AnalysisSetupNoOperator, AgAnalysis, AnalysisLens): +class AnalysisWeak( + AnalysisRuntimeEstimate, AnalysisSetupNoOperator, AgAnalysis, AnalysisLens +): Visualizer = VisualizerWeak Result = ResultWeak diff --git a/test_autolens/analysis/test_runtime_estimate.py b/test_autolens/analysis/test_runtime_estimate.py new file mode 100644 index 000000000..00eed5afc --- /dev/null +++ b/test_autolens/analysis/test_runtime_estimate.py @@ -0,0 +1,513 @@ +""" +The run-time estimator (likelihood lifecycle 5E-3, PyAutoLens#887): the `runtime_estimates.yaml` loader, +row matching by decision / setup / instrument size, the Nautilus heuristic and parallel efficiency, the +one-line `Estimate:` format and the two PyAutoFit hooks on the lens analyses (`runtime_estimate`, +`resources_per_eval`). +""" + +import logging +from types import SimpleNamespace + +import pytest +import yaml + +import autofit as af +import autolens as al + +from autolens.analysis import runtime_estimate as re_mod +from autolens.analysis import wall_model + + +@pytest.fixture(autouse=True) +def unset_setup_env(monkeypatch): + monkeypatch.delenv("PYAUTO_SETUP", raising=False) + monkeypatch.delenv("PYAUTO_DISABLE_JAX", raising=False) + + +class Nautilus: + """A Nautilus-like search: only its name and `n_live` matter to the estimator.""" + + def __init__(self, n_live=150, number_of_cores=1): + self.n_live = n_live + self.number_of_cores = number_of_cores + self.paths = None + self.logger = logging.getLogger("test_runtime_estimate") + + +class Emcee: + pass + + +def _rectangular_model(): + pixelization = af.Model( + al.Pixelization, + mesh=al.mesh.RectangularUniform(shape=(3, 3)), + regularization=al.reg.Constant, + ) + return af.Collection( + galaxies=af.Collection( + lens=af.Model(al.Galaxy, redshift=0.5, mass=al.mp.IsothermalSph), + source=af.Model(al.Galaxy, redshift=1.0, pixelization=pixelization), + ) + ) + + +def _sized_imaging(n_pixels): + """An imaging-like dataset sized by its masked pixel count (what the matcher reads).""" + return SimpleNamespace(mask=SimpleNamespace(pixels_in_mask=n_pixels)) + + +def _sized_interferometer(n_vis): + return SimpleNamespace(uv_wavelengths=SimpleNamespace(shape=(n_vis, 2))) + + +def _row(**kwargs): + rows = re_mod.load_runtime_estimates()["rows"] + return next(r for r in rows if all(r.get(k) == v for k, v in kwargs.items())) + + +# Loader + + +def test__loader__version_2_rows_and_curve(): + table = re_mod.load_runtime_estimates() + + assert len(table["rows"]) > 100 + assert table["curve"][8] == pytest.approx(0.55) + assert table["curve"][1] == pytest.approx(1.0) + assert {"setup_id", "decision_id", "ms_per_eval", "n_pixels_masked", "n_vis"} <= set( + table["rows"][0] + ) + + +def test__loader__version_mismatch__clear_error(tmp_path): + path = tmp_path / "runtime_estimates.yaml" + path.write_text(yaml.safe_dump({"schema": "runtime-estimates", "version": 1})) + + with pytest.raises(ValueError, match="version 1.*version 2"): + re_mod.load_runtime_estimates(path=path) + + +def test__loader__missing_curve__falls_back_to_ported_constant(tmp_path): + path = tmp_path / "runtime_estimates.yaml" + path.write_text( + yaml.safe_dump({"schema": "runtime-estimates", "version": 2, "estimates": []}) + ) + + assert re_mod.load_runtime_estimates(path=path)["curve"] == wall_model.PARALLEL_EFFICIENCY + + +# Matching + + +@pytest.mark.parametrize( + "n_pixels, instrument", + [(3800, "euclid"), (15000, "hst"), (40000, "jwst"), (300000, "ao")], +) +def test__imaging__matched_by_masked_pixels(n_pixels, instrument): + estimate = al.estimate_runtime( + dataset=_sized_imaging(n_pixels), + model=_rectangular_model(), + search=Nautilus(), + setup="numba_cpu_sparse_fp64", + likelihood="imaging/rectangular", + ) + + assert estimate.matched_by == "size" + assert estimate.instrument == instrument + row = _row( + likelihood="imaging/rectangular", + setup_id="numba_cpu_sparse_fp64", + instrument=instrument, + ) + assert estimate.ms_per_eval == row["ms_per_eval"] + assert estimate.record_id == row["record_id"] + assert estimate.calibrated is True + + +def test__imaging__real_dataset_and_model__likelihood_from_model(masked_imaging_7x7): + estimate = al.estimate_runtime( + dataset=masked_imaging_7x7, + model=_rectangular_model(), + search=Nautilus(), + setup=al.Setup.from_setup_id("numba_cpu_sparse_fp64"), + ) + + assert estimate.likelihood == "imaging/rectangular" + assert estimate.instrument == "euclid" # 9 masked pixels: the smallest cell + assert estimate.matched_by == "size" + + +def test__decision_id__matches_rows_of_that_decision(): + setup = al.Setup.from_setup_id( + "jax_gpu_dense_fp64", + decision_id="imaging-delaunay-standard-gpu-a100", + hardware_class="gpu_a100", + ) + + estimate = al.estimate_runtime( + dataset=_sized_imaging(15000), + model=_rectangular_model(), + search=Nautilus(), + setup=setup, + ) + + assert estimate.likelihood == "imaging/delaunay" + assert estimate.instrument == "hst" + + +@pytest.mark.parametrize("n_vis, instrument", [(190, "sma"), (1_000_000, "alma")]) +def test__interferometer__matched_by_visibilities__uncalibrated(n_vis, instrument): + estimate = al.estimate_runtime( + dataset=_sized_interferometer(n_vis), + model=_rectangular_model(), + search=Nautilus(), + setup="numba_cpu_sparse_fp64_wtilde", + likelihood="interferometer/rectangular", + ) + + assert estimate.matched_by == "size" + assert estimate.instrument == instrument + assert estimate.calibrated is False + assert estimate.line().endswith(" · uncalibrated (held-out 0.2–0.5×)") + + +def test__interferometer__real_dataset__size_from_visibilities(interferometer_7): + assert re_mod.dataset_size_from(interferometer_7, "interferometer") == 7 + + +def test__no_size__several_instruments__band(): + estimate = al.estimate_runtime( + dataset=None, + model=_rectangular_model(), + search=Nautilus(), + setup="numba_cpu_sparse_fp64", + likelihood="imaging/rectangular", + ) + + assert estimate.matched_by == "band" + assert estimate.instrument is None + assert estimate.wall_seconds is None + low, high = estimate.wall_band + assert low < high + assert "(no size match; range across instruments)" in estimate.line() + + +def test__point__unknown_positions_fit__band_across_likelihoods(point_dataset): + estimate = al.estimate_runtime( + dataset=point_dataset, + model=_rectangular_model(), + search=Nautilus(), + setup="jax_cpu_na_fp64", + ) + + assert estimate.matched_by == "band" + assert estimate.ms_per_eval_band == ( + _row(likelihood="point_source_source/source_plane", setup_id="jax_cpu_na_fp64")[ + "ms_per_eval" + ], + _row(likelihood="point_source_image/image_plane", setup_id="jax_cpu_na_fp64")[ + "ms_per_eval" + ], + ) + assert "range across likelihoods" in estimate.line() + assert estimate.calibrated is True + + +def test__point__known_likelihood__single(point_dataset): + estimate = al.estimate_runtime( + dataset=point_dataset, + model=_rectangular_model(), + search=Nautilus(), + setup="jax_cpu_na_fp64", + likelihood="point_source_image/image_plane", + ) + + assert estimate.matched_by == "single" + assert estimate.instrument == "simple" + assert estimate.calibrated is True + + +def test__weak__single__uncalibrated(): + dataset = al.WeakDataset.__new__(al.WeakDataset) + + estimate = al.estimate_runtime( + dataset=dataset, + model=_rectangular_model(), + search=Nautilus(), + setup="jax_cpu_dense_fp64", + ) + + assert estimate.likelihood == "weak/isothermal" + assert estimate.matched_by == "single" + assert estimate.calibrated is False + assert estimate.note == "uncalibrated (held-out 0.2–0.5×)" + + +def test__no_setup__or_no_row__none(): + assert ( + al.estimate_runtime( + dataset=None, model=None, search=Nautilus(), setup=None + ) + is None + ) + assert ( + al.estimate_runtime( + dataset=None, + model=None, + search=Nautilus(), + setup="numba_cpu_dense_fp32", + likelihood="imaging/rectangular", + ) + is None + ) + + +# Heuristic, efficiency and line + + +def test__non_nautilus__no_estimate_line(): + estimate = al.estimate_runtime( + dataset=_sized_imaging(15000), + model=_rectangular_model(), + search=Emcee(), + setup="numba_cpu_sparse_fp64", + likelihood="imaging/rectangular", + ) + + assert estimate.wall_seconds is None + assert estimate.expected_evals is None + assert estimate.line() == ( + "Estimate: ~697 ms/eval (hst cell) · no estimate for Emcee " + "(run-time model covers Nautilus only)" + ) + + +def test__real_nautilus__recognised(): + estimate = al.estimate_runtime( + dataset=_sized_imaging(15000), + model=_rectangular_model(), + search=af.Nautilus(name="runtime_estimate_test", n_live=150), + setup="numba_cpu_sparse_fp64", + likelihood="imaging/rectangular", + ) + + assert estimate.n_live == 150 + assert estimate.wall_seconds is not None + + +def test__numba__efficiency_applied__wall_model(): + model = _rectangular_model() + + estimate = al.estimate_runtime( + dataset=_sized_imaging(15000), + model=model, + search=Nautilus(n_live=150), + setup="numba_cpu_sparse_fp64", + number_of_cores=8, + likelihood="imaging/rectangular", + ) + + evals = round(4.30 * 150 * model.prior_count**1.637 * 1.13) + per_call = 0.696736 / (8 * 0.55) + + assert estimate.expected_evals == evals + assert estimate.evals_model == "nautilus-heuristic" + assert estimate.parallel_efficiency == pytest.approx(0.55) + assert estimate.number_of_cores == 8 + assert estimate.wall_seconds == pytest.approx(30 + evals * (0.014 + per_call)) + assert "η=0.55 on 8 cores" in estimate.line() + + +def test__numba__efficiency_between_sweep_points__next_lower(): + estimate = al.estimate_runtime( + dataset=_sized_imaging(15000), + model=_rectangular_model(), + search=Nautilus(), + setup="numba_cpu_sparse_fp64", + number_of_cores=12, + likelihood="imaging/rectangular", + ) + + assert estimate.parallel_efficiency == pytest.approx(0.55) + + +def test__jax__per_call_as_is__one_worker(): + model = _rectangular_model() + + estimate = al.estimate_runtime( + dataset=_sized_imaging(15000), + model=model, + search=Nautilus(n_live=150), + setup="jax_gpu_dense_fp64", + number_of_cores=8, + likelihood="imaging/rectangular", + ) + + evals = estimate.expected_evals + assert estimate.parallel_efficiency is None + assert estimate.number_of_cores == 1 + assert estimate.wall_seconds == pytest.approx(30 + evals * (0.014 + 0.0246826)) + assert "1 worker (JAX)" in estimate.line() + assert "η=" not in estimate.line() + + +def test__line__one_line_format(): + line = al.estimate_runtime( + dataset=_sized_imaging(15000), + model=_rectangular_model(), + search=Nautilus(n_live=150), + setup="numba_cpu_sparse_fp64", + number_of_cores=8, + likelihood="imaging/rectangular", + ).line() + + assert "\n" not in line + assert line.startswith("Estimate: ~697 ms/eval (hst cell) · Nautilus n_live=150 ≈ ") + assert "evals (heuristic) · η=0.55 on 8 cores · ~" in line + assert line.endswith(" on this hardware") + + +# Analysis hooks + + +def _imaging_analysis(dataset, setup): + analysis = al.AnalysisImaging( + dataset=dataset, raise_inversion_positions_likelihood_exception=False + ) + analysis.setup = al.Setup.from_setup_id(setup) if setup else None + analysis._runtime_estimate_model = _rectangular_model() + return analysis + + +def test__analysis__no_setup__no_estimate_no_resources(masked_imaging_7x7): + analysis = al.AnalysisImaging(dataset=masked_imaging_7x7) + + assert analysis.runtime_estimate(search=Nautilus(), model=_rectangular_model()) is None + assert analysis.resources_per_eval() is None + + +def test__analysis__resources_per_eval__matched_row(masked_imaging_7x7): + analysis = _imaging_analysis(masked_imaging_7x7, "numba_cpu_sparse_fp64_wtilde") + assert analysis.resources_per_eval() is None # no row for that setup + + analysis = _imaging_analysis(masked_imaging_7x7, "jax_cpu_sparse_fp64") + row = _row( + likelihood="imaging/rectangular", + setup_id="jax_cpu_sparse_fp64", + instrument="euclid", + ) + + assert analysis.resources_per_eval() == { + "cpus_per_eval": row["cpus_per_eval"], + "peak_rss_gb": row["peak_rss_gb"], + } + + +def test__analysis__resources_per_eval__unmatched__largest_peak_rss(masked_imaging_7x7): + analysis = _imaging_analysis(masked_imaging_7x7, "jax_cpu_sparse_fp64") + analysis.dataset = None # no size to match + + rows = [ + r + for r in re_mod.load_runtime_estimates()["rows"] + if r["likelihood"] == "imaging/rectangular" + and r["setup_id"] == "jax_cpu_sparse_fp64" + ] + + assert analysis.resources_per_eval()["peak_rss_gb"] == max( + r["peak_rss_gb"] for r in rows + ) + + +def test__analysis__resources_per_eval__never_raises(masked_imaging_7x7, monkeypatch): + analysis = _imaging_analysis(masked_imaging_7x7, "jax_cpu_sparse_fp64") + + def boom(**kwargs): + raise RuntimeError("boom") + + monkeypatch.setattr(re_mod, "matched_rows_for", boom) + + assert analysis.resources_per_eval() is None + assert analysis.runtime_estimate(search=Nautilus(), model=None) is None + + +def test__analysis__interferometer__estimate_line(interferometer_7): + analysis = al.AnalysisInterferometer(dataset=interferometer_7) + analysis.setup = al.Setup.from_setup_id("numba_cpu_sparse_fp64_wtilde") + + line = analysis.runtime_estimate( + search=Nautilus(), model=_rectangular_model(), number_of_cores=4 + ) + + assert line.startswith("Estimate: ~231 ms/eval (sma cell)") + assert "η=0.62 on 4 cores" in line + assert line.endswith("uncalibrated (held-out 0.2–0.5×)") + + +def test__analysis__point__estimate_line_from_positions_fit(point_dataset): + analysis = al.AnalysisPoint( + dataset=point_dataset, + solver=al.m.MockPointSolver(model_positions=point_dataset.positions), + fit_positions_cls=al.FitPositionsSource, + ) + analysis.setup = al.Setup.from_setup_id("jax_cpu_na_fp64") + + line = analysis.runtime_estimate( + search=Nautilus(), model=_rectangular_model(), number_of_cores=1 + ) + + assert line.startswith("Estimate: ~0.065 ms/eval (simple cell)") + assert "1 worker (JAX)" in line + assert analysis.resources_per_eval()["peak_rss_gb"] == pytest.approx(0.5467) + + +def test__hook__resolve_fit_parallel_logs_estimate(masked_imaging_7x7, caplog): + pytest.importorskip("numba") + from autofit.non_linear.search.runtime import resolve_fit_parallel + + model = _rectangular_model() + analysis = al.AnalysisImaging( + dataset=masked_imaging_7x7, + setup="numba_cpu_sparse_fp64", + raise_inversion_positions_likelihood_exception=False, + ) + analysis.modify_before_fit(paths=af.DirectoryPaths(), model=model) + + search = Nautilus(n_live=150, number_of_cores=8) + + with caplog.at_level(logging.INFO): + resolution = resolve_fit_parallel(search=search, analysis=analysis, model=model) + + assert resolution.number_of_cores == 8 + estimates = [r.message for r in caplog.records if r.message.startswith("Estimate:")] + assert len(estimates) == 1 + assert estimates[0].startswith("Estimate: ~283 ms/eval (euclid cell)") + assert "η=0.55 on 8 cores" in estimates[0] + + +def test__hook__auto_cores_capped_by_peak_rss(masked_imaging_7x7, monkeypatch): + pytest.importorskip("numba") + from autofit.non_linear.parallel import pool + + model = _rectangular_model() + analysis = al.AnalysisImaging( + dataset=masked_imaging_7x7, + setup="numba_cpu_sparse_fp64", + raise_inversion_positions_likelihood_exception=False, + ) + analysis.modify_before_fit(paths=af.DirectoryPaths(), model=model) + # An hst-sized dataset (15380 masked pixels): the hst cell, 1.024 GB peak RSS. + mask = al.Mask2D.circular(shape_native=(150, 150), pixel_scales=0.05, radius=3.5) + analysis.dataset = al.Imaging( + data=al.Array2D.ones(shape_native=(150, 150), pixel_scales=0.05), + noise_map=al.Array2D.ones(shape_native=(150, 150), pixel_scales=0.05), + ).apply_mask(mask) + + monkeypatch.setattr(pool, "detected_cores", lambda: 64) + monkeypatch.setattr(pool, "available_memory_gb", lambda: 10.0) + + resolution = pool.resolve_number_of_cores("auto", analysis=analysis) + + assert resolution.number_of_cores == 9 # floor(10 / 1.024) + assert resolution.reason == "memory"