This project involves the training and inference of a machine learning model using the Iris dataset. The repository is structured to separate the training and inference environments, ensuring a clear workflow and easy reproducibility.
project_repository/
│
├── datafiles/
│ ├── train_set.csv # Training data file
│ └── inference_set.csv # Inference data file
│
├── training/
│ ├── Dockerfile # Dockerfile for training environment
│ ├── train_script.py # Python script for training the model
│ └── requirements_train.txt # Dependencies for training
│
├── inference/
│ ├── Dockerfile # Dockerfile for inference environment
│ ├── infer_script.py # Python script for model inference
│ └── requirements_infer.txt # Dependencies for inference
│
├── unittests/
│ └── unittests.py
│
└── README.md # README file
- Docker
- Python 3.x
- Clone the repository:
git clone [repository URL]
- Navigate to the cloned directory:
cd your_project_repository
- Build the Docker image for training:
docker build -t iris-train -f training/Dockerfile .
- Run the Docker container:
docker run iris-train
- Build the Docker image for inference:
docker build -t iris-infer -f inference/Dockerfile .
- Run the Docker container:
docker run iris-infer
- The training script (
train_script.py
) is located in thetraining/
directory. This script trains the model usingtrain_set.csv
and saves the trained model for inference.
- The inference script (
infer_script.py
) is located in theinference/
directory. This script loads the trained model and performs inference oninference_set.csv
.
- O. K.