Skip to content

Commit

Permalink
fix the prediction files
Browse files Browse the repository at this point in the history
  • Loading branch information
henryaddison committed Dec 14, 2023
1 parent 275c988 commit 708ce08
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions bin/check_preds.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,20 @@ def check(pred_ds):
print(e)
pbar.update(1)

# with logging_redirect_tqdm():
# with tqdm(
# total=len(fpaths),
# desc=f"Fixing prediction files",
# unit=" files",
# ) as pbar:
# for fpath in fpaths:
# pred_ds = xr.open_dataset(fpath)
# # import pdb; pdb.set_trace()
# pred_ds = fix(pred_ds)
# errors = check(pred_ds)

# if len(errors) > 0:
# print(f"Errors in {fpath}:")
# for e in errors:
# print(e)
# pbar.update(1)
with logging_redirect_tqdm():
with tqdm(
total=len(fpaths),
desc=f"Fixing prediction files",
unit=" files",
) as pbar:
for fpath in fpaths:
pred_ds = xr.open_dataset(fpath)
# import pdb; pdb.set_trace()
pred_ds = fix(pred_ds)
errors = check(pred_ds)

if len(errors) > 0:
print(f"Errors in {fpath}:")
for e in errors:
print(e)
pbar.update(1)

0 comments on commit 708ce08

Please sign in to comment.