Skip to content

backfill-predictions #2044

backfill-predictions

backfill-predictions #2044

name: backfill-predictions
on:
schedule:
- cron: '0 * * * *'
workflow_dispatch:
env:
PYTHON_VERSION: 3.12.4
POETRY_VERSION: 1.8.3
POETRY_URL: https://install.python-poetry.org
jobs:
inference_pipeline:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
# Poetry cache depends on OS, Python version and Poetry version.
- name: Cache Poetry cache
uses: actions/cache@v3
with:
path: ~/.cache/pypoetry
key: poetry-cache-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ env.POETRY_VERSION }}
# virtualenv cache should depends on OS, Python version and `poetry.lock` (and optionally workflow files).
- name: Cache Packages
uses: actions/cache@v3
with:
path: ~/.local
key: poetry-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('**/poetry.lock') }}-${{ hashFiles('.github/workflows/*.yml') }}
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v3
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Poetry
run: |
curl -sSL ${{ env.POETRY_URL }} | python - --version ${{ env.POETRY_VERSION }}
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install Dependencies
run: poetry install
- name: Create env file
run: |
touch .env
echo EMAIL = ${{ secrets.EMAIL }} > .env
echo COMET_PROJECT_NAME = ${{secrets.COMET_PROJECT_NAME }} > .env
echo COMET_WORKSPACE = ${{secrets.COMET_WORKSPACE }} > .env
echo COMET_API_KEY = ${{ secrets.COMET_API_KEY }} > .env
echo DATABASE_PUBLIC_URL = ${{ secrets.DATABASE_PUBLIC_URL }} > .env
echo HOPSWORKS_PROJECT_NAME = ${{ secrets.HOPSWORKS_PROJECT_NAME }} > .env
echo HOPSWORKS_API_KEY = ${{ secrets.HOPSWORKS_API_KEY }} > .env
- name: Generating new batch of predictions
env:
EMAIL: ${{ secrets.EMAIL }}
COMET_PROJECT_NAME: ${{secrets.COMET_PROJECT_NAME }}
COMET_WORKSPACE: ${{secrets.COMET_WORKSPACE }}
COMET_API_KEY: ${{ secrets.COMET_API_KEY }}
DATABASE_PUBLIC_URL: ${{ secrets.DATABASE_PUBLIC_URL }}
HOPSWORKS_PROJECT_NAME: ${{ secrets.HOPSWORKS_PROJECT_NAME }}
HOPSWORKS_API_KEY: ${{ secrets.HOPSWORKS_API_KEY }}
run: make backfill-predictions