Skip to content

Commit

Permalink
fix: revert to last working pipeline configuration (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
kartikey-vyas authored Sep 16, 2024
1 parent 9443a74 commit 4a44deb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 64 deletions.
27 changes: 1 addition & 26 deletions .github/workflows/predict-parallel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,34 +26,9 @@ jobs:
- name: Get start time
id: start-time
run: echo "start-time=$(date +%s)" >> "$GITHUB_OUTPUT"

# pull-model-image:
# runs-on: ubuntu-latest
# steps:
# - name: Remove unnecessary files
# run: |
# sudo rm -rf /usr/share/dotnet
# sudo rm -rf "$AGENT_TOOLSDIRECTORY"
# sudo rm -rf /opt/ghc
# sudo rm -rf "/usr/local/share/boost"
# - name: cache model Docker image
# id: cache
# uses: actions/cache@v3
# with:
# path: /tmp/${{ inputs.model-id }}.tar
# key: ${{ runner.os }}-docker-${{ inputs.model-id }}
# restore-keys: |
# ${{ runner.os }}-docker-${{ inputs.model-id }}

# - name: pull and save requested model image
# if: steps.cache.outputs.cache-hit != 'true'
# run: |
# docker pull ersiliaos/${{ inputs.model-id }}:latest
# docker save ersiliaos/${{ inputs.model-id }} -o /tmp/${{ inputs.model-id }}.tar



generate-matrix:
# needs: pull-model-image
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
Expand Down
53 changes: 15 additions & 38 deletions .github/workflows/predict.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ on:
inputs:
numerator:
required: true
type: string
type: number
denominator:
required: true
type: string
type: number
model-id:
required: true
type: string
sha:
required: true
type: string
sample-only:
required: false
type: string
SHA:
required: true
type: string

jobs:
infer-and-upload:
Expand All @@ -44,15 +44,13 @@ jobs:
run: sudo apt-get update && sudo apt-get install -y make

- name: Set up Python environment
uses: actions/setup-python@v5
uses: actions/setup-python@v2
with:
python-version: '3.10'
cache: 'pip'
- run: make install-prod

- name: Run make install
run: make install-prod

# we need this step as ersilia will use the default conda environment to run the example model during `ersilia serve`
# could get around this eventually if we only use conda for env management, but there are complexities around referencing a dev
# package from within our own package which poetry makes a lot easier
- name: set up conda
run: |
cd ersilia
Expand All @@ -66,33 +64,12 @@ jobs:
- name: Activate virtual environment
run: source .venv/bin/activate

- name: Remove unnecessary files
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
# - name: Restore cached Docker image
# id: cache
# uses: actions/cache@v3
# with:
# path: /tmp/${{ inputs.model-id }}.tar
# key: ${{ runner.os }}-docker-${{ inputs.model-id }}
# restore-keys: |
# ${{ runner.os }}-docker-${{ inputs.model-id }}

# - name: Load Docker image
# if: steps.cache.outputs.cache-hit == 'true'
# run: |
# docker load -i /tmp/${{ inputs.model-id }}.tar

- name: Run Python script to generate predictions and upload to S3
env:
INPUT_MODEL_ID: ${{ inputs.model-id }}
INPUT_SHA: ${{ inputs.SHA }}
INPUT_NUMERATOR: ${{ inputs.numerator }}
INPUT_DENOMINATOR: ${{ inputs.denominator }}
INPUT_SAMPLE_ONLY: ${{ inputs.sample-only }}
run: .venv/bin/python scripts/generate_predictions.py --env prod
MODEL_ID: ${{ inputs.model-id }}
SHA: ${{ inputs.SHA }}
numerator: ${{ inputs.numerator }}
sample-only: ${{ inputs.sample-only }}
GITHUB_REPOSITORY: ${{ github.event.repository.full_name }}
run: .venv/bin/python scripts/generate_predictions_with_aws_and_ersilia.py

0 comments on commit 4a44deb

Please sign in to comment.