simpleml.registries

Import path for the different registries available

Submodules

Package Contents

Classes

DatasetRegistry

Metaclass for defining Abstract Base Classes (ABCs).

KerasRegistry

Metaclass for defining Abstract Base Classes (ABCs).

MetaRegistry

Metaclass for defining Abstract Base Classes (ABCs).

MetricRegistry

Metaclass for defining Abstract Base Classes (ABCs).

ModelRegistry

Metaclass for defining Abstract Base Classes (ABCs).

NamedRegistry

Explicitly named version of the registry (not implicit on class names)

PipelineRegistry

Metaclass for defining Abstract Base Classes (ABCs).

Registry

Importable class to maintain reference to the global registry

Attributes

DATASET_REGISTRY

FILEPATH_REGISTRY

KERAS_REGISTRY

LOAD_METHOD_REGISTRY

METRIC_REGISTRY

MODEL_REGISTRY

PIPELINE_REGISTRY

SAVE_METHOD_REGISTRY

SIMPLEML_REGISTRY

__author__

simpleml.registries.DATASET_REGISTRY[source]
simpleml.registries.FILEPATH_REGISTRY[source]
simpleml.registries.KERAS_REGISTRY[source]
simpleml.registries.LOAD_METHOD_REGISTRY[source]
simpleml.registries.METRIC_REGISTRY[source]
simpleml.registries.MODEL_REGISTRY[source]
simpleml.registries.PIPELINE_REGISTRY[source]
simpleml.registries.SAVE_METHOD_REGISTRY[source]
simpleml.registries.SIMPLEML_REGISTRY[source]
simpleml.registries.__author__ = Elisha Yadgaran[source]
class simpleml.registries.DatasetRegistry[source]

Bases: MetaRegistry

Metaclass for defining Abstract Base Classes (ABCs).

Use this metaclass to create an ABC. An ABC can be subclassed directly, and then acts as a mix-in class. You can also register unrelated concrete classes (even built-in classes) and unrelated ABCs as ‘virtual subclasses’ – these and their descendants will be considered subclasses of the registering ABC by the built-in issubclass() function, but the registering ABC won’t show up in their MRO (Method Resolution Order) nor will method implementations defined by the registering ABC be callable (not even via super()).

class simpleml.registries.KerasRegistry[source]

Bases: abc.ABCMeta

Metaclass for defining Abstract Base Classes (ABCs).

Use this metaclass to create an ABC. An ABC can be subclassed directly, and then acts as a mix-in class. You can also register unrelated concrete classes (even built-in classes) and unrelated ABCs as ‘virtual subclasses’ – these and their descendants will be considered subclasses of the registering ABC by the built-in issubclass() function, but the registering ABC won’t show up in their MRO (Method Resolution Order) nor will method implementations defined by the registering ABC be callable (not even via super()).

class simpleml.registries.MetaRegistry[source]

Bases: MetaBase, abc.ABCMeta

Metaclass for defining Abstract Base Classes (ABCs).

Use this metaclass to create an ABC. An ABC can be subclassed directly, and then acts as a mix-in class. You can also register unrelated concrete classes (even built-in classes) and unrelated ABCs as ‘virtual subclasses’ – these and their descendants will be considered subclasses of the registering ABC by the built-in issubclass() function, but the registering ABC won’t show up in their MRO (Method Resolution Order) nor will method implementations defined by the registering ABC be callable (not even via super()).

class simpleml.registries.MetricRegistry[source]

Bases: MetaRegistry

Metaclass for defining Abstract Base Classes (ABCs).

Use this metaclass to create an ABC. An ABC can be subclassed directly, and then acts as a mix-in class. You can also register unrelated concrete classes (even built-in classes) and unrelated ABCs as ‘virtual subclasses’ – these and their descendants will be considered subclasses of the registering ABC by the built-in issubclass() function, but the registering ABC won’t show up in their MRO (Method Resolution Order) nor will method implementations defined by the registering ABC be callable (not even via super()).

class simpleml.registries.ModelRegistry[source]

Bases: MetaRegistry

Metaclass for defining Abstract Base Classes (ABCs).

Use this metaclass to create an ABC. An ABC can be subclassed directly, and then acts as a mix-in class. You can also register unrelated concrete classes (even built-in classes) and unrelated ABCs as ‘virtual subclasses’ – these and their descendants will be considered subclasses of the registering ABC by the built-in issubclass() function, but the registering ABC won’t show up in their MRO (Method Resolution Order) nor will method implementations defined by the registering ABC be callable (not even via super()).

class simpleml.registries.NamedRegistry[source]

Bases: Registry

Explicitly named version of the registry (not implicit on class names)

context_register(self, name, cls)

Context manager to temporarily overwrite registry value Reverts to original value on exit

usage: ``` with NamedRegistry(…).context_register(name, cls):

```

Parameters
  • name (str) –

  • cls (Type) –

Return type

None

register(self, name, cls, allow_duplicates=True)
Parameters
  • name (str) –

  • cls (Type) –

  • allow_duplicates (bool) –

Return type

None

class simpleml.registries.PipelineRegistry[source]

Bases: MetaRegistry

Metaclass for defining Abstract Base Classes (ABCs).

Use this metaclass to create an ABC. An ABC can be subclassed directly, and then acts as a mix-in class. You can also register unrelated concrete classes (even built-in classes) and unrelated ABCs as ‘virtual subclasses’ – these and their descendants will be considered subclasses of the registering ABC by the built-in issubclass() function, but the registering ABC won’t show up in their MRO (Method Resolution Order) nor will method implementations defined by the registering ABC be callable (not even via super()).

class simpleml.registries.Registry[source]

Bases: object

Importable class to maintain reference to the global registry

clear(self)

Clear registry

Return type

None

context_register(self, cls)

Context manager to temporarily overwrite registry value Reverts to original value on exit

usage: ``` with Registry(…).context_register(cls):

```

Parameters

cls (Type) –

Return type

None

drop(self, key)

Drop key from registry

Parameters

key (str) –

Return type

None

get(self, class_name)
Parameters

class_name (str) –

Return type

Type

get_from_registry(self, class_name)
Parameters

class_name (str) –

Return type

Type

register(self, cls)
Parameters

cls (Type) –

Return type

None