peal.training.trainers.load_first_loadable

peal.training.trainers.load_first_loadable(paths, map_location=None)[source]

First checkpoint in paths that actually loads, or None if none does.

Returns whatever was saved – a module or a state_dict – so the caller must handle both. Callers that cannot rebuild an architecture from a state_dict should pass only paths holding a whole module.