vortex_torch.flow.registry

Functions

get(name)

Return the registered class for a given name, or raise if not found.

has(name)

Check whether a name is registered.

list_keys()

List all registered names.

register(name)

Decorator used by users to register their vFlow subclasses.

Exceptions

RegistryError

Errors related to class registration and lookup.

exception vortex_torch.flow.registry.RegistryError[source]

Bases: Exception

Errors related to class registration and lookup.

vortex_torch.flow.registry.register(name)[source]

Decorator used by users to register their vFlow subclasses. .. rubric:: Example

@register(“cls_a”) class MyFlow(vFlow): …

Parameters:

name (str)

vortex_torch.flow.registry.get(name)[source]

Return the registered class for a given name, or raise if not found.

Parameters:

name (str)

Return type:

Type[vFlow]

vortex_torch.flow.registry.has(name)[source]

Check whether a name is registered.

Parameters:

name (str)

Return type:

bool

vortex_torch.flow.registry.list_keys()[source]

List all registered names.