Skip to content

Commit a8dffe3

Browse files
cl126162clagemann126162ludgerpaehler
authored
split nek updates from PR 244 (#248)
* add nek files * Fix order of imports. * Fix spelling errors. * Bunch of CI-demanded fixes. * Formatting --------- Co-authored-by: christian.lagemann <christian.lagemann@rwth-aachen.de> Co-authored-by: Ludger Paehler <paehlerludger@gmail.com>
1 parent 735268a commit a8dffe3

6 files changed

Lines changed: 2 additions & 7 deletions

File tree

examples/nek/getting_started/3_pettingzoo/run_pettingzoo_docker.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env bash
22
#
33
# Run NEK5000 PettingZoo tests with MPMD coupling.
4+
# Config is loaded automatically from HuggingFace (environment_config.yaml).
45
#
56
# Usage:
67
# ./run_pettingzoo_docker.sh # Test only

examples/nek/getting_started/6_zeroshot_wing_demo/README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ __This is a deployment/evaluation demo only (no training). The template and cont
99
## What the script does
1010

1111
`test_nek_pettingzoo.py`:
12-
1312
- loads a base `NekEnv` via `NekEnv.from_hf(...)` and wraps it with `make_pettingzoo_env(...)`
1413
- builds one controller per entry in `POLICY_SPECS` (from `meta_policy_small_wing_template.py`)
1514
- assigns each controller to actuator agents by `x_range` and `side` (`SS` means `y > 0`, `PS` means `y < 0`)
@@ -42,7 +41,6 @@ obs_dict, rewards_dict, terminations, truncations, infos = env.step(actions)
4241
## Usage
4342

4443
### Recommended: use the runner script
45-
4644
From `6_zeroshot_wing_demo/`:
4745

4846
```bash
@@ -58,7 +56,6 @@ mpirun -np 1 python test_nek_pettingzoo.py : -np 12 nek5000
5856
```
5957

6058
Legacy policy template + run root:
61-
6259
```bash
6360
mpirun -np 1 python test_nek_pettingzoo.py \
6461
--policy-template ./meta_policy_small_wing_template.py \
@@ -68,7 +65,6 @@ mpirun -np 1 python test_nek_pettingzoo.py \
6865
```
6966

7067
Useful overrides:
71-
7268
- `--policy-template PATH` (defaults to `./meta_policy_small_wing_template.py`)
7369
- `--env ENV_NAME` (defaults from template `ENV_NAME`)
7470
- `--nproc NPROC` (defaults from template `NPROC`)
@@ -82,15 +78,13 @@ Useful overrides:
8278
The template defines a lightweight legacy-`MetaPolicy.py`-style configuration.
8379

8480
Required top-level variables:
85-
8681
- `ENV_NAME`
8782
- `NPROC`
8883
- `NUM_STEPS`
8984
- `POLICY_ROOT` (default for `--policy-root`)
9085
- `POLICY_SPECS` (list of policy group dicts)
9186

9287
Each `POLICY_SPECS` entry supports:
93-
9488
- `name`
9589
- `x_range: [x_min, x_max]`
9690
- `side: "SS"` (y>0) or `"PS"` (y<0)
@@ -101,7 +95,6 @@ Each `POLICY_SPECS` entry supports:
10195
- RL algorithms only: `agent_run_name`, `policy`, and/or `model_path`
10296

10397
Algorithm semantics:
104-
10598
- `ZERO` outputs an all-zero action (no model needed)
10699
- `BL` outputs a constant action equal to `action_max` (no model needed)
107100
- `PPO`/`TD3`/`DDPG` load a Stable-Baselines3 model from `model_path`/`POLICY_ROOT`

examples/nek/getting_started/6_zeroshot_wing_demo/meta_policy_small_wing_template.py

100755100644
File mode changed.

examples/nek/getting_started/6_zeroshot_wing_demo/run_pettingzoo_docker.sh

100755100644
File mode changed.

examples/nek/getting_started/6_zeroshot_wing_demo/zeroshot_demo_pettingzoo.py

100755100644
File mode changed.

hydrogym/nek/integrate.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import scipy.io as sio
77

88
from hydrogym.core import CallbackBase
9+
from hydrogym.nek.nek_lib.nek_utils import show_end, show_title
910

1011

1112
def integrate(

0 commit comments

Comments
 (0)