generated from ersilia-os/eos-template
-
Notifications
You must be signed in to change notification settings - Fork 2
85 lines (73 loc) · 2.63 KB
/
test-model-pr.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
name: Model Test on PR
on:
pull_request:
jobs:
test:
if: github.repository != 'ersilia-os/eos-template'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # [email protected]
with:
lfs: true
# This might stop working in the future, so we need to keep an eye on it
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: true
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: true
- name: Add conda to system path
run: echo $CONDA/bin >> $GITHUB_PATH
- name: Source conda
run: source $CONDA/etc/profile.d/conda.sh
- name: Set Python to 3.10.10
run:
conda install -y python=3.10.10
- name: Install dependencies
run: |
source activate
conda init
conda install git-lfs -c conda-forge
git-lfs install
conda install gh -c conda-forge
- name: Install ersilia
run: |
source activate
python --version
echo "After conda init"
conda init
python -m pip install git+https://github.com/ersilia-os/ersilia.git
- name: Check metadata before updating to AirTable
id: check-metadata
env:
USER_NAME: ${{ github.event.pull_request.head.repo.owner.login }}
BRANCH: "main"
REPO_NAME: ${{ github.event.repository.name }}
run: |
source activate
wget https://raw.githubusercontent.com/ersilia-os/ersilia/master/.github/scripts/update_metadata_to_airtable.py
python3 update_metadata_to_airtable.py $USER_NAME $REPO_NAME $BRANCH
- name: Predict output
env:
MODEL_ID: ${{ github.event.repository.name }}
run: |
source activate
echo "Sample model id selected: $MODEL_ID"
ersilia -v fetch $MODEL_ID --repo_path .
ersilia -v serve $MODEL_ID
ersilia sample -n 5 -f input.csv
ersilia -v api -i input.csv
ersilia close
- name: Upload log output
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb #pin v3.1.1
with:
name: debug-logs
retention-days: 1
path: /home/runner/eos/console.log