generated from JacksonBurns/blank-python-project
-
Notifications
You must be signed in to change notification settings - Fork 3
64 lines (62 loc) · 2.33 KB
/
reproduce_paper.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
name: Reproduce Paper
# This action runs a Jupyter notebook in the examples folder that uses astartes to generate
# train/val/test splits on two datasets (RDB7 and QM9). These dynamically generated splits
# are then compared to the splits which were created at the time of paper writing, to ensure
# that subsequent releases of astartes have backwards compatibility.
on:
schedule:
- cron: "0 8 * * 1-5"
workflow_dispatch:
concurrency:
group: actions-id-${{ github.workflow }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
name: Reproduce Paper Data Splits
steps:
- uses: actions/checkout@v3
- uses: mamba-org/setup-micromamba@main
with:
environment-name: temp
condarc: |
channels:
- defaults
- conda-forge
channel_priority: flexible
create-args: |
python=3.11
- name: Install Dependencies
run: |
python -m pip install -e .[molecules]
python -m pip install scikit-learn==1.2.2
python -m pip install notebook
python -m pip install "numpy<2"
- name: Backup Reference Splits
run: |
cd examples/reproduce_paper_splits
cp QM9_splits/QM9_splits_kmeans.pkl REFERENCE_QM9_splits_kmeans.pkl
cp QM9_splits/QM9_splits_random.pkl REFERENCE_QM9_splits_random.pkl
cp QM9_splits/QM9_splits_scaffold.pkl REFERENCE_QM9_splits_scaffold.pkl
cp RDB7_splits/RDB7_splits_kmeans.pkl REFERENCE_RDB7_splits_kmeans.pkl
cp RDB7_splits/RDB7_splits_random.pkl REFERENCE_RDB7_splits_random.pkl
cp RDB7_splits/RDB7_splits_scaffold.pkl REFERENCE_RDB7_splits_scaffold.pkl
- name: Execute Splitting Notebooks
run: |
cd examples/reproduce_paper_splits
ipython QM9_make_splits.ipynb
ipython RDB7_make_splits.ipynb
- name: Upload New Splits as Artifacts
uses: actions/upload-artifact@v3
with:
name: dynamically-generated-splits
path: |
examples/reproduce_paper_splits/QM9_splits/
examples/reproduce_paper_splits/RDB7_splits/
- name: Compare Reference to Current
run: |
cd examples/reproduce_paper_splits
python validate_splits.py