optimas-org / optimas

Optimization at scale, powered by libEnsemble
https://optimas.readthedocs.io
Other
22 stars 14 forks source link

Optimas exits if a history file is given, but not found #80

Closed delaossa closed 10 months ago

delaossa commented 1 year ago

Optimas exits if a history file is given, but not found. https://github.com/optimas-org/optimas/blob/ed14c6ed3a873d250ec70f21c5a37775a62d6e4c/optimas/explorations/base.py#L133-L148 This current behaviour is problematic with my usual post processing scripts, as sometimes the optimas run script is accessed from a location that does not follow the relative path to the history file. Previously in libE_opt, if the history file was not found, it would continue as if not given.

AngelFP commented 1 year ago

Hi @delaossa, thanks for reporting this. I think we could raise a warning instead of an error here.

delaossa commented 1 year ago

Ok, I would prefer it.. :) Would be ok with just replacing ValueError by Warning? By the way, why does the history argument in _load_history accept a np.darray?

delaossa commented 1 year ago

Raising Warning still exits the program. https://github.com/optimas-org/optimas/pull/81 implements a solution using the warning package.

AngelFP commented 10 months ago

This should be solved now that #120 is merged. The recommended approach to analyze an optimas run is to use the new ExplorationDiagnostics class. (see https://optimas.readthedocs.io/en/latest/user_guide/basic_usage/exploration_diagnostics.html and https://optimas.readthedocs.io/en/latest/api/_autosummary/optimas.diagnostics.ExplorationDiagnostics.html#optimas.diagnostics.ExplorationDiagnostics)