-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Dockerfile, tests & updated requirements.txt
- Loading branch information
Showing
27 changed files
with
2,898 additions
and
76 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Use the official Python image from the Docker Hub | ||
FROM python:3.12-slim | ||
|
||
RUN pip install -U pip | ||
|
||
WORKDIR /app | ||
|
||
COPY requirements.txt . | ||
RUN pip install -r requirements.txt | ||
|
||
COPY setup.py . | ||
# installs the project in executable mode | ||
RUN pip install -e . | ||
|
||
# Copy the rest of the application code | ||
COPY . . | ||
|
||
# Expose the port the application will run on | ||
EXPOSE 9696 | ||
|
||
# Define the entry point for the container | ||
ENTRYPOINT ["gunicorn", "--bind=0.0.0.0:9696", "app:app"] |
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 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 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
Binary file not shown.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: 1 | ||
|
||
# list of datasources that should be added | ||
# available in the database | ||
datasources: | ||
- name: PostgreSQL | ||
type: postgres | ||
access: proxy | ||
url: db.:5432 | ||
database: ${POSTGRES_DB} | ||
user: ${POSTGRES_USER} | ||
secureJsonData: | ||
password: ${POSTGRES_PASSWORD} | ||
jsonData: | ||
sslmode: 'disable' |
40 changes: 40 additions & 0 deletions
40
mlruns/1/520470d284b540728611088fe8f69d28/artifacts/xgboost_model/MLmodel
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
artifact_path: xgboost_model | ||
flavors: | ||
python_function: | ||
data: model.xgb | ||
env: | ||
conda: conda.yaml | ||
virtualenv: python_env.yaml | ||
loader_module: mlflow.xgboost | ||
python_version: 3.12.4 | ||
xgboost: | ||
code: null | ||
data: model.xgb | ||
model_class: xgboost.sklearn.XGBClassifier | ||
model_format: xgb | ||
xgb_version: 2.1.0 | ||
mlflow_version: 2.15.1 | ||
model_size_bytes: 1219840 | ||
model_uuid: 4f645dacef5d45c0a2cf142cd30d02b8 | ||
run_id: 520470d284b540728611088fe8f69d28 | ||
saved_input_example_info: | ||
artifact_path: input_example.json | ||
pandas_orient: split | ||
serving_input_path: serving_input_payload.json | ||
type: dataframe | ||
signature: | ||
inputs: '[{"type": "double", "name": "Area", "required": true}, {"type": "double", | ||
"name": "Perimeter", "required": true}, {"type": "double", "name": "MajorAxisLength", | ||
"required": true}, {"type": "double", "name": "MinorAxisLength", "required": true}, | ||
{"type": "double", "name": "AspectRatio", "required": true}, {"type": "double", | ||
"name": "Eccentricity", "required": true}, {"type": "double", "name": "ConvexArea", | ||
"required": true}, {"type": "double", "name": "EquivDiameter", "required": true}, | ||
{"type": "double", "name": "Extent", "required": true}, {"type": "double", "name": | ||
"Solidity", "required": true}, {"type": "double", "name": "Roundness", "required": | ||
true}, {"type": "double", "name": "Compactness", "required": true}, {"type": "double", | ||
"name": "ShapeFactor1", "required": true}, {"type": "double", "name": "ShapeFactor2", | ||
"required": true}, {"type": "double", "name": "ShapeFactor3", "required": true}, | ||
{"type": "double", "name": "ShapeFactor4", "required": true}]' | ||
outputs: '[{"type": "long", "required": true}]' | ||
params: null | ||
utc_time_created: '2024-08-17 20:20:39.766356' |
14 changes: 14 additions & 0 deletions
14
mlruns/1/520470d284b540728611088fe8f69d28/artifacts/xgboost_model/conda.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- python=3.12.4 | ||
- pip<=24.0 | ||
- pip: | ||
- mlflow==2.15.1 | ||
- numpy==1.26.4 | ||
- pandas==2.2.2 | ||
- psutil==5.9.8 | ||
- scikit-learn==1.5.1 | ||
- scipy==1.14.0 | ||
- xgboost==2.1.0 | ||
name: mlflow-env |
1 change: 1 addition & 0 deletions
1
mlruns/1/520470d284b540728611088fe8f69d28/artifacts/xgboost_model/input_example.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"columns": ["Area", "Perimeter", "MajorAxisLength", "MinorAxisLength", "AspectRatio", "Eccentricity", "ConvexArea", "EquivDiameter", "Extent", "Solidity", "Roundness", "Compactness", "ShapeFactor1", "ShapeFactor2", "ShapeFactor3", "ShapeFactor4"], "data": [[75351.0, 1095.258, 408.4086836, 236.0432439, 1.730228228, 0.816066202, 76285.0, 309.7416229, 0.794305532, 0.98775644, 0.789343462, 0.758410963, 0.005420083, 0.001106125, 0.575187188, 0.995205109]]} |
Binary file added
BIN
+1.16 MB
mlruns/1/520470d284b540728611088fe8f69d28/artifacts/xgboost_model/model.xgb
Binary file not shown.
7 changes: 7 additions & 0 deletions
7
mlruns/1/520470d284b540728611088fe8f69d28/artifacts/xgboost_model/python_env.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
python: 3.12.4 | ||
build_dependencies: | ||
- pip==24.0 | ||
- setuptools==69.5.1 | ||
- wheel==0.43.0 | ||
dependencies: | ||
- -r requirements.txt |
7 changes: 7 additions & 0 deletions
7
mlruns/1/520470d284b540728611088fe8f69d28/artifacts/xgboost_model/requirements.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
mlflow==2.15.1 | ||
numpy==1.26.4 | ||
pandas==2.2.2 | ||
psutil==5.9.8 | ||
scikit-learn==1.5.1 | ||
scipy==1.14.0 | ||
xgboost==2.1.0 |
42 changes: 42 additions & 0 deletions
42
mlruns/1/520470d284b540728611088fe8f69d28/artifacts/xgboost_model/serving_input_payload.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"dataframe_split": { | ||
"columns": [ | ||
"Area", | ||
"Perimeter", | ||
"MajorAxisLength", | ||
"MinorAxisLength", | ||
"AspectRatio", | ||
"Eccentricity", | ||
"ConvexArea", | ||
"EquivDiameter", | ||
"Extent", | ||
"Solidity", | ||
"Roundness", | ||
"Compactness", | ||
"ShapeFactor1", | ||
"ShapeFactor2", | ||
"ShapeFactor3", | ||
"ShapeFactor4" | ||
], | ||
"data": [ | ||
[ | ||
75351.0, | ||
1095.258, | ||
408.4086836, | ||
236.0432439, | ||
1.730228228, | ||
0.816066202, | ||
76285.0, | ||
309.7416229, | ||
0.794305532, | ||
0.98775644, | ||
0.789343462, | ||
0.758410963, | ||
0.005420083, | ||
0.001106125, | ||
0.575187188, | ||
0.995205109 | ||
] | ||
] | ||
} | ||
} |
Oops, something went wrong.