MCPcopy Index your code
hub / github.com/algorithmicsuperintelligence/openevolve / find_latest_checkpoint

Function find_latest_checkpoint

scripts/visualizer.py:20–32  ·  view source on GitHub ↗
(base_folder)

Source from the content-addressed store, hash-verified

18
19
20def find_latest_checkpoint(base_folder):
21 # Check whether the base folder is itself a checkpoint folder
22 if os.path.basename(base_folder).startswith("checkpoint_"):
23 return base_folder
24
25 checkpoint_folders = glob.glob("**/checkpoint_*", root_dir=base_folder, recursive=True)
26 if not checkpoint_folders:
27 logger.info(f"No checkpoint folders found in {base_folder}")
28 return None
29 checkpoint_folders = [os.path.join(base_folder, folder) for folder in checkpoint_folders]
30 checkpoint_folders.sort(key=lambda x: os.path.getmtime(x), reverse=True)
31 logger.debug(f"Found checkpoint folder: {checkpoint_folders[0]}")
32 return checkpoint_folders[0]
33
34
35def load_evolution_data(checkpoint_folder):

Callers 2

dataFunction · 0.85
run_static_exportFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected