Exceptions

Every error evomo can surface comes from one of two layers: the evoxc compiler, which raises EVOXCError and its subclasses, or the eager host-side validation that runs in make_* and UnifiedWorkflow.__init__ before any graph is traced. The first family is never caught or re-wrapped by evomo; the second exists so a user mistake fails at construction instead of inside a compile.

Compiler errors (EVOXCError)

from evoxc import EVOXCError, TraceError, ShapeError, DTypeError, BackendError, DeviceError, PersistenceError, TransformError, VerificationError — the nine classes that exist in evoxc today, all direct subclasses of EVOXCError (which subclasses Exception).

Class Raised when What to do
EVOXCError The base class of the whole family; catching it catches every compiler failure. Catch it for reporting or diagnostics only — never to retry on another backend.
TraceError A graph-building operation runs outside a valid trace, or a traced construct the compiler forbids is used: an evoxc tensor op called at import time or inside make_*, boolean-mask indexing, .item(), a Python if on a tensor value. Move the op into init/init_step/step/evaluate; replace mask indexing with masked_select_indices, lexsort + gather or topk (src/evomo/DESIGN.md §1 and §5).
ShapeError A traced op receives operands whose shapes or ranks disagree, or shape inference fails. Eager column checks are earlier and different: problems/_ops.py::check_columns raises a ValueError naming the expected d. Inside a workflow run the step graph is re-traced when the state signature changes, so a ShapeError points at a kernel or graph bug, or at running a graph by hand on a state it was not traced for.
DTypeError An object cannot be normalized to a supported dtype, or an operation or backend does not support the dtype it was given. Keep every array you pass at float32/int32/int64; evomo normalizes bounds and state leaves itself and does not raise this directly.
BackendError The selected backend cannot lower, compile, load or execute the graph: a missing optional dependency (the message carries the pip hint, e.g. pip install evoxc[iree]), an op the backend defers (flip, cumsum, erf, ... on StableHLO), a PJRT plugin failing its ABI gate, or MoRobtrol on a compiled backend. Use the lowering-safe helpers in evomo.problems._ops for deferred ops, install the extra, or switch backend/device — see {doc}../guide/backends.
DeviceError Device errors: an unknown device kind or index, a device mismatch, DLPack interop failure, or multi-device preparation. UnifiedWorkflow parses device="rocm:0" eagerly, but the kind is only validated when the first tensor is placed on it during init(). Use "cpu", "cuda:N" or "rocm:N" on a backend that registers the transfer provider (see {doc}../guide/installation).
PersistenceError Saving or loading a compiled artifact from the opt-in cache_dir fails: format mismatch, integrity failure, or backend/device/ABI incompatibility. Executable.load never silently re-traces. A corrupt or incompatible container read from cache_dir is a cache miss in evomo's artifact cache, so a PersistenceError that reaches you comes from the write side; delete the directory and rerun.
TransformError A graph-to-graph transform (vectorize/vmap, grad, jvp, vjp) is misused. evomo never applies evoxc graph transforms, so this can only come from your own solution_transform/fitness_transform; write it without them.
VerificationError IR verification fails after lowering: a malformed module, an operand/result mismatch, or a violated invariant. Treat it as a compiler bug or an unsupported op combination and report it with the failing graph; there is no evomo-side fix.

No wrapping, no backend fallback

evomo adds no try/except around a build, a compile or a run and no error wrapping: a backend failure surfaces as the original evoxc error with its own message and pip hint, and nothing is silently retried on the numpy backend. The single deliberate exception is the opt-in artifact cache: when cache_dir is set, a PersistenceError or OSError raised while loading a cached executable is treated as a cache miss and the graph is recompiled for the same backend — never retried elsewhere, and never used to hide a compile failure.

Eager host-side errors

These are raised before any graph exists, so they point at the exact argument that is wrong and never depend on a backend.

Exception Raised by Example
TypeError UnifiedWorkflow.__init__ Expect solution transform to be callable, got 3 (same for fitness transform); cache_dir must be None, a str or an os.PathLike, got <class 'int'>; compile_options must be a dict or None, ...; device must be None, a str or an evoxc.core.Device, ...; a component that is a class rather than a config dataclass instance; a non-bool TAKES_CV
TypeError any make_* an unknown keyword argument — there is no **kwargs sink (DESIGN §8)
TypeError UnifiedWorkflow.__init__ opt_direction that is neither a str nor a list/tuple of "min"/"max"
ValueError any make_*, normalize_bounds pop_size must be an int, got True (bool); lb and ub must be 1-D, ...; lb and ub must be finite, ...; lb must be strictly less than ub, got lb[3]=... >= ub[3]=...
ValueError UnifiedWorkflow.__init__ Expect optimization direction to be `min` or `max`, got worst; opt_direction has length 2 but n_objs is 3; cache_dir must be a non-empty path (or None); compile_options containing a reserved backend/device key
ValueError UnifiedWorkflow.__init__ pairing a constrained problem with an objective-only algorithm — algorithm module 'evomo.algorithms.many.hea' declares TAKES_CV=False but problem module 'evomo.problems.constrained.ctp' is constrained; constraint violations are never silently dropped (see {doc}../guide/constraints)
ValueError UnifiedWorkflow.run/fit The number of generations must be specified either in the constructor (num_generations) or in run(generations=...).; fit under a multi-objective monitor; a monitor without get_best_fitness
ValueError EvalMonitor accessors Multi-objective optimization does not have a single best solution. Please use get_pf_solutions — raised by get_best_fitness/get_best_solution under multi_obj=True
RuntimeError UnifiedWorkflow.step/init_step/final_step Workflow is not initialized: call init() first. — the init/step lifecycle is in {doc}../guide/workflows
NotImplementedError UnifiedWorkflow.__init__ distributed/multi-rank evaluation is not supported in evomo 1.0: enable_distributed=True has no equivalent on evoxc and the constraint-violation gather has no 1.0 replacement

A make_* validates every argument eagerly and names the offending argument and value; the per-algorithm argument list is in {doc}algorithms and on the algorithm's own AutoAPI module page.

An actionable compiler diagnostic

A missing or incompatible PJRT plugin is the most common compiled-backend failure. This is the exact BackendError text evoxc raises when the installed jax-rocm7-pjrt was built against ROCm's pip "sysdeps" libraries instead of a system ROCm install:

evoxc.core.errors.BackendError: the PJRT plugin at
'/tmp/evomo_env/lib/python3.12/site-packages/jax_plugins/xla_rocm7/xla_rocm_plugin.so'
failed the ABI gate: failed to load the PJRT plugin library
'.../xla_rocm_plugin.so': librocm_sysdeps_drm.so.2: cannot open shared object file: No such file
or directory — point EVOXC_PJRT_PLUGIN or options['plugin_path'] at a plugin built from the
compatible PJRT C API header

The working pin and the environment knobs it needs are in {doc}../guide/installation; the same text with the accepted and rejected alternatives is in scripts/README.md.