Spaces:
Running on Zero
Running on Zero
Fix checkpoint restore/delete filename matching
Browse files425 unmodified lines42642742842943043143212 unmodified lines445446447448449450451425 unmodified lines"""Download the newest persisted memory-cache tarball from the mirror andextract it under /app so a rebuilt Space resumes instead of restarting."""files = api.list_repo_files(repo_id=DEST_MIRROR, repo_type="dataset")match = [f for f in files if f.endswith("buildstore_cache.tar")]if not match:return Nonelocal = api.hf_hub_download(repo_id=DEST_MIRROR, repo_type="dataset",12 unmodified lines# single rolling checkpoint: upload the new one, then delete the previous# blob so the repo does not accumulate hundreds of MB per checkpointfiles = api.list_repo_files(repo_id=DEST_MIRROR, repo_type="dataset")previous = [f for f in files if f.endswith("buildstore_cache.tar")]push_file("buildstore_cache", tar_path.read_bytes())for old in previous:try:425 unmodified lines42642742842943043143212 unmodified lines445446447448449450451425 unmodified lines"""Download the newest persisted memory-cache tarball from the mirror andextract it under /app so a rebuilt Space resumes instead of restarting."""files = api.list_repo_files(repo_id=DEST_MIRROR, repo_type="dataset")match = [f for f in files if f.endswith("buildstore_cache")]if not match:return Nonelocal = api.hf_hub_download(repo_id=DEST_MIRROR, repo_type="dataset",12 unmodified lines# single rolling checkpoint: upload the new one, then delete the previous# blob so the repo does not accumulate hundreds of MB per checkpointfiles = api.list_repo_files(repo_id=DEST_MIRROR, repo_type="dataset")previous = [f for f in files if f.endswith("buildstore_cache") and f != "logs/buildstore_cache"]push_file("buildstore_cache", tar_path.read_bytes())for old in previous:try:
executor_entrypoint.py+2-2