Skip to content

Commit 273bfb0

Browse files
Fix eval config (#948)
1 parent 96d45e9 commit 273bfb0

File tree

6 files changed

+10
-14
lines changed

6 files changed

+10
-14
lines changed

examples/aneurysm/aneurysm.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def inlet_w_ref_func(_in):
190190
"num_workers": 1,
191191
}
192192
sup_validator = ppsci.validate.SupervisedValidator(
193-
{**eval_dataloader_cfg, "batch_size": cfg.EVAL.batch_size.sup_validator},
193+
{**eval_dataloader_cfg, "batch_size": cfg.EVAL.batch_size},
194194
ppsci.loss.MSELoss("mean"),
195195
{
196196
"p": lambda out: out["p"],
@@ -213,7 +213,7 @@ def inlet_w_ref_func(_in):
213213
"v": lambda out: out["v"],
214214
"w": lambda out: out["w"],
215215
},
216-
batch_size=cfg.EVAL.batch_size.sup_validator,
216+
batch_size=cfg.EVAL.batch_size,
217217
prefix="result_u_v_w_p",
218218
),
219219
}
@@ -288,7 +288,7 @@ def evaluate(cfg: DictConfig):
288288
"num_workers": 1,
289289
}
290290
sup_validator = ppsci.validate.SupervisedValidator(
291-
{**eval_dataloader_cfg, "batch_size": cfg.EVAL.batch_size.sup_validator},
291+
{**eval_dataloader_cfg, "batch_size": cfg.EVAL.batch_size},
292292
ppsci.loss.MSELoss("mean"),
293293
{
294294
"p": lambda out: out["p"],
@@ -311,7 +311,7 @@ def evaluate(cfg: DictConfig):
311311
"v": lambda out: out["v"],
312312
"w": lambda out: out["w"],
313313
},
314-
batch_size=cfg.EVAL.batch_size.sup_validator,
314+
batch_size=cfg.EVAL.batch_size,
315315
prefix="result_u_v_w_p",
316316
),
317317
}

examples/aneurysm/conf/aneurysm.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ TRAIN:
9797
EVAL:
9898
pretrained_model_path: null
9999
eval_with_no_grad: true
100-
batch_size:
101-
sup_validator: 4096
100+
batch_size: 4096
102101

103102
# inference settings
104103
INFER:

examples/biharmonic2d/conf/biharmonic2d.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ TRAIN:
7272
EVAL:
7373
pretrained_model_path: null
7474
eval_with_no_grad: true
75-
batch_size:
76-
sup_validator: 128
75+
batch_size: 128
7776

7877
INFER:
7978
pretrained_model_path: https://paddle-org.bj.bcebos.com/paddlescience/models/biharmonic2d/biharmonic2d_pretrained.pdparams

examples/bracket/bracket.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ def train(cfg: DictConfig):
284284
},
285285
}
286286
sup_validator = ppsci.validate.SupervisedValidator(
287-
{**eval_dataloader_cfg, "batch_size": cfg.EVAL.batch_size.sup_validator},
287+
{**eval_dataloader_cfg, "batch_size": cfg.EVAL.batch_size},
288288
ppsci.loss.MSELoss("mean"),
289289
{
290290
"u": lambda out: out["u"],
@@ -460,7 +460,7 @@ def evaluate(cfg: DictConfig):
460460
},
461461
}
462462
sup_validator = ppsci.validate.SupervisedValidator(
463-
{**eval_dataloader_cfg, "batch_size": cfg.EVAL.batch_size.sup_validator},
463+
{**eval_dataloader_cfg, "batch_size": cfg.EVAL.batch_size},
464464
ppsci.loss.MSELoss("mean"),
465465
{
466466
"u": lambda out: out["u"],

examples/bracket/conf/bracket.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,7 @@ TRAIN:
100100
EVAL:
101101
pretrained_model_path: null
102102
eval_with_no_grad: true
103-
batch_size:
104-
sup_validator: 128
103+
batch_size: 128
105104

106105
# inference settings
107106
INFER:

examples/fpde/conf/fractional_poisson_2d.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,4 @@ TRAIN:
6565
EVAL:
6666
pretrained_model_path: null
6767
eval_with_no_grad: true
68-
batch_size:
69-
sup_validator: 128
68+
batch_size: 128

0 commit comments

Comments
 (0)