68 lines
1.5 KiB
YAML
68 lines
1.5 KiB
YAML
name: Housing Price Workflow
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
epochs:
|
|
description: 'Number of epochs'
|
|
required: true
|
|
default: 20
|
|
learning_rate:
|
|
description: 'Learning rate'
|
|
required: true
|
|
default: 0.001
|
|
batch_size:
|
|
description: 'Batch size'
|
|
required: true
|
|
default: 32
|
|
|
|
jobs:
|
|
install_dependencies:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.8'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install pandas scikit-learn tensorflow matplotlib mlflow
|
|
|
|
train_model:
|
|
needs: install_dependencies
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.8'
|
|
|
|
- name: Train Model
|
|
run: python ./github_project/create_model.py ${{ github.event.inputs.epochs }} ${{ github.event.inputs.learning_rate }} ${{ github.event.inputs.batch_size }}
|
|
|
|
evaluate_model:
|
|
needs: install_dependencies
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.8'
|
|
|
|
- name: Evaluate Model
|
|
run: python ./github_project/evaluate.py ${{ github.run_number }}
|