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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ model composition, non-linear search, and Bayesian inference: `af.Model` /
`af.Collection`, the `af.Analysis` interface, MCMC / nested-sampling / MLE
searches, samples, aggregator, and a SQLAlchemy results database.

Dependency direction: autofit depends on **autoconf** only. It does **not**
Dependency direction: autofit depends on **autonerves** only. It does **not**
import `autoarray`, `autogalaxy`, or `autolens` — never add such an import.
Shared utilities (e.g. `test_mode`, `jax_wrapper`) belong in autoconf.
Shared utilities (e.g. `test_mode`, `jax_wrapper`) belong in autonerves.

## Related repos

Expand Down Expand Up @@ -47,7 +47,7 @@ is no black/ruff/flake8 gate — formatting is advisory. (`requires-python` in

## Configuration & defaults

autoconf supplies the packaged defaults under `autofit/config/`. Workspaces
autonerves supplies the packaged defaults under `autofit/config/`. Workspaces
override them via their own `config/` directory; the test suite pushes a local
config dir via `conf.instance.push(...)` in `test_autofit/conftest.py`. When a
change adds a new config key, mirror it into the packaged defaults so
Expand All @@ -70,7 +70,7 @@ nautilus; MLE: LBFGS/BFGS/drawer), `mapper/` (model + priors),

## Key rules / footguns

- Import direction: autoconf only — never `autoarray` / `autogalaxy` /
- Import direction: autonerves only — never `autoarray` / `autogalaxy` /
`autolens`.
- **The EP seam rule**: `autofit/graphical` is two layers — the inner
factor-graph/message engine and the `declarative/` user layer. A new
Expand Down
26 changes: 13 additions & 13 deletions autofit/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from autoconf import jax_wrapper
from autoconf.dictable import register_parser
from autonerves import jax_wrapper
from autonerves.dictable import register_parser
from . import conf

conf.instance.register(__file__)
Expand Down Expand Up @@ -146,34 +146,34 @@ def save_abc(pickler, obj):

__version__ = "2026.7.9.1"

from autoconf import check_version
from autonerves import check_version

check_version(__version__)

# ---------------------------------------------------------------------------
# Public re-export of the autoconf configuration / serialization surface.
# Public re-export of the autonerves configuration / serialization surface.
#
# Workspaces, tutorials and downstream code import these names from the science
# library (e.g. ``from autolens import conf``) rather than depending on the
# ``autoconf`` package directly, so the underlying configuration / serialization
# ``autonerves`` package directly, so the underlying configuration / serialization
# layer stays an implementation detail of the library.
# ---------------------------------------------------------------------------
# ``conf`` is already exported above (``from . import conf``); the names below
# complete the surface.
from autoconf import jax_wrapper
from autoconf import fitsable
from autoconf import setup_colab
from autoconf import setup_notebook
from autoconf.conf import with_config
from autoconf.dictable import from_dict, from_json, to_dict, output_to_json
from autoconf.fitsable import (
from autonerves import jax_wrapper
from autonerves import fitsable
from autonerves import setup_colab
from autonerves import setup_notebook
from autonerves.conf import with_config
from autonerves.dictable import from_dict, from_json, to_dict, output_to_json
from autonerves.fitsable import (
output_to_fits,
hdu_list_for_output_from,
ndarray_via_fits_from,
ndarray_via_hdu_from,
header_obj_from,
)
from autoconf.test_mode import (
from autonerves.test_mode import (
with_test_mode_segment,
skip_visualization,
skip_fit_output,
Expand Down
2 changes: 1 addition & 1 deletion autofit/aggregator/file_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import dill

from autoconf.dictable import from_dict
from autonerves.dictable import from_dict


class FileOutput(ABC):
Expand Down
8 changes: 4 additions & 4 deletions autofit/aggregator/search_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import dill
from PIL import Image

from autoconf import cached_property
from autoconf.class_path import get_class
from autonerves import cached_property
from autonerves.class_path import get_class
from autofit.non_linear.samples import Samples

from autofit.non_linear.samples.pdf import SamplesPDF
Expand All @@ -20,7 +20,7 @@
)
from autofit.mapper.identifier import Identifier
from autofit.non_linear.samples.sample import samples_from_iterator
from autoconf.dictable import from_dict
from autonerves.dictable import from_dict
from autofit.non_linear.samples.summary import SamplesSummary
from autofit.non_linear.samples.util import simple_model_for_kwargs
from . import fit_interface
Expand Down Expand Up @@ -164,7 +164,7 @@ def value(self, name: str):
This may be a pickle, json, csv or fits file.

If the JSON has a specified type it is parsed as that type. See dictable.py
in autoconf.
in autonerves.

Returns None if the file does not exist.

Expand Down
2 changes: 1 addition & 1 deletion autofit/conf.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from autoconf.conf import *
from autonerves.conf import *
2 changes: 1 addition & 1 deletion autofit/database/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from .sqlalchemy_ import sa

from autoconf import conf
from autonerves import conf
from .aggregator import *
from .migration.steps import migrator
from .model import *
Expand Down
2 changes: 1 addition & 1 deletion autofit/database/model/array.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import numpy as np

from autoconf.class_path import get_class_path, get_class
from autonerves.class_path import get_class_path, get_class
from .model import Object
from ..sqlalchemy_ import sa

Expand Down
2 changes: 1 addition & 1 deletion autofit/database/model/fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import numpy as np

from autoconf.dictable import from_dict
from autonerves.dictable import from_dict
from autofit.mapper.prior_model.abstract import AbstractPriorModel
from autofit.non_linear.samples import Samples
from .model import Base, Object
Expand Down
2 changes: 1 addition & 1 deletion autofit/database/model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import numpy as np

from autoconf.class_path import get_class, get_class_path
from autonerves.class_path import get_class, get_class_path
from ..sqlalchemy_ import sa
from sqlalchemy.orm import declarative_base

Expand Down
2 changes: 1 addition & 1 deletion autofit/exc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from autoconf.exc import PriorException
from autonerves.exc import PriorException


class MessageException(PriorException):
Expand Down
2 changes: 1 addition & 1 deletion autofit/graphical/expectation_propagation/ep_mean_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import numpy as np

from autoconf import cached_property
from autonerves import cached_property
from autofit.graphical.factor_graphs.factor import Factor
from autofit.graphical.factor_graphs.graph import FactorGraph
from autofit.graphical.mean_field import MeanField, FactorApproximation
Expand Down
2 changes: 1 addition & 1 deletion autofit/graphical/factor_graphs/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

import numpy as np

from autoconf import cached_property
from autonerves import cached_property
from autofit.graphical.utils import (
FlattenArrays,
nested_filter,
Expand Down
2 changes: 1 addition & 1 deletion autofit/graphical/factor_graphs/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import numpy as np

from autoconf import cached_property
from autonerves import cached_property
from autofit.graphical.factor_graphs.abstract import FactorValue, AbstractNode
from autofit.graphical.factor_graphs.factor import Factor
from autofit.graphical.factor_graphs.jacobians import VectorJacobianProduct
Expand Down
2 changes: 1 addition & 1 deletion autofit/graphical/factor_graphs/jacobians.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import numpy as np

from autoconf import cached_property
from autonerves import cached_property
from autofit.graphical.utils import (
nested_filter,
nested_update,
Expand Down
2 changes: 1 addition & 1 deletion autofit/graphical/factor_graphs/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import numpy as np

from autoconf import cached_property
from autonerves import cached_property
from autofit.graphical.factor_graphs.abstract import AbstractNode, Value, FactorValue
# from ...mapper.operator import
from autofit.mapper.operator import (
Expand Down
2 changes: 1 addition & 1 deletion autofit/graphical/laplace/line_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

import numpy as np

from autoconf import cached_property
from autonerves import cached_property
from autofit.graphical.factor_graphs.abstract import (
FactorValue,
FactorInterface,
Expand Down
2 changes: 1 addition & 1 deletion autofit/graphical/mean_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import numpy as np

from autoconf import cached_property
from autonerves import cached_property
from autofit import exc
from autofit.graphical.factor_graphs.abstract import AbstractNode
from autofit.graphical.factor_graphs.factor import Factor
Expand Down
4 changes: 2 additions & 2 deletions autofit/jax/pytrees.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

The classes themselves already carry the necessary ``tree_flatten`` /
``tree_unflatten`` methods. This module simply registers them with
``jax.tree_util`` on demand, via the lazy autoconf wrapper, so callers can
``jax.tree_util`` on demand, via the lazy autonerves wrapper, so callers can
pass ``Model`` / ``Collection`` / ``ModelInstance`` / prior instances
through ``jax.jit`` and ``jax.vmap`` directly.
"""

from autoconf.jax_wrapper import register_pytree_node, register_pytree_node_class
from autonerves.jax_wrapper import register_pytree_node, register_pytree_node_class

_ENABLED = False
_REGISTERED_INSTANCE_CLASSES: set = set()
Expand Down
2 changes: 1 addition & 1 deletion autofit/mapper/identifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from hashlib import md5
from typing import Optional

from autoconf.class_path import get_class_path
from autonerves.class_path import get_class_path

# floats are rounded to this increment so floating point errors
# have no impact on identifier value
Expand Down
2 changes: 1 addition & 1 deletion autofit/mapper/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def _cached_property_names(cls) -> frozenset:
downstream JAX pytree flattening. See PyAutoFit#1300 for the
diagnosed leak this defends against.
"""
from autoconf.tools.decorators import cached_property_names
from autonerves.tools.decorators import cached_property_names

return cached_property_names(cls)

Expand Down
4 changes: 2 additions & 2 deletions autofit/mapper/model_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
from typing import Type, Union, Tuple, Optional, Dict
import logging

from autoconf.class_path import get_class
from autoconf.dictable import from_dict, to_dict
from autonerves.class_path import get_class
from autonerves.dictable import from_dict, to_dict
from .identifier import Identifier

logger = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion autofit/mapper/operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import numpy as np


from autoconf import cached_property
from autonerves import cached_property


class LinearOperator(ABC):
Expand Down
2 changes: 1 addition & 1 deletion autofit/mapper/prior/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import numpy as np

from autoconf import conf
from autonerves import conf

from autofit.mapper.prior.arithmetic import ArithmeticMixin
from autofit.mapper.prior.constant import Constant
Expand Down
4 changes: 2 additions & 2 deletions autofit/mapper/prior/width_modifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import sys
from abc import ABC, abstractmethod

from autoconf import conf
from autoconf.exc import ConfigException
from autonerves import conf
from autonerves.exc import ConfigException

logger = logging.getLogger(__name__)

Expand Down
4 changes: 2 additions & 2 deletions autofit/mapper/prior_model/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

import numpy as np

from autoconf import conf
from autoconf.exc import ConfigException
from autonerves import conf
from autonerves.exc import ConfigException
from autofit import exc
from autofit.mapper import model
from autofit.mapper.model import AbstractModel, frozen_cache
Expand Down
2 changes: 1 addition & 1 deletion autofit/mapper/prior_model/array.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Tuple, Dict, Optional, Union

from autoconf.dictable import from_dict
from autonerves.dictable import from_dict
from .abstract import AbstractPriorModel
from autofit.mapper.prior.abstract import Prior
import numpy as np
Expand Down
4 changes: 2 additions & 2 deletions autofit/mapper/prior_model/prior_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import typing
from typing import *

from autoconf.class_path import get_class_path
from autoconf.exc import ConfigException
from autonerves.class_path import get_class_path
from autonerves.exc import ConfigException
from autofit.mapper.model import assert_not_frozen
from autofit.mapper.model_object import ModelObject
from autofit.mapper.prior.abstract import Prior
Expand Down
2 changes: 1 addition & 1 deletion autofit/mapper/variable.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from math import sqrt

import numpy as np
from autoconf import cached_property
from autonerves import cached_property

from autofit.mapper.model_object import ModelObject

Expand Down
2 changes: 1 addition & 1 deletion autofit/mapper/variable_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import numpy as np

from autoconf import cached_property
from autonerves import cached_property

from autofit.mapper.operator import (
LinearOperator,
Expand Down
2 changes: 1 addition & 1 deletion autofit/messages/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import numpy as np

from autoconf import cached_property
from autonerves import cached_property
from ..mapper.variable import Variable

from .interface import MessageInterface
Expand Down
2 changes: 1 addition & 1 deletion autofit/messages/beta.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import numpy as np

from autoconf import cached_property
from autonerves import cached_property
from ..messages.abstract import AbstractMessage


Expand Down
2 changes: 1 addition & 1 deletion autofit/messages/fixed.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import numpy as np

from autoconf import cached_property
from autonerves import cached_property
from autofit.messages.abstract import AbstractMessage


Expand Down
2 changes: 1 addition & 1 deletion autofit/messages/gamma.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import numpy as np

from autoconf import cached_property
from autonerves import cached_property
from autofit.messages.abstract import AbstractMessage
from autofit.messages.utils import invpsilog

Expand Down
2 changes: 1 addition & 1 deletion autofit/messages/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import numpy as np

from autoconf import cached_property
from autonerves import cached_property


class MessageInterface(ABC):
Expand Down
Loading
Loading