Skip to content

S3 enhanced

S3 enhanced #88

Workflow file for this run

name: training-pipeline
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
continous-training:
runs-on: [ubuntu-latest]
env:
GDRIVE_CREDENTIALS: ${{ secrets.GDRIVE_CREDENTIALS}}
repo_token: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: iterative/setup-cml@v1
- uses: iterative/setup-dvc@v1
- uses: actions/setup-python@v1
with:
python-version: 3.7
architecture: x64
- name: Cache python modules
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pkg-deps-${{ hashFiles('requirements.txt') }}-${{ hashFiles('**/*.py') }}
restore-keys: |
${{ runner.os }}-pkg-deps-${{ hashFiles('requirements.txt') }}-
${{ runner.os }}-pkg-deps-
${{ runner.os }}-
- name: Install package
run: |
sudo apt install libspatialindex-dev python3-rtree
python -m pip install --upgrade pip
pip install -e .
- name: Set env
run: |
mkdir -p .dvc/tmp
echo "$GDRIVE_CREDENTIALS" | cat - | base64 -d > .dvc/tmp/credentials.json
- name: CML
run: |
dvc repro -R dags/dvc/train
echo "# Models" >> report.md
echo "## Random Forest" >> report.md
cml-publish .cache/metadata_registry/RF_classification_plots.png --md >> report.md
echo "## XGBOOST" >> report.md
cml-publish .cache/metadata_registry/XGBOOST_classification_plots.png --md >> report.md
echo "# Metrics" >> report.md
dvc metrics show --show-md >> report.md
git fetch --prune
dvc metrics diff --show-md master >> report.md
cml-send-comment report.md
- name: Push to registry
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
dvc push -r artifacts-registry