anonymous commited on
Commit
ff33be6
·
1 Parent(s): b470349

added eval script for upet

Browse files
.gitignore CHANGED
@@ -29,4 +29,7 @@ __pycache__/
29
  # Evaluation outputs
30
  eval_results/
31
  **/eval_results/
32
- checkpoints_matris/
 
 
 
 
29
  # Evaluation outputs
30
  eval_results/
31
  **/eval_results/
32
+ checkpoints_matris/
33
+
34
+ # macOS metadata
35
+ .DS_Store
README.md CHANGED
@@ -21,8 +21,13 @@ All model implementations, training code, evaluation code, and checkpoints are l
21
  - `runs/` — stores trained model checkpoints and experiment outputs.
22
  - `scripts/` — contains training, evaluation, and benchmarking shell scripts.
23
 
24
- The scripts are configured to be launched from the repository root directory. For example, to start training of a new matris model, run
25
 
26
  ```bash
27
  ./models/matris/scripts/run_matris.sh
28
- ```
 
 
 
 
 
 
21
  - `runs/` — stores trained model checkpoints and experiment outputs.
22
  - `scripts/` — contains training, evaluation, and benchmarking shell scripts.
23
 
24
+ The scripts are configured to be launched from the repository root directory. For example, to eval a matris model, run
25
 
26
  ```bash
27
  ./models/matris/scripts/run_matris.sh
28
+ ```
29
+
30
+
31
+ For Upet, Install the requirements:
32
+
33
+ ` pip install upet `
models/upet/{upet/README.md → README.md} RENAMED
File without changes
models/upet/{upet/eval_upet_noncon_mtt.py → eval_upet_noncon_mtt.py} RENAMED
File without changes
models/upet/{upet/eval_upet_pt.py → eval_upet_pt.py} RENAMED
File without changes
models/upet/{upet/runs → runs}/seed42_pet-mad-s_perstr_100ep_bs8_1e-4_lf5.pt RENAMED
File without changes
models/upet/{upet/runs → runs}/seed42_upet_noncon_300ep_bs8_1e-4_lf5.pt RENAMED
File without changes
models/upet/{upet/runs → runs}/seed42_upet_perstr_300ep_bs8_1e-4_lf5.pt RENAMED
File without changes
models/upet/scripts/eval_upet.sh ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ set -e
4
+
5
+ # =========================
6
+ # Resolve paths
7
+ # =========================
8
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
9
+ UPET_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
10
+ REPO_ROOT="$(cd "$SCRIPT_DIR/../../.." && pwd)"
11
+
12
+ # =========================
13
+ # Config
14
+ # =========================
15
+ XYZ_PATH="$REPO_ROOT/datasets/xyz/test.xyz"
16
+ FORCES_KEY="forces"
17
+
18
+ MODEL_TYPE="pet_mad_s"
19
+ # Options:
20
+ # upet_cons
21
+ # upet_noncons
22
+ # pet_mad_s
23
+
24
+ PROGRESS=true # set to false for upet_noncons
25
+
26
+ # =========================
27
+ # Model-specific config
28
+ # =========================
29
+ case "$MODEL_TYPE" in
30
+ upet_cons)
31
+ EVAL_SCRIPT="$UPET_DIR/eval_upet_pt.py"
32
+ PT_PATH="$UPET_DIR/runs/seed42_upet_perstr_300ep_bs8_1e-4_lf5.pt"
33
+ ;;
34
+
35
+ upet_noncons)
36
+ EVAL_SCRIPT="$UPET_DIR/eval_upet_noncon_mtt.py"
37
+ PT_PATH="$UPET_DIR/runs/seed42_upet_noncon_300ep_bs8_1e-4_lf5.pt"
38
+ ;;
39
+
40
+ pet_mad_s)
41
+ EVAL_SCRIPT="$UPET_DIR/eval_upet_pt.py"
42
+ PT_PATH="$UPET_DIR/runs/seed42_pet-mad-s_perstr_100ep_bs8_1e-4_lf5.pt"
43
+ ;;
44
+
45
+ *)
46
+ echo "ERROR: Unknown MODEL_TYPE: $MODEL_TYPE"
47
+ echo "Valid options: upet_cons, upet_noncons, pet_mad_s"
48
+ exit 1
49
+ ;;
50
+ esac
51
+
52
+ # =========================
53
+ # Flags
54
+ # =========================
55
+ PROGRESS_ARGS=()
56
+ if [ "$PROGRESS" = true ]; then
57
+ PROGRESS_ARGS=(--progress)
58
+ fi
59
+
60
+ # =========================
61
+ # Sanity checks
62
+ # =========================
63
+ if [ ! -f "$EVAL_SCRIPT" ]; then
64
+ echo "ERROR: Eval script not found:"
65
+ echo "$EVAL_SCRIPT"
66
+ exit 1
67
+ fi
68
+
69
+ if [ ! -f "$XYZ_PATH" ]; then
70
+ echo "ERROR: XYZ test dataset not found:"
71
+ echo "$XYZ_PATH"
72
+ exit 1
73
+ fi
74
+
75
+ if [ ! -f "$PT_PATH" ]; then
76
+ echo "ERROR: Checkpoint not found:"
77
+ echo "$PT_PATH"
78
+ exit 1
79
+ fi
80
+
81
+ # =========================
82
+ # Run
83
+ # =========================
84
+ echo "======================================"
85
+ echo "Running UPET evaluation"
86
+ echo "Model type: $MODEL_TYPE"
87
+ echo "Eval script: $EVAL_SCRIPT"
88
+ echo "XYZ path: $XYZ_PATH"
89
+ echo "PT path: $PT_PATH"
90
+ echo "Forces key: $FORCES_KEY"
91
+ echo "Progress: $PROGRESS"
92
+ echo "======================================"
93
+
94
+ python3 "$EVAL_SCRIPT" \
95
+ --xyz "$XYZ_PATH" \
96
+ --pt-path "$PT_PATH" \
97
+ --forces-key "$FORCES_KEY" \
98
+ "${PROGRESS_ARGS[@]}"
models/upet/upet/.DS_Store DELETED
Binary file (6.15 kB)
 
mtt_eval_noncon/eval_noncon.yaml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ systems:
2
+ read_from: /home/anmka58/phd/research/hugging_face/catalyst_mxenes/datasets/xyz/test.xyz
3
+ length_unit: angstrom
4
+ targets:
5
+ energy:
6
+ key: energy
7
+ unit: eV
8
+ forces: 'off'
9
+ non_conservative_forces:
10
+ key: forces
11
+ quantity: force
12
+ unit: eV/angstrom
13
+ type:
14
+ cartesian:
15
+ rank: 1
16
+ per_atom: true