Skip to content

Commit f9558ef

Browse files
committed
add github workflow to build and cache pickles after pushing to master
1 parent 2a8f608 commit f9558ef

File tree

2 files changed

+74
-1
lines changed

2 files changed

+74
-1
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ ENV/
9191
# Data
9292
*.csv
9393
*.parquet
94-
*.pkl
9594
*.json
9695
*.model
9796

workflows/build-models.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Build Example Model Pickles
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
# paths:
7+
# - example_model.ipynb
8+
# - hello_numerai.ipynb
9+
# - feature_neutralization.ipynb
10+
# - target_ensemble.ipynb
11+
branches:
12+
- master
13+
14+
concurrency: build-example-models
15+
16+
jobs:
17+
18+
build_and_test:
19+
name: "Build Example Model Pickles"
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v3
23+
- uses: actions/setup-python@v5
24+
with:
25+
python-version: "3.11"
26+
- name: Install jupyter
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install jupyter
30+
- name: build-example-model
31+
run: |
32+
jupyter nbconvert \
33+
--execute example_model.ipynb \
34+
--ExecutePreprocessor.timeout=-1 \
35+
--to html
36+
- name: build-hello-numerai
37+
run: |
38+
jupyter nbconvert \
39+
--execute hello_numerai.ipynb \
40+
--ExecutePreprocessor.timeout=-1 \
41+
--to html
42+
- name: build-feature-neutralization
43+
run: |
44+
jupyter nbconvert \
45+
--execute feature_neutralization.ipynb \
46+
--ExecutePreprocessor.timeout=-1 \
47+
--to html
48+
- name: build-target-ensemble
49+
run: |
50+
jupyter nbconvert \
51+
--execute target_ensemble.ipynb \
52+
--ExecutePreprocessor.timeout=-1 \
53+
--to html
54+
- name: delete-html
55+
run: |
56+
rm example_model.html
57+
rm hello_numerai.html
58+
rm feature_neutralization.html
59+
rm target_ensemble.html
60+
- name: move-pickles-to-pickles-dir
61+
run: |
62+
mkdir -p pickles/
63+
mv -f example_model.pkl pickles/
64+
mv -f hello_numerai.pkl pickles/
65+
mv -f feature_neutralization.pkl pickles/
66+
mv -f target_ensemble.pkl pickles/
67+
- name: commit-to-master
68+
uses: EndBug/add-and-commit@v9
69+
with:
70+
add: |
71+
example_model.html
72+
hello_numerai.html
73+
feature_neutralization.html
74+
target_ensemble.html

0 commit comments

Comments
 (0)