neuraxle.metaopt.data.json_repo

Module-level documentation for neuraxle.metaopt.data.json_repo. Here is an inheritance diagram, including dependencies to other base modules of Neuraxle:

Inheritance diagram of neuraxle.metaopt.data.json_repo

Neuraxle’s JSON Hyperparameter Repository Classes

Data objects and related repositories used by AutoML, SQL version.

Classes are splitted like this for the AutoML: - Projects - Clients - Rounds (runs) - Trials - TrialSplits - MetricResults

Classes

HyperparamsOnDiskRepository(cache_folder)

Hyperparams repository that saves json files for every AutoML trial.

Examples using neuraxle.metaopt.data.json_repo.HyperparamsOnDiskRepository


class neuraxle.metaopt.data.json_repo._OnDiskRepositoryLoggerHandlerMixin(cache_folder: str)[source]

Bases: object

Mixin to add a disk logging handler to a repository. It has a cache_folder.

__init__(cache_folder: str)[source]

Initialize self. See help(type(self)) for accurate signature.

add_logging_handler(logger: neuraxle.logging.logging.NeuraxleLogger, scope: neuraxle.metaopt.data.vanilla.ScopedLocation) → neuraxle.metaopt.data.vanilla.HyperparamsRepository[source]

Adds an on-disk logging handler to the repository. The file at this scope can be retrieved with the method get_scoped_logger_path().

get_log_from_logging_handler(logger: neuraxle.logging.logging.NeuraxleLogger, scope: neuraxle.metaopt.data.vanilla.ScopedLocation) → str[source]
get_folder_at_scope(scope: neuraxle.metaopt.data.vanilla.ScopedLocation) → str[source]
get_scoped_logger_path(scope: neuraxle.metaopt.data.vanilla.ScopedLocation) → str[source]
class neuraxle.metaopt.data.json_repo.HyperparamsOnDiskRepository(cache_folder: str = None)[source]

Bases: neuraxle.metaopt.data.json_repo._OnDiskRepositoryLoggerHandlerMixin, neuraxle.metaopt.data.vanilla.HyperparamsRepository

Hyperparams repository that saves json files for every AutoML trial.

See also

AutoML, Trainer,

__init__(cache_folder: str = None)[source]

Initialize self. See help(type(self)) for accurate signature.

load(scope: neuraxle.metaopt.data.vanilla.ScopedLocation, deep=False) → SubDataclassT[source]

Get metadata from scope.

The fetched metadata will be the one that is the last item that is not a None in the provided scope.

Parameters

scope (ScopedLocation) – scope to get metadata from.

Returns

metadata from scope.

save(_dataclass: SubDataclassT, scope: neuraxle.metaopt.data.vanilla.ScopedLocation, deep=False) → neuraxle.metaopt.data.vanilla.HyperparamsRepository[source]

Save metadata to scope.

Parameters
  • metadata – metadata to save.

  • scope (ScopedLocation) – scope to save metadata to.

  • deep (bool) – if True, save metadata’s sublocations recursively so as to update.

_load_dc(scope: neuraxle.metaopt.data.vanilla.ScopedLocation, deep=False) → SubDataclassT[source]
_load_dc_sublocation_keys(_dataclass: SubDataclassT, scope) → SubDataclassT[source]
_save_dc(_dataclass: SubDataclassT, scope: neuraxle.metaopt.data.vanilla.ScopedLocation, deep=False)[source]
_get_dataclass_filename_path(_dataclass: SubDataclassT, scope: neuraxle.metaopt.data.vanilla.ScopedLocation)[source]
_patch_scope_for_dataclass(_dataclass: neuraxle.metaopt.data.vanilla.BaseDataclass, scope: neuraxle.metaopt.data.vanilla.ScopedLocation)[source]
_abc_impl = <_abc_data object>