Step 1: Write the README
Carlos needs to run this system without calling you. That means documentation: how to build the container, how to run it, how to make predictions, how to check logs.
Direct Claude to write a README:
Write a README.md for Carlos. Cover: how to build the Docker container, how to run it, how to make a prediction with curl (include a real example with farm sensor values), how to check the prediction logs, and how to check system health. Keep it practical -- Carlos is a data person, not a developer. He should be able to follow it step by step.
The README is a communication artifact. python train.py --config config.yaml tells a colleague exactly what to do. The Dockerfile declares the serving environment. The README ties them together into something Carlos can follow in ten minutes.
Step 2: Run the full end-to-end sequence
This is the integration test. Run every component in sequence to verify the complete system works:
Train the model with the scripted pipeline:
python train.py --config config.yaml
Build the serving container:
docker build -t finca-serving .
Run the container with the log directory mounted:
docker run -d -p 8000:8000 -v $(pwd)/logs:/app/logs finca-serving
Check the health endpoint:
curl http://localhost:8000/health
Make a prediction:
curl -X POST http://localhost:8000/predict -H "Content-Type: application/json" -d '{"farm_id": "farm_03", "temperature": 24.0, "rainfall": 20.0, "soil_moisture": 55.0, "humidity": 78.0, "altitude": 1500.0}'
Check the prediction log:
cat logs/predictions.jsonl | tail -1
Every step should succeed. If something fails at integration -- a path mismatch between the pipeline output and the container, a Docker build cache issue, a log volume not mounted -- that's a gap between components that per-component testing missed.
Step 3: Push to GitHub
Commit the complete project and push:
git add -A && git commit -m "feat: complete production ML system with Docker, pipeline, and logging"
git push origin main
Step 4: Deliver to Valentina
Send Valentina a summary of what you built and how Carlos can use it. Cover: the system runs in a Docker container so it works on any machine, Carlos can get predictions with a single curl command, every prediction is logged with timestamps and input data, and the health endpoint tells him if something is wrong.
Keep it in terms she understands. "Docker container" might not mean anything to her -- "the system packages everything together so it runs the same on Carlos's computer as it does on mine" is more useful.
Step 5: Valentina's response
Valentina responds: Carlos ran it this morning. Took him ten minutes. He followed the README and got predictions for all twelve farms. That is exactly what she needed.
She mentions the prediction logs -- she can see every prediction the model made, when it was made, and what input data it used. When the next harvest comes in, she will know exactly how far off the predictions were.
Then she asks: "One thing -- if the predictions start getting worse over time, is there a way to know? Right now I'd only find out when la cosecha doesn't match." That question -- how to detect when a model's predictions degrade -- is drift detection. You do not have that yet. The prediction logs you built are the foundation for it. But building drift detection is future work, not this project.
Check: The full sequence works: python train.py --config config.yaml produces a model, docker build creates the serving image, docker run starts the container, curl to /predict returns predictions, and the log file shows the predictions with all metadata.