- deephyper.skopt.dump(res, filename, store_objective=True, **kwargs)#
Store an skopt optimization result into a file.
res (OptimizeResult, scipy object) – Optimization result object to be stored.
filename (string or pathlib.Path) – The path of the file in which it is to be stored. The compression method corresponding to one of the supported filename extensions (‘.z’, ‘.gz’, ‘.bz2’, ‘.xz’ or ‘.lzma’) will be used automatically.
store_objective (boolean, default=True) –
Whether the objective function should be stored. Set store_objective to False if your objective function (.specs[‘args’][‘func’]) is unserializable (i.e. if an exception is raised when trying to serialize the optimization result).
Notice that if store_objective is set to False, a deep copy of the optimization result is created, potentially leading to performance problems if res is very large. If the objective function is not critical, one can delete it before calling deephyper.skopt.dump() and thus avoid deep copying of res.
**kwargs (other keyword arguments) – All other keyword arguments will be passed to joblib.dump.