Skip to content

Commit

Permalink
added all the changed files
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaustbh committed Aug 9, 2024
1 parent 77a5576 commit 7af12a9
Show file tree
Hide file tree
Showing 4 changed files with 638 additions and 521 deletions.
11 changes: 6 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/pycqa/isort
rev: 5.10.1
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/psf/black
rev: 22.6.0
rev: 24.8.0
hooks:
- id: black
# language_version: python3.9
Expand All @@ -38,6 +38,7 @@ repos:
language: system
pass_filenames: false
always_run: true
continue_on_error: true
args: [
"tests/"
]
"test/"
]
27 changes: 16 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,17 @@ export PIPENV_VERBOSITY := -0

prerequisites:
@echo "Building Python environment and unzipping dataset"
# python3 -m pip install --upgrade pip
# pip install --upgrade pipenv
# pipenv install --python 3.12
python3 -m pip install --upgrade pip
pip install --upgrade pipenv
pipenv install --python 3.12
@echo "Installing dependencies from Pipfile"
pipenv install --dev
pipenv run python ./ingestion/UnZipRaw.py

mlflow:
@echo "Preparing directories for MLflow..."
mkdir -p ${HOME}/mlops_zoomcamp/final_project/project_1/mnt/mlruns/tracking
mkdir -p ${HOME}/mlops_zoomcamp/final_project/project_1/mnt/mlruns/artifacts
@echo "Starting MLflow server..."
mlflow server \
--backend-store-uri sqlite:///${HOME}/mlops_zoomcamp/final_project/project_1/mlflow.db \
--default-artifact-root ${HOME}/mlops_zoomcamp/final_project/project_1/mnt/mlruns/artifacts \
--host 0.0.0.0

prefect:
@echo "Starting Prefect server"
Expand All @@ -24,11 +21,19 @@ prefect:
run-training-pipeline:
pipenv run python pipeline/training_pipeline.py

web-service:
monitoring:
@echo "Starting monitoring with Evidently and Grafana dashboards"
pipenv run docker-compose -f docker-compose.yaml up --build
@echo "Open a new terminal and run"
@echo "cd monitoring"
@echo "python evidently_metrics_calculations.py"


deployment:
@echo "Creating docker container for model deployment (as web service)"
pipenv run docker build -f ./deployment/Dockerfile -t crab-age-prediction-service:v1
@echo "Open a new terminal and run"
@echo "cd web-service"
@echo "cd deployment"
@echo "docker run -it --rm -p 5010:5010 crab-age-prediction-service:v1"
@echo "Open a new terminal and run"
@echo "python test.py"
Expand All @@ -38,4 +43,4 @@ web-service:
quality-check:
pipenv run isort .
pipenv run black .
pipenv run pylint --recursive=y .
pipenv run pylint --recursive=y .
3 changes: 1 addition & 2 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ pytest = "*"
isort = "*"
black = "*"
pylint = "*"
pre-commit = "*"

[dev-packages]
ipykernel = "*"


Loading

0 comments on commit 7af12a9

Please sign in to comment.