gnes.base package

Module contents

class gnes.base.TrainableBase(*args, **kwargs)[source]

Bases: object

The base class for preprocessor, encoder, indexer and router

close()[source]

Release the resources as model is destroyed

dump(filename: str = None) → None[source]

Serialize the object to a binary file :param filename: file path of the serialized file, if not given then self.dump_full_path is used

dump_full_path

Get the binary dump path

Returns:
dump_yaml(filename: str = None) → None[source]

Serialize the object to a yaml file :param filename: file path of the yaml file, if not given then self.dump_yaml_path is used

classmethod from_yaml(constructor, node, stop_on_import_error=False)[source]
static load(filename: str = None) → T[source]
classmethod load_yaml(filename: Union[str, TextIO]) → T[source]
post_init()[source]

Declare class attributes/members that can not be serialized in standard way

classmethod pre_init()[source]
store_args_kwargs = False
classmethod to_yaml(representer, data)[source]
train(*args, **kwargs)[source]

Train the model, need to be overrided

yaml_full_path

Get the file path of the yaml config :return:

class gnes.base.CompositionalTrainableBase(*args, **kwargs)[source]

Bases: gnes.base.TrainableBase

close()[source]

Release the resources as model is destroyed

components
classmethod from_yaml(constructor, node)[source]
is_pipeline
classmethod to_yaml(representer, data)[source]
train(*args, **kwargs)

Train the model, need to be overrided