Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Surrogate fix #740

Merged
merged 16 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix
  • Loading branch information
wangguan1995 committed Jan 8, 2024
commit 2f0feda73c555bf58a16906e25befcfc0d0f9361
6 changes: 3 additions & 3 deletions examples/aneurysm/aneurysm_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ def output_transform_p(self, in_, out):


def evaluate(cfg: DictConfig):
wangguan1995 marked this conversation as resolved.
Show resolved Hide resolved
os.makedirs(cfg.EVAL.output_dir, exist_ok=True)
PLOT_DIR = osp.join(cfg.EVAL.output_dir, "visu")
PLOT_DIR = osp.join(cfg.output_dir, "visu")
os.makedirs(PLOT_DIR, exist_ok=True)

# Physic properties
P_OUT = 0 # pressure at the outlet of pipe
Expand Down Expand Up @@ -276,7 +276,7 @@ def output_transform_p(self, in_, out):
# initialize solver
solver = ppsci.solver.Solver(
model,
output_dir=cfg.EVAL.output_dir,
output_dir=cfg.output_dir,
log_freq=cfg.log_freq,
seed=cfg.seed,
pretrained_model_path=cfg.EVAL.pretrained_model_path,
Expand Down
3 changes: 1 addition & 2 deletions examples/aneurysm/conf/aneurysm_flow.yaml
wangguan1995 marked this conversation as resolved.
Show resolved Hide resolved
wangguan1995 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
hydra:
run:
# dynamic output directory according to running time and override name
dir: outputs_VIV/${now:%Y-%m-%d}/${now:%H-%M-%S}/${hydra.job.override_dirname}
dir: outputs_aneurysm_flow/${now:%Y-%m-%d}/${now:%H-%M-%S}/${hydra.job.override_dirname}
job:
name: ${mode} # name of logfile
chdir: false # keep current working direcotry unchaned
Expand Down Expand Up @@ -44,5 +44,4 @@ TRAIN:
# evaluation settings
EVAL:
pretrained_model_path: null
output_dir: "output_aneurysm_flow"
eval_with_no_grad: true