About . Prerequisites for Development . Directory Structure . Getting Started . Contributors .
This repository host Python based scripts for HR Machine Learning. It provides a skeleton for users to train models and hosting the model on fastapi to allow API calls to be made for predictions.
│ .gitignore
│ README.md
│ requirements.in
│ requirements.txt
│ run.py
│
├───experiments
│ demo_notebook.ipynb
│
├───images
│ fastapi_demo.png
│ fastapi_output.png
│
├───src
│ │ config.py
│ │ main.py
│ │ utils.py
│ │
│ └───model
│ │ grid.pkl
│ └───models.py
│
└───tests
└───test_utils.py
- conda environment
- Python version >= 3.9, <3.10
- Bash shell/unix terminal/git bash (for Windows)
# cd to preferred repository
git clone https://github.com/Bcpeh/hr-machine-learning.git
# creating a new conda environment
conda create -n myenv python=3.9
# installing required packages
pip install -r requirements.txt
# Running unit tests
pytest tests/test_utils.py
# Running fastapi
python run.py
Once your localhost is running visit http://localhost:2222/models
Example of sending an inference request via Swagger UI:
Example of output:
Example of sending an inference request via command line:
curl -X 'POST' \
'http://localhost:2222/v1/predict' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"enrollee_id": 12,
"city_development_index": "0.827",
"gender": "Male",
"relevent_experience": "Has relevent experience",
"enrolled_university": "Full time course",
"education_level": "Graduate",
"major_discipline": "STEM",
"experience": "9",
"company_size": "<10",
"company_type": null,
"last_new_job": "1",
"training_hours": "21"
}
If you have any questions please contact one of our contributors below
- Boon Chong Email