Skip to content

Cannot open history files after a crash #257

@delaossa

Description

@delaossa

If an Optimas run fails for some reason, e.g., disk quota exceeded, it should be possible to analyze up to the last "history file".
However, they cannot be opened:

history_file = 'exploration/exploration_history_after_sim_110.npy'
if os.path.exists(history_file):
    history = np.load(history_file)

Output:

File ~/.conda/envs/sim24/lib/python3.11/site-packages/numpy/lib/format.py:839, in read_array(fp, allow_pickle, pickle_kwargs, max_header_size)
    837         array = array.transpose()
    838     else:
--> 839         array.shape = shape
    841 return array

ValueError: cannot reshape array of size 0 into shape (113,)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions