Skip to content

inference-pipeline #249

inference-pipeline

inference-pipeline #249

name: inference-pipeline
on:
schedule:
- cron: '*/60 * * * *'
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 YEAR = ${{ secrets.YEAR }} > .env
echo EMAIL = ${{ secrets.EMAIL }} > .env
echo N_FEATURES = ${{ secrets.N_FEATURES }} > .env
echo FEATURE_GROUP_VERSION = ${{ secrets.FEATURE_GROUP_VERSION }} > .env
echo FEATURE_VIEW_VERSION = ${{ secrets.FEATURE_VIEW_VERSION }} > .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 HOPSWORKS_PROJECT_NAME = ${{ secrets.HOPSWORKS_PROJECT_NAME }} > .env
echo HOPSWORKS_API_KEY = ${{ secrets.HOPSWORKS_API_KEY }} > .env
- name: Generating new batch of predictions
env:
YEAR: ${{ secrets.YEAR }}
EMAIL: ${{ secrets.EMAIL }}
N_FEATURES: ${{ secrets.N_FEATURES }}
FEATURE_GROUP_VERSION: ${{ secrets.FEATURE_GROUP_VERSION }}
FEATURE_VIEW_VERSION: ${{ secrets.FEATURE_VIEW_VERSION }}
COMET_PROJECT_NAME: ${{secrets.COMET_PROJECT_NAME }}
COMET_WORKSPACE: ${{secrets.COMET_WORKSPACE }}
COMET_API_KEY: ${{ secrets.COMET_API_KEY }}
HOPSWORKS_PROJECT_NAME: ${{ secrets.HOPSWORKS_PROJECT_NAME }}
HOPSWORKS_API_KEY: ${{ secrets.HOPSWORKS_API_KEY }}
run: make backfill-predictions