Compare commits
No commits in common. "5d5717b77ba7f9683021d66b655b68c502f036b4" and "8568c10b607f171607fa723effa92ab7593da097" have entirely different histories.
5d5717b77b
...
8568c10b60
71
.github/workflows/main.yml
vendored
71
.github/workflows/main.yml
vendored
@ -1,71 +0,0 @@
|
|||||||
name: GitHub Workflow
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
epochs:
|
|
||||||
description: 'Number of epochs'
|
|
||||||
required: true
|
|
||||||
default: '10'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-and-train:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v1
|
|
||||||
|
|
||||||
- name: Login to DockerHub
|
|
||||||
uses: docker/login-action@v1
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Build and push
|
|
||||||
uses: docker/build-push-action@v2
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
push: true
|
|
||||||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/training-model:latest
|
|
||||||
|
|
||||||
- name: Run training
|
|
||||||
run: docker run ${{ secrets.DOCKERHUB_USERNAME }}/training-model:latest python3 ../../train.py --epochs ${{ github.event.inputs.epochs }}
|
|
||||||
|
|
||||||
evaluate:
|
|
||||||
needs: build-and-train
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: '3.x'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install pandas numpy tensorflow scikit-learn matplotlib
|
|
||||||
|
|
||||||
- name: Run evaluation
|
|
||||||
run: python ../../evaluate.py
|
|
||||||
|
|
||||||
archive:
|
|
||||||
needs: evaluate
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Archive model
|
|
||||||
run: tar -czvf ../../model.tar.gz ../../model.h5
|
|
||||||
|
|
||||||
- name: Upload model
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: model
|
|
||||||
path: ../../model.tar.gz
|
|
@ -62,7 +62,7 @@ pipeline {
|
|||||||
|
|
||||||
stage('Run DVC Pipeline') {
|
stage('Run DVC Pipeline') {
|
||||||
steps {
|
steps {
|
||||||
sh 'PATH=$PATH:~/.local/bin/ dvc reproduce'
|
sh 'PATH=$PATH:~/.local/bin/ dvc repro'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user