mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Merge branch 'mlmodel' of github.com:Hestia-Homes/Model into mlmodel
This commit is contained in:
commit
8084b807e3
2 changed files with 30 additions and 3 deletions
27
.github/workflows/cml.yml
vendored
Normal file
27
.github/workflows/cml.yml
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
name: model-training
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- mlmodel
|
||||
jobs:
|
||||
run:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
- uses: iterative/setup-cml@v1
|
||||
- name: Train model
|
||||
env:
|
||||
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
ls
|
||||
cd model_data/simulation_system
|
||||
pip install -r requirements.txt
|
||||
python3 training.py --train-filepath ./model_build_data/change_data/rdsap_full/train_validation_data.parquet --test-filepath ./model_build_data/change_data/rdsap_full/test_data.parquet
|
||||
|
||||
cd model_directory/RDSAP_CHANGE
|
||||
echo "## MODEL METRICS from registry" > report.md
|
||||
cat model_registry.csv >> report.md
|
||||
|
||||
cml comment create report.md
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
import argparse
|
||||
import boto3
|
||||
# import boto3
|
||||
import os
|
||||
from pathlib import Path
|
||||
from datetime import datetime
|
||||
|
|
@ -152,7 +152,7 @@ def training(
|
|||
logger.info("--- Optimising model for deployment ---")
|
||||
|
||||
deployment_model_path = model.optimise_model_for_deployment(deployment_path= output_base / DEPLOYMENT_FOLDER)
|
||||
logger.info("Optimised version of best model can be found at: {deployment_model_path}")
|
||||
logger.info(f"Optimised version of best model can be found at: {deployment_model_path}")
|
||||
|
||||
# TODO: Need a model registry - for now have this as a CSV
|
||||
# Save this in the model directory
|
||||
|
|
@ -204,4 +204,4 @@ if __name__ == "__main__":
|
|||
test_filepath=args.test_filepath,
|
||||
target_column=args.target_column,
|
||||
model_type=args.model_type
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue