Model Creation #593
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Model Creation | |
on: | |
workflow_dispatch: | |
schedule: | |
# every hour on the 15th of each month | |
# - cron: "0 * 15 * *" | |
# try every 90 mins of the 15th? | |
# so no overlap between runs | |
- cron: "*/90 * 15 * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
order: [2] | |
window: [14] | |
# trial: [1, 2, 3, 4, 5] | |
fail-fast: false | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
- name: Cache pip dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install flake8 pytest coverage | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Decrypt script | |
env: | |
RH_PASSWORD: ${{ secrets.RH_PASSWORD }} | |
SALT: ${{ secrets.SALT }} | |
run: | | |
python util/decrypt.py encrypted/create_model.py | |
- name: Create model | |
env: | |
# EVENT: ${{ github.event_name }} | |
ORDER: ${{ matrix.order }} | |
WINDOW: ${{ matrix.window }} | |
# TRIAL: ${{ matrix.trial }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | |
S3_BUCKET: ${{ secrets.S3_BUCKET }} | |
run: | | |
python encrypted/create_model.py | |
# Add step to create visualization after automating model creation | |
# Should be able to copy step from visualize.yml |