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=None)[source]

Serialize the object to a binary file

Parameters:filename (Optional[str]) – file path of the serialized file, if not given then dump_full_path is used
Return type:None
dump_full_path

Get the binary dump path

Returns:
dump_yaml(filename=None)[source]

Serialize the object to a yaml file

Parameters:filename (Optional[str]) – file path of the yaml file, if not given then dump_yaml_path is used
Return type:None
classmethod from_yaml(constructor, node, stop_on_import_error=False)[source]
static load(filename=None)[source]
Return type:~T
classmethod load_yaml(filename)[source]
Return type:~T
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

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

Bases: gnes.base.TrainableBase

close()[source]

Release the resources as model is destroyed

components
Return type:Union[List[~T], Dict[str, ~T]]
classmethod from_yaml(constructor, node)[source]
is_pipeline
is_trained
classmethod to_yaml(representer, data)[source]
train(*args, **kwargs)

Train the model, need to be overrided