Folder structure of the project:
- ingesteddata - folder containing the ouput from
ingestion.py
script. - praticedata - folder containing input data files for
ingestion.py
script. - praticemodels - folder that contains the model for the project. Produced by
training.py
&scoring.py
scripts. - production_deployment - folder that contains artifacts copied by the
deployment.py
script. - sourcedata
- testdata
The Makefile
contains the commands to run the project.
Start the REST API:
make run
Run script that invokes the REST API:
python apicalls.py
The output from the calls are writen to the file practicemodels/apireturns.txt
Ensure that the fullprocess.sh
script can be executed.
chmod +x fullprocess.sh
cURL examples for the API.
curl -X POST --location "http://localhost:8000/prediction" \
-H "Content-Type: application/json; charset=utf-8" \
-d "{ \"data_file\": \"testdata/testdata.csv\" }"
Get the F1 score for the trained model.
curl -X GET --location "http://localhost:8000/scoring"
Get summary statistics from the numerical fields of the ingested data. Reported as mean, median and standard deviation.
curl -X GET --location "http://localhost:8000/summarystats"
Get percentage of missing values and the timing of ingestion and model training.
curl -X GET --location "http://localhost:8000/diagnostics"