Skip to content

Commit 78a77fb

Browse files
authored
Merge pull request #91 from pdobbelaere/orca
Slight Reference Rework
2 parents 82fa313 + f81b368 commit 78a77fb

34 files changed

+1388
-1054
lines changed

.github/threadpool.yaml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/run_pytest.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ jobs:
4848
run: |
4949
pip install .[dev]
5050
pip list
51-
pytest --skip-gpu --psiflow-config=.github/threadpool.yaml
51+
pytest --skip-gpu

configs/local_test.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
parsl_log_level: WARNING
3+
retries: 0
4+
make_symlinks: false
5+
6+
ModelEvaluation:
7+
gpu: false
8+
use_threadpool: false
9+
max_simulation_time: 1
10+
11+
ModelTraining:
12+
gpu: true
13+
use_threadpool: true
14+
max_training_time: 1
15+
max_workers: 1 # suppress assertion for multigpu training
16+
17+
CP2K:
18+
cores_per_worker: 1
19+
max_evaluation_time: 0.1
20+
container_uri: 'oras://ghcr.io/molmod/cp2k:2024.1'
21+
22+
GPAW:
23+
cores_per_worker: 1
24+
max_evaluation_time: 0.1
25+
container_uri: 'oras://ghcr.io/molmod/gpaw:24.1'
26+
27+
ORCA:
28+
cores_per_worker: 1
29+
max_evaluation_time: 0.1
30+
31+
32+
...
File renamed without changes.
File renamed without changes.

psiflow/__init__.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,42 @@ def resolve_and_check(path: Path) -> Path:
3333
load = ExecutionContextLoader.load
3434
context = ExecutionContextLoader.context
3535
wait = ExecutionContextLoader.wait
36+
37+
38+
# TODO: EXECUTION
39+
# - max_runtime is in seconds, max_simulation_time (and others) is in minutes
40+
# - ExecutionDefinition gpu argument?
41+
# - ExecutionDefinition wrap_in_timeout functionality
42+
# - ExecutionDefinition wrap_in_srun functionality? Actually for MD this is more iffy right
43+
# - ExecutionDefinition why properties?
44+
# - ExecutionDefinition centralize wq_resources
45+
# - configuration file with all options
46+
# - timeout -s 9 or -s 15?
47+
# - executor keys are hardcoded strings..
48+
# - define a 'format_env_variables' util
49+
# - update GPAW + ORCA + Default containers
50+
# include s-dftd3 in modelevaluation + install s-dftd3 with openmp
51+
# - what with mem_per_node / mem_per_worker
52+
# - always GPU for training?
53+
# - currently reference mpi_args have to be tuple according to typeguard..
54+
# - cores_per_block has to be specified even when exclusive..?
55+
# - can we do something with WQ priority?
56+
# - see chatgpt convo for process memory limits and such
57+
# - make /tmp for app workdirs an option?
58+
# - what is scaling_cores_per_worker in WQ
59+
# - can we clean up psiflow_internal slightly?
60+
# -
61+
# TODO: REFERENCE
62+
# - reference MPI args not really checked
63+
# - mpi flags are very finicky across implementations --> use ENV args?
64+
# OMPI_MCA_orte_report_bindings=1 I_MPI_DEBUG=4
65+
# - commands ends with 'exit 0' - what if we do not want to exit yet?
66+
# - some actual logging?
67+
# - safe_compute_dataset functionality?
68+
# - ReferenceDummy is a bit sloppy
69+
# -
70+
# TODO: MISC
71+
# - think about test efficiency
72+
# - some imports take a very long time
73+
# - fix serialisation
74+
# -

psiflow/data/dataset.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,14 @@ def evaluate(
284284
Returns:
285285
Dataset: A new Dataset with evaluation results.
286286
"""
287+
# TODO: WIP
288+
from psiflow.hamiltonians import Hamiltonian
289+
290+
if not isinstance(computable, Hamiltonian):
291+
# avoid extracting and inserting the same quantities
292+
return computable.compute_dataset(self)
293+
294+
# use Hamiltonian.compute method
287295
if batch_size is not None:
288296
outputs = computable.compute(self, batch_size=batch_size)
289297
else:

0 commit comments

Comments
 (0)