alp¶
-
class
Experiment(model=None, metrics=None, verbose=0)[source]¶ An Experiment trains, predicts, saves and logs a model
Variables: - model (model) – the model used in the experiment
- metrics (list) – a list of callables
-
fit(data, data_val, model=None, *args, **kwargs)[source]¶ Build and fit a model given data and hyperparameters
Parameters: - data (list(dict)) – a list of dictionnaries mapping inputs and outputs names to numpy arrays for training.
- data_val (list(dict)) – a list of dictionnaries mapping inputs and outputs names to numpy arrays for validation.
- model (model, optionnal) – a model from a supported backend
Returns: the id of the model in the db, the id of the data in the db and path to the parameters.
-
fit_async(data, data_val, model=None, *args, **kwargs)[source]¶ Build and fit asynchronously a model given data and hyperparameters
Parameters: - data (list(dict)) – a list of dictionnaries mapping inputs and outputs names to numpy arrays for training.
- data_val (list(dict)) – a list of dictionnaries mapping inputs and outputs names to numpy arrays for validation.
- model (model, optionnal) – a model from a supported backend
Returns: the id of the model in the db, the id of the data in the db and a path to the parameters.
-
fit_gen(gen_train, data_val, model=None, *args, **kwargs)[source]¶ Build and fit asynchronously a model given data and hyperparameters
Parameters: - gen_train (list(dict)) – a list of generators.
- data_val (list(dict)) – a list of dictionnaries mapping inputs and outputs names to numpy arrays or generators for validation.
- model (model, optionnal) – a model from a supported backend
Returns: the id of the model in the db, the id of the data in the db and a path to the parameters.
-
fit_gen_async(gen_train, data_val, model=None, *args, **kwargs)[source]¶ Build and fit asynchronously a model given generator(s) and hyperparameters.
Parameters: - gen_train (list(dict)) – a list of generators.
- data_val (list(dict)) – a list of dictionnaries mapping inputs and outputs names to numpy arrays or generators for validation.
- model (model, optionnal) – a model from a supported backend
Returns: the id of the model in the db, the id of the data in the db and a path to the parameters.
-
load_model(mod_id=None, data_id=None)[source]¶ Load a model from the database form it’s mod_id and data_id
Parameters: - mod_id (str) – the id of the model in the database
- data_id (str) – the id of the data in the database