Skip to content

Experiments

Module

Bases: Protocol

attributes property

Returns a dictionary of the module's attributes.

Attributes provide metadata or configuration details relevant to the module. Keys should be strings, and values can be of any type depending on the attribute.

Returns:

Type Description
dict[str, Any]

dict[str, Any]: A mapping of attribute names to their values.

name property

Defines a non unique identifier for a module owned by a model.

Returns:

Name Type Description
str str

The name of the module.

Modules

Bases: ABC

clear() abstractmethod

Removes all modules from the collection

list() abstractmethod

A list of the modules owned by the model.

Returns:

Type Description
list[Module]

list[Module]: The modules owned by the model as a list.

log(name, attributes=None) abstractmethod

Adds a module to the modules collection.

Parameters:

Name Type Description Default
name str

The name of the module

required
attributes Optional[dict[str, Any]]

Relevant attributes of the module. Defaults to None.

None

remove(module) abstractmethod

Removes a module from the collection.