Created
March 20, 2023 03:06
-
-
Save jelc53/6cd9053fb9e06134b454c81d290e0999 to your computer and use it in GitHub Desktop.
glob load script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
import os | |
from glob import glob | |
from progressbar import ProgressBar | |
if __name__ == '__main__': | |
proof_steps = glob(os.path.join('proof_steps_gnn', '**', '*.pt'), recursive=True) | |
# print(proof_steps) | |
bar = ProgressBar(max_value = len(proof_steps)) | |
for i, filename in enumerate(proof_steps): | |
try: | |
torch.load(filename) | |
except: | |
print(f'Exception in {filename}!') | |
bar.update(i) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment