nvalchemi.distributed.AdapterRegistry#

class nvalchemi.distributed.AdapterRegistry[source]#

Owns the install / restore lifecycle for a set of adapters.

DistributedModel instantiates a registry on __enter__, calls install() with the adapters declared on the spec’s DistributionSpec, and calls restore() on __exit__.

install is fail-fast: if any adapter raises, all previously-installed adapters are rolled back before the exception propagates. restore is best-effort: failures are logged but don’t raise (so a single broken adapter doesn’t block teardown of the others).

install(adapters)[source]#

Install each adapter in order. Rolls back partial state on failure and re-raises.

Parameters:

adapters (Sequence[Any])

Return type:

None

list_active()[source]#

Return the introspectable lifecycle status of each adapter registered in this registry.

Return type:

list[AdapterStatus]

restore()[source]#

Restore all installed adapters in reverse order. Failures are logged; never raises.

Return type:

None