Skip to content

Added logger class #166

Added logger class

Added logger class #166

Workflow file for this run

# Train model, build containerized model, and deploy model
name: CI/CD
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
# Run workflow manually from the Actions tab
workflow_dispatch:
jobs:
# train:
# runs-on: ubuntu-latest
# steps:
# # Checks-out repository under $GITHUB_WORKSPACE, so the job can access it
# - uses: actions/checkout@v3
# - name: Set up Python 3.10.*
# uses: actions/setup-python@v1
# with:
# python-version: 3.10.*
# - name: Install dependencies
# run: |
# make install
# - name: Add project path to sys.path
# run: |
# echo "PYTHONPATH=${{github.workspace}}" >> $GITHUB_ENV
# - name: Sort imports with isort
# run: |
# make isort
# - name: Format with black
# run: |
# make format
# - name: Test with pytest
# run: |
# make test
# - name: Lint with pylint
# run: |
# make lint
# - name: Prepare data
# run: |
# make prep_data
# - name: Setup Feast
# run: |
# make setup_feast
# - name: Split data
# run: |
# make split_data
# - name: Train
# env:
# COMET_API_KEY: ${{secrets.COMET_API_KEY}}
# run: |
# make train
# - name: Evaluate models
# env:
# COMET_API_KEY: ${{secrets.COMET_API_KEY}}
# run: |
# make evaluate
# - name: Test champion model
# env:
# COMET_API_KEY: ${{secrets.COMET_API_KEY}}
# run: |
# make test_model
build:
runs-on: ubuntu-latest
# needs: train
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
# Login using same GitHub Actions credentials
- name: Log in to GitHub container registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
# Ensures that repo name is lowercase, which is a requirement for publishing to ghcr.io
- name: Lowercase the repo name and username
run: echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
- name: Build and push container image to registry
uses: docker/build-push-action@v2
with:
push: true
tags: ghcr.io/${{ env.REPO }}:${{ github.sha }}
file: ./src/inference/Dockerfile