-
Notifications
You must be signed in to change notification settings - Fork 0
136 lines (121 loc) · 5.08 KB
/
test_catlas.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
name: Test catlas with simple screening
env:
OMP_NUM_THREADS: '1'
on:
push:
paths-ignore:
- '**.md'
- '.github/workflows/build_docker.yml'
- '.github/workflows/black.yml'
- '.github/workflows/codeql.yml'
- '.github/workflows/automated_screens.yml'
- '.github/workflows/deploy_jupyter_book.yml'
- 'documentation/**'
- 'configs/automated_screens/*'
workflow_dispatch:
jobs:
test_enumeration:
name: Test catlas enumeration with local scheduler
runs-on: [self-hosted, linux]
container:
image: docker://ulissigroup/catlas:latest
volumes:
- /home/jovyan/shared-scratch:/home/jovyan/shared-scratch
steps:
- name: Run example predictions
uses: actions/checkout@v3
- run: |
(cd /home/jovyan/ocp && git pull)
ln -s /home/jovyan/shared-scratch/ocp_checkpoints
ln -s /home/jovyan/shared-scratch/catlas/df_pkls ./catlas/parity/
ln -s /home/jovyan/shared-scratch/catlas/pourbaix_diagrams ./catlas/
python setup.py develop
python bin/predictions.py configs/tests/test_metal_enum.yml configs/dask_cluster/local_cluster/local_cluster.py
test_local_scheduler:
name: Test catlas with local scheduler
runs-on: [self-hosted, linux]
container:
image: docker://ulissigroup/catlas:latest
volumes:
- /home/jovyan/shared-scratch:/home/jovyan/shared-scratch
steps:
- name: Run example predictions
uses: actions/checkout@v3
- run: |
(cd /home/jovyan/ocp && git pull)
pip list
ln -s /home/jovyan/shared-scratch/ocp_checkpoints
ln -s /home/jovyan/shared-scratch/catlas/df_pkls ./catlas/parity/
ln -s /home/jovyan/shared-scratch/catlas/pourbaix_diagrams ./catlas/
python setup.py develop
python bin/predictions.py configs/tests/test_metals.yml configs/dask_cluster/local_cluster/local_cluster.py
test_local_scheduler_relaxation:
name: Test catlas with local scheduler and cpu relaxations
runs-on: [self-hosted, linux]
container:
image: docker://ulissigroup/catlas:latest
volumes:
- /home/jovyan/shared-scratch:/home/jovyan/shared-scratch
steps:
- name: Checkout branch
uses: actions/checkout@v3
- name: Run cpu relaxations test
run: |
(cd /home/jovyan/ocp && git pull)
ln -s /home/jovyan/shared-scratch/ocp_checkpoints
ln -s /home/jovyan/shared-scratch/catlas/df_pkls ./catlas/parity/
ln -s /home/jovyan/shared-scratch/catlas/pourbaix_diagrams ./catlas/
python setup.py develop
python bin/predictions.py configs/tests/test_cpu_relax.yml configs/dask_cluster/local_cluster/local_cluster.py
env:
OMP_NUM_THREADS: 4
test_kubecluster:
name: Test catlas with kubecluster
runs-on: [self-hosted, linux, shared-scratch]
container:
image: docker://ulissigroup/catlas:latest
volumes:
- /home/jovyan/shared-scratch:/home/jovyan/shared-scratch
steps:
- uses: azure/k8s-set-context@v2
with:
method: kubeconfig
kubeconfig: ${{ secrets.ZULISSI_KUBECONFIG }}
context: ulissigroup-desktops-fqdn
id: setcontext
- run: |
mkdir -p /home/jovyan/shared-scratch/catlas_runners/$GITHUB_RUN_ID
mkdir -p /home/jovyan/shared-scratch/catlas_runners/$GITHUB_RUN_ID/catlas
ln -s /home/jovyan/shared-scratch/catlas_runners/$GITHUB_RUN_ID/catlas
(cd /home/jovyan/ocp && git pull)
rsync -a /home/jovyan/ocp /home/jovyan/shared-scratch/catlas_runners/$GITHUB_RUN_ID/
- uses: actions/checkout@v3
with:
path: catlas
- name: Test direct inference with kubecluster
run: |
cd catlas
ln -s /home/jovyan/shared-scratch/ocp_checkpoints
ln -s /home/jovyan/shared-scratch/catlas/df_pkls ./catlas/parity/
ln -s /home/jovyan/shared-scratch/catlas/pourbaix_diagrams ./catlas/
python setup.py develop
- name: Startup dask cluster
run: |
sed -i "s/GITHUB_RUN_ID/$GITHUB_RUN_ID/g" catlas/configs/dask_cluster/dask_operator/catlas-hybrid-cluster-github.yml
sed -i "s/catlas-hybrid-cluster/catlas-hybrid-cluster-$GITHUB_RUN_ID/g" catlas/configs/dask_cluster/dask_operator/dask_connect.py
kubectl apply -f catlas/configs/dask_cluster/dask_operator/catlas-hybrid-cluster-github.yml
sleep 100
kubectl scale --replicas=2 daskworkergroup catlas-hybrid-cluster-$GITHUB_RUN_ID-default-worker-group
- name: Test cpu relaxation inference with kubecluster
run: |
cd catlas
python bin/predictions.py configs/tests/test_cpu_relax.yml configs/dask_cluster/dask_operator/dask_connect.py
- name: Test gpu relaxation with kubecluster
run: |
cd catlas
kubectl scale --replicas=1 daskworkergroup catlas-hybrid-cluster-$GITHUB_RUN_ID-gpu-worker-group
python bin/predictions.py configs/tests/test_gpu_relax.yml configs/dask_cluster/dask_operator/dask_connect.py
- name: Shut down dask cluster
if: always()
run: |
kubectl delete daskcluster catlas-hybrid-cluster-$GITHUB_RUN_ID