Skip to content

Commit

Permalink
fix a sample data bug
Browse files Browse the repository at this point in the history
  • Loading branch information
OuyangWenyu committed Apr 10, 2023
1 parent 0f85557 commit b1ac6e0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions hydromodel/app/calibrate_xaj.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ def calibrate(args):
algo_info = args.algorithm
comment = args.comment
data_dir = os.path.join(definitions.ROOT_DIR, "hydromodel", "example", exp)
kfold = []
for f_name in os.listdir(data_dir):
if fnmatch.fnmatch(f_name, "*_fold*_test.json"):
kfold.append(int(f_name[len("data_info_fold") : -len("_test.json")]))
kfold = [
int(f_name[len("data_info_fold") : -len("_test.json")])
for f_name in os.listdir(data_dir)
if fnmatch.fnmatch(f_name, "*_fold*_test.json")
]
kfold = np.sort(kfold)
for fold in kfold:
print(f"Start to calibrate the {fold}-th fold")
Expand Down

0 comments on commit b1ac6e0

Please sign in to comment.