e3j.utils.config.Config

class e3j.utils.config.Config(layout: Layout = Layout.TRAILING_CHANNELS, tensor_product: TensorProduct = TensorProduct.SPARSE, aggregation: Aggregation = Aggregation.SCATTER, debug_level: int = 0)

Global configuration for e3j.

Controls evaluation strategy, aggregation method, array layout, and debug verbosity. Values can be set programmatically or loaded from a YAML file (see E3J_CONFIG environment variable).

While Config objects are plain dataclasses with additional I/O and serialization support, the global mutable state is of type config (lower case).

layout

Default array layout for equivariant features. See Layout.

Type:

e3j.utils.options.Layout

tensor_product

Evaluation strategy for tensor products. See TensorProduct.

Type:

e3j.utils.options.TensorProduct

aggregation

Aggregation method for sparse reduction steps. Only used if tensor_product option is “SPARSE”. See Aggregation.

Type:

e3j.utils.options.Aggregation

debug_level

Verbosity level (0 = silent).

Type:

int

Example:

>>> cfg: Config = config.state()

Methods

__init__([layout, tensor_product, ...])

fields()

from_yaml(path)

options()

to_dict()

to_yaml([path])

Attributes

__init__(layout: Layout = Layout.TRAILING_CHANNELS, tensor_product: TensorProduct = TensorProduct.SPARSE, aggregation: Aggregation = Aggregation.SCATTER, debug_level: int = 0) None