Skip to content

Commit faca215

Browse files
committed
refactored to make the data flow more explicit
1 parent 153f64e commit faca215

File tree

20 files changed

+504
-223
lines changed

20 files changed

+504
-223
lines changed

examples/eval_retau_05200/config.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ environment:
2525
trajectory_path: "trajectories"
2626
cfd_dtype: "float64"
2727
action_bounds: [-1.0, 1.0]
28-
reward_scale: 1
2928
reward_beta: 0.2
3029
case_names: ["retau_05200"]
3130
executable_path: "/scratch/maochao/code/CaLES/build/cales"
@@ -46,7 +45,6 @@ runner:
4645
ckpt_num: 1000000
4746
ckpt_interval: 1
4847
batch_size: 1
49-
previous_run_id: "00000000"
5048

5149
logging:
5250
save_dir: '../runs'
@@ -59,3 +57,8 @@ smartsim:
5957

6058
extras:
6159
n_cells: 16
60+
tauw_min_percent: 0.8
61+
tauw_max_percent: 1.2
62+
hwm_min: 0.075
63+
hwm_max: 0.150
64+
kap_log: 0.41

examples/eval_retau_05200/eval.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
rm -r __pycache__ trajectories envs tensorboard_logs wandb
44

55
python -u ../../src/smartflow/main.py \
6-
runner.previous_run_id="s6qjwiph" \
6+
runner.model_load_path="/scratch/maochao/code/SmartFlow/experiments/train_retau_05200/models/final/yjkxqlf3" \
77
runner.steps_per_episode=3600 \
88
> out 2> err

examples/eval_retau_05200/models

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/eval_retau_10000/config.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ environment:
2525
trajectory_path: "trajectories"
2626
cfd_dtype: "float64"
2727
action_bounds: [-1.0, 1.0]
28-
reward_scale: 1
2928
reward_beta: 0.2
3029
case_names: ["retau_10000"]
3130
executable_path: "/scratch/maochao/code/CaLES/build/cales"
@@ -46,7 +45,6 @@ runner:
4645
ckpt_num: 1000000
4746
ckpt_interval: 1
4847
batch_size: 1
49-
previous_run_id: "00000000"
5048

5149
logging:
5250
save_dir: '../runs'
@@ -59,3 +57,8 @@ smartsim:
5957

6058
extras:
6159
n_cells: 16
60+
tauw_min_percent: 0.8
61+
tauw_max_percent: 1.2
62+
hwm_min: 0.075
63+
hwm_max: 0.150
64+
kap_log: 0.41

examples/eval_retau_10000/eval.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
rm -r __pycache__ trajectories envs tensorboard_logs wandb
44

55
python -u ../../src/smartflow/main.py \
6-
runner.previous_run_id="s6qjwiph" \
6+
runner.model_load_path="/scratch/maochao/code/SmartFlow/experiments/train_retau_05200/models/final/yjkxqlf3" \
77
runner.steps_per_episode=3600 \
88
> out 2> err

examples/eval_retau_10000/models

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/train_retau_05200/config.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
wandb:
22
project: "channel"
3-
run_name: "train-retau-5200"
3+
run_name: "train-retau-05200"
44
mode: "online"
55
sync_tensorboard: true
66
# group: null # Optional
@@ -12,8 +12,8 @@ environment:
1212
agents_per_cfd: 48
1313
tasks_per_cfd: 4
1414
cfd_state_dim: 2
15-
cfd_reward_dim: 2
1615
cfd_action_dim: 1
16+
cfd_reward_dim: 2
1717
agent_state_dim: 2
1818
agent_action_dim: 1
1919
cfd_steps_per_action: 10
@@ -25,7 +25,6 @@ environment:
2525
trajectory_path: "trajectories"
2626
cfd_dtype: "float64"
2727
action_bounds: [-1.0, 1.0]
28-
reward_scale: 1
2928
reward_beta: 0.2
3029
case_names: ["retau_05200"]
3130
executable_path: "/scratch/maochao/code/CaLES/build/cales"
@@ -36,7 +35,7 @@ runner:
3635
restart: false
3736
policy: "MlpPolicy"
3837
reset_num_timesteps: true
39-
total_cfd_episodes: 200
38+
total_cfd_episodes: 3200
4039
steps_per_episode: 120
4140
hidden_layers: [128, 128]
4241
learning_rate: 5e-4
@@ -46,7 +45,6 @@ runner:
4645
ckpt_num: 1000000
4746
ckpt_interval: 1
4847
batch_size: 1
49-
previous_run_id: "6fc75ig6"
5048

5149
logging:
5250
save_dir: '../runs'
@@ -59,3 +57,8 @@ smartsim:
5957

6058
extras:
6159
n_cells: 16
60+
tauw_min_percent: 0.8
61+
tauw_max_percent: 1.2
62+
hwm_min: 0.075
63+
hwm_max: 0.150
64+
kap_log: 0.41
Binary file not shown.
Binary file not shown.

examples/train_retau_05200/train.sh

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,8 @@
1-
#!/bin/bash
2-
# shopt -s extglob
3-
# rm -r train __pycache__ experiment DRLsignals
4-
# cd train-0
5-
# rm -r !(input*|stats*|fld_0.bin)
6-
# cd ..
7-
8-
# cd train-1
9-
# rm -r !(input*|stats*|fld_0.bin)
10-
# cd ..
11-
12-
# cd train-2
13-
# rm -r !(input*|stats*|fld_0.bin)
14-
# cd ..
15-
16-
# python -u main.py > job.out 2> job.err
17-
181
rm -r __pycache__ trajectories envs tensorboard_logs wandb models/checkpoints
192

203
python -u ../../src/smartflow/main.py \
214
runner.mode=train \
5+
runner.total_cfd_episodes=400 \
226
runner.restart=False \
237
runner.reset_num_timesteps=True \
248
> out 2> err

0 commit comments

Comments
 (0)