Before you begin, ensure you have installed the required packages as specified in requirements.txt
.
- To install package dependencies, execute:
pip install -r requirements.txt
This script is responsible for training the machine learning model.
- Make sure you are in the directory containing both the
train.py
file andtraining.csv
. - Run the script with the command:
python3 train.py
- This will process the training data from
training.csv
, train the model, and save it asrf_model.joblib
. - If your training data file has a different name, adjust the script accordingly.
- This will process the training data from
These tests aim to verify the functionality of utilities within the project.
- Ensure you are in the directory that contains the
test_utils.py
file. - Run the unit tests with:
python3 -m unittest test_utils.py
- This will execute all test cases in
test_utils.py
, confirming that the functions inutils.py
operate correctly.
- This will execute all test cases in
model.py
can be executed using Docker or directly on your local machine.
- Be in the directory containing the
Dockerfile
. - Build the Docker image using:
docker build -t aki .
- Run the Docker container, ensuring the current directory is mounted to
/data
inside the container:docker run -v ${PWD}:/data aki
- Go to the directory containing
model.py
. - Execute the script with:
python3 model.py