Skip to content

registry

get_active_experiment function

dlf.core.registry.get_active_experiment()

Gets the current, active, experiment

Returns

dlf.core.Experiment. Active experiment


import_framework_modules function

dlf.core.registry.import_framework_modules(module_folder, package)

Auto import of all files in module folder

Note

This is necessary for the register_* decorator to work properly.

Args

  • module_folder: str.path to folder where files to import are located
  • package: str. module path e.g. dlf.metrics

register_callback function

dlf.core.registry.register_callback(*names)

Decorator to register a callback to the framework

Args

  • *names: Tuple(str). List of aliases for this callback

Raises

  • ValueError: If a given alias is not valid

register_data_generator function

dlf.core.registry.register_data_generator(*names)

Decorator to register a data reader to the framework

Args

  • *names: Tuple(str). List of aliases for this data reader

Raises

  • ValueError: If a given alias is not valid

register_evaluator function

dlf.core.registry.register_evaluator(*names)

Decorator to register an evaluator to the framework

Args

  • *names: Tuple(str). List of aliases for this evaluator

Raises

  • ValueError: If a given alias is not valid

register_loss function

dlf.core.registry.register_loss(*names)

Decorator to register a custom loss to the framework

Args

  • *names: Tuple(str) List of aliases for this loss

Raises

  • Exception: If object is not subclass of tf.keras.losses.Loss
  • ValueError: If a given alias is not valid

register_metric function

dlf.core.registry.register_metric(*names)

Decorator to register a custom metric to the framework

Args

  • *names: Tuple(str). List of aliases for this metric

Raises

  • ValueError: If the parent of this method is not of type tf.keras.metrics.Metrics
  • ValueError: If a given alias is not valid

register_model function

dlf.core.registry.register_model(*names)

Decorator to register a custom model to the framework

Args

  • *names: Tuple(str). List of aliases for this model

Raises

  • ValueError: If a given alias is not valid

register_preprocessing_method function

dlf.core.registry.register_preprocessing_method(*names)

Decorator to register a preprocessing object to the framework

Args

  • *names: Tuple(str). List of aliases for this preprocessing object

Raises


set_active_experiment function

dlf.core.registry.set_active_experiment(exp)

Sets active experiment to global state and allows all modules to access it

Arguments

  • exp: dlf.core.Experiment. Active experiment