My 8-Day ML + MLOps Showcase Series - Machine Learning Maverick

My 8-Day ML + MLOps Showcase Series

My 8-Day ML + MLOps Showcase Series

ml-maverick

Share this:

My 8-Day ML + MLOps Showcase Series - Machine Learning Maverick

I’m excited to announce that I’ll be rolling out an 8-day LinkedIn series diving into my self-taught, AI-powered ML project, StellarHarvest Insight Engine. Tech recruiters & ML engineers, I’d love your feedback and insights!

My 8-Day ML + MLOps Showcase Series

Hey everyone!

🚀 Over the next week and a half, I’ll share:

  • How I built a production-grade pipeline in just 28 days (≈ 85 hrs) – work in progress
  • The “AI teammate” that wrote 90% of my boilerplate code
  • Key architecture, CI/CD, Kafka streaming, FastAPI, data-lake design, and more
  • Lessons learned, code snippets, and best practices for self-taught devs

🔍 Tech recruiters & senior ML engineers:

  • I’d love your feedback and insights as I showcase:
  • Scalable, maintainable MLOps practices
  • Real-world Kafka-driven data pipelines
  • CI/CD strategies that keep models production‑ready

🎯 My goal? Land my first ML engineer role through this series – so if you’re looking for a driven, self-taught engineer who embraces AI-assisted development, let’s connect!

🔔 𝗙𝗼𝗹𝗹𝗼𝘄 𝗼𝗿 𝘁𝘂𝗿𝗻 𝗼𝗻 𝗻𝗼𝘁𝗶𝗳𝗶𝗰𝗮𝘁𝗶𝗼𝗻𝘀 so you don’t miss Day 1 tomorrow: “Teaser & Project Intro”!


📌 𝗧𝗵𝗲 𝗽𝗿𝗼𝗷𝗲𝗰𝘁

𝗣𝗿𝗼𝗷𝗲𝗰𝘁 𝗦𝘁𝗲𝗹𝗹𝗮𝗿 𝗛𝗮𝗿𝘃𝗲𝘀𝘁 𝗜𝗻𝘀𝗶𝗴𝗵𝘁 𝗘𝗻𝗴𝗶𝗻𝗲 – predicts and visualizes the (earth, space) weather-related vulnerabilities for agriculture. It collects space weather data e.g. planetary K-index, which is used to characterize the magnitude of geomagnetic storms and earth agricultural data e.g. crop calendars for global agricultural production.


Day 1: Producers

Kicking off my 8-Day ML + MLOps Showcase Series: I’ll share what I built, why I built it, and how it evolved – follow along and learn with me. 🚀

🔧 𝗧𝗵𝗲 𝗰𝗼𝗱𝗲
(See attached screenshots of the stellar-harvest-ie-producers module)

💭 𝗦𝘁𝗿𝗲𝗮𝗺 𝗼𝗳 𝘁𝗵𝗼𝘂𝗴𝗵𝘁𝘀
• First, I searched for free, frequently updated, JSON-based APIs with large datasets.
• I knew I’d need Docker, Kafka, and a Jupyter-Notebook–style Python module – so this felt like the natural starting point.

🐛 𝗦𝘁𝗿𝗲𝗮𝗺 𝗼𝗳 𝗽𝗿𝗼𝗯𝗹𝗲𝗺𝘀
• Managing settings via a .env file was tricky – I hadn’t used it before, and I needed a reliable way to test different configurations.

📚 𝗪𝗵𝗮𝘁 𝗜’𝘃𝗲 𝗹𝗲𝗮𝗿𝗻𝗲𝗱
• Hands-on with pydantic for data validation and settings management
• Structuring Python packages effectively
• Parsing and mapping JSON into Python classes

🎯 𝗦𝘂𝗺𝗺𝗮𝗿𝘆
Tech recruiters & senior ML engineers: here’s day 1 of my journey – building the data producers that power a real-world ML pipeline (with 90% boilerplate by AI). 𝗜’𝗺 𝗲𝗺𝗯𝗿𝗮𝗰𝗶𝗻𝗴 𝘁𝗵𝗲 𝗲𝘃𝗼𝗹𝘃𝗶𝗻𝗴 𝗹𝗮𝗻𝗱𝘀𝗰𝗮𝗽𝗲 𝗳𝗼𝗿 𝘀𝗼𝗳𝘁𝘄𝗮𝗿𝗲 𝗲𝗻𝗴𝗶𝗻𝗲𝗲𝗿𝘀 𝗯𝘆 𝗽𝗮𝗿𝘁𝗻𝗲𝗿𝗶𝗻𝗴 𝘄𝗶𝘁𝗵 𝗮𝗻 𝗔𝗜 𝗧𝗲𝗮𝗺𝗺𝗮𝘁𝗲 – 𝗻𝗼 𝗺𝗼𝗿𝗲 𝗺𝗼𝗻𝗸𝗲𝘆 𝗰𝗼𝗱𝗶𝗻𝗴!

• Be always curious, dig deeper, and don’t blindly trust your AI Teammate!
• What’s not explored returns twice as strong.
• Write tests wherever you can!
• Don’t be afraid to refactor code — tests have your back.
• Technical debt: what we skip now strikes back double!

StellarHarvest Insight Engine predicts and visualizes earth+space weather threats for agriculture via streaming JSON+Kafka pipelines.

https://github.com/machinelearning-maverick/stellar-harvest-ie-producers


Day 2: Models

Continuing my 8-Day ML + MLOps Showcase Series (driven by my AI Teammate) – today I dive into how I structured my models to shape and persist data reliably. 🚀

🔧 𝗧𝗵𝗲 𝗰𝗼𝗱𝗲
• Pydantic DTOs (schemas) for all data sources
• SQLAlchemy ORM mappings (entities) with a single Base in entities/base.py

Role: define data shapes — both validation schemas and persistence entities

💭 𝗦𝘁𝗿𝗲𝗮𝗺 𝗼𝗳 𝘁𝗵𝗼𝘂𝗴𝗵𝘁𝘀
Based on past projects, I knew domain models would power downstream logic. I also wanted to keep stellar-harvest-ie-models decoupled so other modules could import without circular dependencies.

🐛 𝗦𝘁𝗿𝗲𝗮𝗺 𝗼𝗳 𝗽𝗿𝗼𝗯𝗹𝗲𝗺𝘀
Dependency management got tricky when installing non-editable builds. 𝗜 𝗽𝗮𝘂𝘀𝗲𝗱 𝗱𝗲𝘃𝗲𝗹𝗼𝗽𝗺𝗲𝗻𝘁 𝗳𝗼𝗿 𝘁𝘄𝗼 𝗱𝗮𝘆𝘀 𝘁𝗼 𝘀𝗲𝘁 𝘂𝗽 𝗮 𝗽𝗿𝗶𝘃𝗮𝘁𝗲 𝗗𝗲𝘃𝗽𝗶 𝗣𝘆𝗣𝗜 𝘀𝗲𝗿𝘃𝗲𝗿 𝘁𝗼 𝗵𝗼𝘀𝘁 𝗺𝘆 𝗽𝗮𝗰𝗸𝗮𝗴𝗲!

📚 𝗪𝗵𝗮𝘁 𝗜’𝘃𝗲 𝗹𝗲𝗮𝗿𝗻𝗲𝗱
• Building multi-module Python projects & packaging
• Configuring and using a private Devpi server
• Structuring domain models for reusability across modules

🎯 𝗦𝘂𝗺𝗺𝗮𝗿𝘆
Tech recruiters & senior ML engineers: here’s day 2 – defining robust data models that drive validation and persistence. 𝗜’𝗺 𝗲𝗺𝗯𝗿𝗮𝗰𝗶𝗻𝗴 𝘁𝗵𝗲 𝗲𝘃𝗼𝗹𝘃𝗶𝗻𝗴 𝗹𝗮𝗻𝗱𝘀𝗰𝗮𝗽𝗲 𝗳𝗼𝗿 𝘀𝗼𝗳𝘁𝘄𝗮𝗿𝗲 𝗲𝗻𝗴𝗶𝗻𝗲𝗲𝗿𝘀 𝗯𝘆 𝗽𝗮𝗿𝘁𝗻𝗲𝗿𝗶𝗻𝗴 𝘄𝗶𝘁𝗵 𝗮𝗻 𝗔𝗜 𝗧𝗲𝗮𝗺𝗺𝗮𝘁𝗲 – 𝗻𝗼 𝗺𝗼𝗿𝗲 𝗺𝗼𝗻𝗸𝗲𝘆 𝗰𝗼𝗱𝗶𝗻𝗴!

• Be always curious, dig deeper, and don’t blindly trust your AI Teammate!
• What’s not explored returns twice as strong.
• Write tests wherever you can!
• Don’t be afraid to refactor code – tests have your back.
• Technical debt: what we skip now strikes back double!

Project StellarHarvest Insight Engine predicts and visualizes earth+space weather threats for agriculture via streaming JSON -> Kafka pipelines using structured schemas and entities.

https://github.com/machinelearning-maverick/stellar-harvest-ie-models


Day 3: Config

Continuing my 8-Day ML + MLOps Showcase Series (driven by my AI Teammate) – today I’m centralizing configuration for cleaner, DRY modules. 🚀

🔧 𝗧𝗵𝗲 𝗰𝗼𝗱𝗲
• Shared constants (magic values) in constants.py
• Application-wide settings via Pydantic BaseSettings in config.py
• Logging decorators & a pytest plugin for single-point config

Role: central place for magic constants, shared settings, logging decorators, and test fixtures

💭 𝗦𝘁𝗿𝗲𝗮𝗺 𝗼𝗳 𝘁𝗵𝗼𝘂𝗴𝗵𝘁𝘀
I didn’t want to copy/paste the same code across all modules, and having consistent placeholders for magic values simplifies our future CI/CD pipelines (e.g. CircleCI).

🐛 𝗦𝘁𝗿𝗲𝗮𝗺 𝗼𝗳 𝗽𝗿𝗼𝗯𝗹𝗲𝗺𝘀
Publishing non-editable builds forced me to write a publish-module.sh script to automate packaging & uploading via Twine to my private Devpi server. Writing tests with monkeypatch and mocks also took some trial and error.

📚 𝗪𝗵𝗮𝘁 𝗜’𝘃𝗲 𝗹𝗲𝗮𝗿𝗻𝗲𝗱
• DRY in practice with Bash scripts for packaging
• Writing robust Python tests using monkeypatch & mock
• Streamlining module distribution via a private Devpi server

🎯 𝗦𝘂𝗺𝗺𝗮𝗿𝘆
Tech recruiters & machine learning engineers: here’s day 3 – centralizing shared configuration to power consistent, tested modules. 𝗜’𝗺 𝗲𝗺𝗯𝗿𝗮𝗰𝗶𝗻𝗴 𝘁𝗵𝗲 𝗲𝘃𝗼𝗹𝘃𝗶𝗻𝗴 𝗹𝗮𝗻𝗱𝘀𝗰𝗮𝗽𝗲 𝗳𝗼𝗿 𝘀𝗼𝗳𝘁𝘄𝗮𝗿𝗲 𝗲𝗻𝗴𝗶𝗻𝗲𝗲𝗿𝘀 𝗯𝘆 𝗽𝗮𝗿𝘁𝗻𝗲𝗿𝗶𝗻𝗴 𝘄𝗶𝘁𝗵 𝗮𝗻 𝗔𝗜 𝗧𝗲𝗮𝗺𝗺𝗮𝘁𝗲 – 𝗻𝗼 𝗺𝗼𝗿𝗲 𝗺𝗼𝗻𝗸𝗲𝘆 𝗰𝗼𝗱𝗶𝗻𝗴!

• Be always curious, dig deeper, and don’t blindly trust your AI Teammate!
• What’s not explored returns twice as strong.
• Write tests wherever you can!
• Don’t be afraid to refactor code – tests have your back.
• Technical debt: what we skip now strikes back double!

📌 𝗧𝗵𝗲 𝗽𝗿𝗼𝗷𝗲𝗰𝘁

𝗣𝗿𝗼𝗷𝗲𝗰𝘁 𝗦𝘁𝗲𝗹𝗹𝗮𝗿 𝗛𝗮𝗿𝘃𝗲𝘀𝘁 𝗜𝗻𝘀𝗶𝗴𝗵𝘁 𝗘𝗻𝗴𝗶𝗻𝗲 – predicts and visualizes the (earth, space) weather-related vulnerabilities for agriculture. It collects space weather data e.g. planetary K-index, which is used to characterize the magnitude of geomagnetic storms and earth agricultural data e.g. crop calendars for global agricultural production.

Project StellarHarvest Insight Engine predicts and visualizes earth+space weather threats for agriculture via streaming JSON -> Kafka pipelines, with each module evolving into a production-ready system.

https://github.com/machinelearning-maverick/stellar-harvest-ie-config


Day 4: Stream

Continuing my 8-Day ML + MLOps Showcase Series (driven by my AI Teammate) – today I dive into the stream module to separate streaming concerns and streamline CI/CD. 🚀

🔧 𝗧𝗵𝗲 𝗰𝗼𝗱𝗲
• Kafka client factories & stream-specific settings
• CLI modules to fetch/parse SWPC data and publish to Kafka (later pared back)
• Unit tests using pytest-mock for mocker.patch coverage

💭 𝗦𝘁𝗿𝗲𝗮𝗺 𝗼𝗳 𝘁𝗵𝗼𝘂𝗴𝗵𝘁𝘀
Separation of concerns was key: embedding Kafka logic in the producers module would prevent reuse in consumers. Isolating the stream layer lets me Dockerize Kafka setup once (in CI/CD) without accidental breakages whenever producers change.

🐛 𝗦𝘁𝗿𝗲𝗮𝗺 𝗼𝗳 𝗽𝗿𝗼𝗯𝗹𝗲𝗺𝘀
Managing inter-module dependencies was tricky, populating new stream dependencies without breaking existing code. Testing required trusting mocks for the Kafka stream, and I used kafdrop to verify messages in a real cluster.

📚 𝗪𝗵𝗮𝘁 𝗜’𝘃𝗲 𝗹𝗲𝗮𝗿𝗻𝗲𝗱
• Designing thin wrappers around Kafka producers & consumers
• Verifying real Kafka Messages with kafdrop
• Writing robust Python tests with monkeypatch & mock

🎯 𝗦𝘂𝗺𝗺𝗮𝗿𝘆
Tech recruiters & senior ML engineers: here’s day 4 – building a dedicated streaming layer for a resilient, modular pipeline. 𝗜’𝗺 𝗲𝗺𝗯𝗿𝗮𝗰𝗶𝗻𝗴 𝘁𝗵𝗲 𝗲𝘃𝗼𝗹𝘃𝗶𝗻𝗴 𝗹𝗮𝗻𝗱𝘀𝗰𝗮𝗽𝗲 𝗳𝗼𝗿 𝘀𝗼𝗳𝘁𝘄𝗮𝗿𝗲 𝗲𝗻𝗴𝗶𝗻𝗲𝗲𝗿𝘀 𝗯𝘆 𝗽𝗮𝗿𝘁𝗻𝗲𝗿𝗶𝗻𝗴 𝘄𝗶𝘁𝗵 𝗮𝗻 𝗔𝗜 𝗧𝗲𝗮𝗺𝗺𝗮𝘁𝗲 – 𝗻𝗼 𝗺𝗼𝗿𝗲 𝗺𝗼𝗻𝗸𝗲𝘆 𝗰𝗼𝗱𝗶𝗻𝗴!

• Be always curious, dig deeper, and don’t blindly trust your AI Teammate!
• What’s not explored returns twice as strong.
• Write tests wherever you can!
• Don’t be afraid to refactor code – tests have your back.
• Technical debt: what we skip now strikes back double!

📌 𝗧𝗵𝗲 𝗽𝗿𝗼𝗷𝗲𝗰𝘁

𝗣𝗿𝗼𝗷𝗲𝗰𝘁 𝗦𝘁𝗲𝗹𝗹𝗮𝗿 𝗛𝗮𝗿𝘃𝗲𝘀𝘁 𝗜𝗻𝘀𝗶𝗴𝗵𝘁 𝗘𝗻𝗴𝗶𝗻𝗲 – predicts and visualizes the (earth, space) weather-related vulnerabilities for agriculture. It collects space weather data e.g. planetary K-index, which is used to characterize the magnitude of geomagnetic storms and earth agricultural data e.g. crop calendars for global agricultural production.

StellarHarvest Insight Engine predicts and visualizes earth+space weather threats for agriculture via streaming JSON -> Kafka pipelines.

https://github.com/machinelearning-maverick/stellar-harvest-ie-stream


Day 5: Deployment

Continuing my 8-Day ML + MLOps Showcase Series (driven by my AI Teammate) – today I’m orchestrating infra and CI/CD with deployment. 🚀

🔧 𝗧𝗵𝗲 𝗰𝗼𝗱𝗲
• docker-compose.yml wiring Zookeeper, Kafka, Postgres, scheduler, consumers, UI
• Bootstrap scripts: create-topic.sh, bootstrap_db.py, Alembic migrations
• Single .env (git-ignored) for local dev; real env vars in CI/CD

Role: infra orchestration: ZK, Kafka, Postgres, migrations, bootstrap scripts

💭 𝗦𝘁𝗿𝗲𝗮𝗺 𝗼𝗳 𝘁𝗵𝗼𝘂𝗴𝗵𝘁𝘀
With producers, models, config, and stream in place, I needed to stop relying on “it should work” and wire everything up: fetch JSON, parse it, publish to Kafka, consume, and persist. Dockerizing the entire stack and integrating with CircleCI ensures reproducibility and scalable testing.

🐛 𝗦𝘁𝗿𝗲𝗮𝗺 𝗼𝗳 𝗽𝗿𝗼𝗯𝗹𝗲𝗺𝘀
Exposing credentials during image builds was a challenge. I enabled Docker BuildKit (DOCKER_BUILDKIT=1 – secret id=env, src=.env) to securely inject the .env file. This pattern became my template for secret management in CI/CD pipelines.

📚 𝗪𝗵𝗮𝘁 𝗜’𝘃𝗲 𝗹𝗲𝗮𝗿𝗻𝗲𝗱
• DRY Docker: multiple focused Dockerfiles + YAML anchors for build-args
• Secure builds with BuildKit secrets
• Central orchestration via docker-compose.yml for local & CI environments

🎯 𝗦𝘂𝗺𝗺𝗮𝗿𝘆
Tech recruiters & senior ML engineers: here’s day 5 – automating infra orchestration for seamless dev-to-production workflows. 𝗜’𝗺 𝗲𝗺𝗯𝗿𝗮𝗰𝗶𝗻𝗴 𝘁𝗵𝗲 𝗲𝘃𝗼𝗹𝘃𝗶𝗻𝗴 𝗹𝗮𝗻𝗱𝘀𝗰𝗮𝗽𝗲 𝗳𝗼𝗿 𝘀𝗼𝗳𝘁𝘄𝗮𝗿𝗲 𝗲𝗻𝗴𝗶𝗻𝗲𝗲𝗿𝘀 𝗯𝘆 𝗽𝗮𝗿𝘁𝗻𝗲𝗿𝗶𝗻𝗴 𝘄𝗶𝘁𝗵 𝗮𝗻 𝗔𝗜 𝗧𝗲𝗮𝗺𝗺𝗮𝘁𝗲 – 𝗻𝗼 𝗺𝗼𝗿𝗲 𝗺𝗼𝗻𝗸𝗲𝘆 𝗰𝗼𝗱𝗶𝗻𝗴!

• Be always curious, dig deeper, and don’t blindly trust your AI Teammate!
• What’s not explored returns twice as strong.
• Write tests wherever you can!
• Don’t be afraid to refactor code – tests have your back.
• Technical debt: what we skip now strikes back double!

📌 𝗧𝗵𝗲 𝗽𝗿𝗼𝗷𝗲𝗰𝘁

𝗣𝗿𝗼𝗷𝗲𝗰𝘁 𝗦𝘁𝗲𝗹𝗹𝗮𝗿 𝗛𝗮𝗿𝘃𝗲𝘀𝘁 𝗜𝗻𝘀𝗶𝗴𝗵𝘁 𝗘𝗻𝗴𝗶𝗻𝗲 – predicts and visualizes the (earth, space) weather-related vulnerabilities for agriculture. It collects space weather data e.g. planetary K-index, which is used to characterize the magnitude of geomagnetic storms and earth agricultural data e.g. crop calendars for global agricultural production.

StellarHarvest Insight Engine predicts and visualizes earth+space weather threats for agriculture via a fully containerized, CI/CD-driven microservices pipeline.

https://github.com/machinelearning-maverick/stellar-harvest-ie-deployment


Day 6: UI

Continuing my 8-Day ML + MLOps Showcase Series (driven by my AI Teammate) – today I’m crafting the UI layer to visualize insights and power user interaction. 🚀

🔧 𝗧𝗵𝗲 𝗰𝗼𝗱𝗲
• FastAPI + Jinja2 dashboard scaffold (routers, templates, static)
• Dockerfiles: Dockerfile.ui for production & Dockerfile.dev for local
• docker-compose.yml for local rapid iteration

Role: FastAPI + Jinja2 dashboard, real-time and REST API

💭 𝗦𝘁𝗿𝗲𝗮𝗺 𝗼𝗳 𝘁𝗵𝗼𝘂𝗴𝗵𝘁𝘀
After a solid back-end and CI/CD workflow, it was time for the “last part” – the front-end. With domain models and APIs in place, building the UI meant assembling pre-built blocks for real-time and REST API & web pages.

🐛 𝗦𝘁𝗿𝗲𝗮𝗺 𝗼𝗳 𝗽𝗿𝗼𝗯𝗹𝗲𝗺𝘀
Surprisingly smooth – initially, I created a FastAPI “starter app” with a single route to verify end-to-end containerization and accessibility in Docker.

📚 𝗪𝗵𝗮𝘁 𝗜’𝘃𝗲 𝗹𝗲𝗮𝗿𝗻𝗲𝗱
• Dockerizing FastAPI UI apps for both dev & prod
• Using docker-compose.yml for fast local iteration
• Integrating Jinja2 templates with FastAPI for dynamic pages

🎯 𝗦𝘂𝗺𝗺𝗮𝗿𝘆
Tech recruiters & machine learning engineers: here’s day 6 – bringing data to life with a real-time dashboard. 𝗜’𝗺 𝗲𝗺𝗯𝗿𝗮𝗰𝗶𝗻𝗴 𝘁𝗵𝗲 𝗲𝘃𝗼𝗹𝘃𝗶𝗻𝗴 𝗹𝗮𝗻𝗱𝘀𝗰𝗮𝗽𝗲 𝗳𝗼𝗿 𝘀𝗼𝗳𝘁𝘄𝗮𝗿𝗲 𝗲𝗻𝗴𝗶𝗻𝗲𝗲𝗿𝘀 𝗯𝘆 𝗽𝗮𝗿𝘁𝗻𝗲𝗿𝗶𝗻𝗴 𝘄𝗶𝘁𝗵 𝗮𝗻 𝗔𝗜 𝗧𝗲𝗮𝗺𝗺𝗮𝘁𝗲 – 𝗻𝗼 𝗺𝗼𝗿𝗲 𝗺𝗼𝗻𝗸𝗲𝘆 𝗰𝗼𝗱𝗶𝗻𝗴!

• Be always curious, dig deeper, and don’t blindly trust your AI Teammate!
• What’s not explored returns twice as strong.
• Write tests wherever you can!
• Don’t be afraid to refactor code – tests have your back.
• Technical debt: what we skip now strikes back double!

📌 𝗧𝗵𝗲 𝗽𝗿𝗼𝗷𝗲𝗰𝘁

𝗣𝗿𝗼𝗷𝗲𝗰𝘁 𝗦𝘁𝗲𝗹𝗹𝗮𝗿 𝗛𝗮𝗿𝘃𝗲𝘀𝘁 𝗜𝗻𝘀𝗶𝗴𝗵𝘁 𝗘𝗻𝗴𝗶𝗻𝗲 – predicts and visualizes the (earth, space) weather-related vulnerabilities for agriculture. It collects space weather data e.g. planetary K-index, which is used to characterize the magnitude of geomagnetic storms and earth agricultural data e.g. crop calendars for global agricultural production.

StellarHarvest Insight Engine predicts and visualizes earth+space weather threats for agriculture via a real-time FastAPI + Jinja2 dashboard and REST API.

https://github.com/machinelearning-maverick/stellar-harvest-ie-ui


Day 7: Consumers

Continuing my 8-Day ML + MLOps Showcase Series (driven by my AI Teammate) – today I’m focusing on the consumers module to handle streaming data, and preparing for persisting it. 🚀

🔧 𝗧𝗵𝗲 𝗰𝗼𝗱𝗲
• Async Kafka → Postgres consumer using AIOKafkaConsumer
• stream_parsers.py to normalize raw JSON into ORM kwargs
• Async unit tests with pytest-asyncio and AsyncMock
• Dockerfiles: Dockerfile.consumer & Dockerfile.dev + dev-compose.yml for rapid iteration

💭 𝗦𝘁𝗿𝗲𝗮𝗺 𝗼𝗳 𝘁𝗵𝗼𝘂𝗴𝗵𝘁𝘀
It was time to actually consume Kafka topic messages – not just inspect them. By leveraging stellar-harvest-ie-config, stellar-harvest-ie-models, and stellar-harvest-ie-store, this module makes the pipeline more resilient and customizable.

🐛 𝗦𝘁𝗿𝗲𝗮𝗺 𝗼𝗳 𝗽𝗿𝗼𝗯𝗹𝗲𝗺𝘀
Pydantic’s SettingsConfigDict bit me again! My limited familiarity led to unexpected breaks until I dug into its behavior.

📚 𝗪𝗵𝗮𝘁 𝗜’𝘃𝗲 𝗹𝗲𝗮𝗿𝗻𝗲𝗱
• Using AIOKafkaConsumer for async streaming
• Designing parser functions to map JSON into ORM entities
• Considering a dedicated “store” module for consumed data

🎯 𝗦𝘂𝗺𝗺𝗮𝗿𝘆
Tech recruiters & senior ML engineers: here’s day 7 – building robust Kafka consumers that drive data persistence. 𝗜’𝗺 𝗲𝗺𝗯𝗿𝗮𝗰𝗶𝗻𝗴 𝘁𝗵𝗲 𝗲𝘃𝗼𝗹𝘃𝗶𝗻𝗴 𝗹𝗮𝗻𝗱𝘀𝗰𝗮𝗽𝗲 𝗳𝗼𝗿 𝘀𝗼𝗳𝘁𝘄𝗮𝗿𝗲 𝗲𝗻𝗴𝗶𝗻𝗲𝗲𝗿𝘀 𝗯𝘆 𝗽𝗮𝗿𝘁𝗻𝗲𝗿𝗶𝗻𝗴 𝘄𝗶𝘁𝗵 𝗮𝗻 𝗔𝗜 𝗧𝗲𝗮𝗺𝗺𝗮𝘁𝗲 – 𝗻𝗼 𝗺𝗼𝗿𝗲 𝗺𝗼𝗻𝗸𝗲𝘆 𝗰𝗼𝗱𝗶𝗻𝗴!

• Be always curious, dig deeper, and don’t blindly trust your AI Teammate!
• What’s not explored returns twice as strong.
• Write tests wherever you can!
• Don’t be afraid to refactor code – tests have your back.
• Technical debt: what we skip now strikes back double!

📌 𝗧𝗵𝗲 𝗽𝗿𝗼𝗷𝗲𝗰𝘁

𝗣𝗿𝗼𝗷𝗲𝗰𝘁 𝗦𝘁𝗲𝗹𝗹𝗮𝗿 𝗛𝗮𝗿𝘃𝗲𝘀𝘁 𝗜𝗻𝘀𝗶𝗴𝗵𝘁 𝗘𝗻𝗴𝗶𝗻𝗲 – predicts and visualizes the (earth, space) weather-related vulnerabilities for agriculture. It collects space weather data e.g. planetary K-index, which is used to characterize the magnitude of geomagnetic storms and earth agricultural data e.g. crop calendars for global agricultural production.

StellarHarvest Insight Engine predicts and visualizes earth+space weather threats for agriculture via streaming JSON -> Kafka pipelines with modular ingestion, modeling, and persistence.

https://github.com/machinelearning-maverick/stellar-harvest-ie-consumers


Day 8: Store

Wrapping up my 8-Day ML + MLOps Showcase Series (driven by my AI Teammate) – today is the final coding day, building the store module for persistence. 🚀

🔧 𝗧𝗵𝗲 𝗰𝗼𝗱𝗲
• db.py with get_engine() and get_session_factory()
• init_db() to run Base.metadata.create_all() on demand

💭 𝗦𝘁𝗿𝗲𝗮𝗺 𝗼𝗳 𝘁𝗵𝗼𝘂𝗴𝗵𝘁𝘀
It was a natural step: Kafka streams high-throughput data but fetching from a database is essential for dashboards. This module centralizes persistence for all prior data flows.

🐛 𝗦𝘁𝗿𝗲𝗮𝗺 𝗼𝗳 𝗽𝗿𝗼𝗯𝗹𝗲𝗺𝘀
As a Python async newcomer, I grappled with non-blocking I/O and proper session management to keep writes multitasking and efficient.

📚 𝗪𝗵𝗮𝘁 𝗜’𝘃𝗲 𝗹𝗲𝗮𝗿𝗻𝗲𝗱
• Building async persistence layers with SQLAlchemy
• Initializing and migrating schemas dynamically
• Testing async database interactions with pytest_asyncio

🎯 𝗦𝘂𝗺𝗺𝗮𝗿𝘆
Tech recruiters & senior ML engineers: here’s day 8 – creating a robust persistence layer that completes my pipeline. 𝗜’𝗺 𝗲𝗺𝗯𝗿𝗮𝗰𝗶𝗻𝗴 𝘁𝗵𝗲 𝗲𝘃𝗼𝗹𝘃𝗶𝗻𝗴 𝗹𝗮𝗻𝗱𝘀𝗰𝗮𝗽𝗲 𝗳𝗼𝗿 𝘀𝗼𝗳𝘁𝘄𝗮𝗿𝗲 𝗲𝗻𝗴𝗶𝗻𝗲𝗲𝗿𝘀 𝗯𝘆 𝗽𝗮𝗿𝘁𝗻𝗲𝗿𝗶𝗻𝗴 𝘄𝗶𝘁𝗵 𝗮𝗻 𝗔𝗜 𝗧𝗲𝗮𝗺𝗺𝗮𝘁𝗲 – 𝗻𝗼 𝗺𝗼𝗿𝗲 𝗺𝗼𝗻𝗸𝗲𝘆 𝗰𝗼𝗱𝗶𝗻𝗴!

• Be always curious, dig deeper, and don’t blindly trust your AI Teammate!
• What’s not explored returns twice as strong.
• Write tests wherever you can!
• Don’t be afraid to refactor code – tests have your back.
• Technical debt: what we skip now strikes back double!

📌 𝗧𝗵𝗲 𝗽𝗿𝗼𝗷𝗲𝗰𝘁

𝗣𝗿𝗼𝗷𝗲𝗰𝘁 𝗦𝘁𝗲𝗹𝗹𝗮𝗿 𝗛𝗮𝗿𝘃𝗲𝘀𝘁 𝗜𝗻𝘀𝗶𝗴𝗵𝘁 𝗘𝗻𝗴𝗶𝗻𝗲 – predicts and visualizes the (earth, space) weather-related vulnerabilities for agriculture. It collects space weather data e.g. planetary K-index, which is used to characterize the magnitude of geomagnetic storms and earth agricultural data e.g. crop calendars for global agricultural production.

StellarHarvest Insight Engine predicts and visualizes earth+space weather threats for agriculture via streaming JSON -> Kafka with persistent storage and real-time dashboards.

https://github.com/machinelearning-maverick/stellar-harvest-ie-store


Day 10: Core ML Module with MLOps

Introducing ml-stellar: Core ML Module with MLOps – Game Changer Alert! Continuing my 8-Day ML + MLOps Showcase Series (driven by my AI Teammate) – today is Day 10. 🔥


After laying down a rock-solid, modular architecture design and implementation, it was time to add the MLOps layer. I finally unlocked the heart of StellarHarvest Insight Engine: the stellar-harvest-ie-ml-stellar module. This is where raw data transforms into actionable predictions.

🚀 𝙒𝙝𝙮 𝙄𝙩 𝙈𝙖𝙩𝙩𝙚𝙧𝙨
• 𝗙𝗿𝗼𝗺 𝗡𝗼𝘁𝗲𝗯𝗼𝗼𝗸 𝘁𝗼 𝗣𝗿𝗼𝗱𝘂𝗰𝘁𝗶𝗼𝗻: I went from a single Jupyter Notebook to a fully refactored codebase. No more ad-hoc scripts – this is repeatable, testable, and scalable.
• 𝗦𝗲𝗮𝗺𝗹𝗲𝘀𝘀 𝗪𝗼𝗿𝗸𝗳𝗹𝗼𝘄𝘀: Separate folders for data ingestion, feature engineering, training pipelines, inference engines, and utility scripts mean each step is isolated and maintainable.
• 𝗩𝗲𝗿𝘀𝗶𝗼𝗻𝗲𝗱 𝗘𝘅𝗰𝗲𝗹𝗹𝗲𝗻𝗰𝗲: Every model, every feature set, every configuration is versioned. Rollbacks? Comparisons? Easy.
• 𝗔𝘂𝘁𝗼𝗺𝗮𝘁𝗲𝗱 𝗢𝗿𝗰𝗵𝗲𝘀𝘁𝗿𝗮𝘁𝗶𝗼𝗻: Training & inference pipelines kick off with one command, thanks to our MLOps scaffolding – no more manual steps or forgotten parameters.

🔧 𝗧𝗵𝗲 𝗰𝗼𝗱𝗲
After prototyping in classification_geomagnetic_storm_intensity.ipynb, I refactored into these production modules:
• notebooks/ – EDA & prototyping
• scripts/ – entry-points for training & inference
• data/ & features/ – ingestion & feature engineering
• models/classification/ & models/regression/ – each with train.py, evaluate.py, predict.py, validate.py + config.yml
• inference/ – production scoring
• pipelines/ – orchestrating end-to-end workflows
• utils/ – helpers & CI validation

🎯 𝗦𝘂𝗺𝗺𝗮𝗿𝘆
Tech recruiters & senior ML engineers: here’s Day 10 – the beating heart of StellarHarvest Insight Engine, where production-grade model training, versioning, and inference come together. Thanks to my upfront architecture, adding MLOps was seamless.
• Be always curious, dig deeper, and don’t blindly trust your AI Teammate!
• What’s not explored returns twice as strong.
• Write tests wherever you can!
• Don’t be afraid to refactor code – tests have your back.
• Technical debt: what we skip now strikes back double!

📌 𝗧𝗵𝗲 𝗽𝗿𝗼𝗷𝗲𝗰𝘁

𝗣𝗿𝗼𝗷𝗲𝗰𝘁 𝗦𝘁𝗲𝗹𝗹𝗮𝗿 𝗛𝗮𝗿𝘃𝗲𝘀𝘁 𝗜𝗻𝘀𝗶𝗴𝗵𝘁 𝗘𝗻𝗴𝗶𝗻𝗲 – predicts and visualizes the (earth, space) weather-related vulnerabilities for agriculture. It collects space weather data e.g. planetary K-index, which is used to characterize the magnitude of geomagnetic storms and earth agricultural data e.g. crop calendars for global agricultural production.

https://github.com/machinelearning-maverick/stellar-harvest-ie-ml-stellar


Summary – My 8-Day ML + MLOps Showcase Series

I’m actively seeking my first role as an MLOps and/or Machine Learning Engineer – let’s connect! If you’re a recruiter or senior ML/MLOps engineer looking for a self-taught, AI-Savvy Teammate, let’s chat! 🚀

🎬 𝗜𝗻𝘁𝗿𝗼𝗱𝘂𝗰𝘁𝗶𝗼𝗻

Over the past 8 weeks, I’ve been steadily building StellarHarvest Insight Engine – and in this 8-Day ML + MLOps Showcase Series on LinkedIn, I’ve simply been sharing snapshots of my in-progress work: ingesting data, streaming via Kafka, model & validate data, central config, orchestrating infra, exposing real-time dashboards, and persist results – all with 90% of boilerplate generated by my AI Teammate and as a self-thought guy.

🔑 𝗛𝗶𝗴𝗵𝗹𝗶𝗴𝗵𝘁𝘀

𝗣𝗿𝗼𝗱𝘂𝗰𝗲𝗿𝘀 🔄 JSON -> Kafka pipelines with Pydantic for data validation
𝗠𝗼𝗱𝗲𝗹𝘀 📐 Reusable Pydantic DTOs & SQLAlchemy entities for cross-module use
𝗖𝗼𝗻𝗳𝗶𝗴 ⚙️ DRY, centralized settings via Pydantic’s BaseSettings & pytest fixtures
𝗦𝘁𝗿𝗲𝗮𝗺 🌊 Thin Kafka client wrappers, tested with pytest-mock, decoupling producers & consumers
𝗗𝗲𝗽𝗹𝗼𝘆𝗺𝗲𝗻𝘁 🐳 Multi-service Docker Compose & BuildKit secrets for secure, CI/CD orchestration
𝗨𝗜 🖥️ FastAPI + Jinja2 dashboard & REST endpoints, dockerized for dev & prod
𝗖𝗼𝗻𝘀𝘂𝗺𝗲𝗿𝘀 📥 Async Kafka consumers using AIOKafkaConsumer, parsing JSON into ORM payloads
𝗦𝘁𝗼𝗿𝗲 💾 Async SQLAlchemy persistence layer with on-demand init_db() and session management

💡 𝗞𝗲𝘆 𝗧𝗮𝗸𝗲𝗮𝘄𝗮𝘆𝘀

𝗘𝗺𝗯𝗿𝗮𝗰𝗲 𝗔𝗜: Leverage my AI Teammate for boilerplate so I can focus on architecture and edge cases. Double-check what was generated by AI.
𝗧𝗲𝘀𝘁 𝗘𝗮𝗿𝗹𝘆: Unit & async tests gave me the confidence to refactor and iterate rapidly.
𝗗𝗥𝗬 𝗘𝘃𝗲𝗿𝘆𝘁𝗵𝗶𝗻𝗴: From Bash packaging scripts to shared config to avoid copy/paste.
𝗦𝗲𝗰𝘂𝗿𝗲 𝗯𝘆 𝗗𝗲𝘀𝗶𝗴𝗻: Use BuildKit secrets and a private PyPI for safe credentials and dependencies.
𝗠𝗼𝗱𝘂𝗹𝗮𝗿𝗶𝘇𝗲: Clear separation of concerns makes each component reusable and maintainable.

📋 𝗪𝗵𝗮𝘁 𝘁𝗵𝗲 𝗽𝗿𝗼𝗷𝗲𝗰𝘁 𝘄𝗶𝗹𝗹 𝗱𝗼
• Fetch & parse data from external sources (JSON)
• Put data into Kafka stream using producer
• Pull data from Kafka stream using consumer
• Extract features for the machine learning model
• Train ML model
• Manage versioning of ML models and features
• Store training and predicted data in a data lake (PostgreSQL)
• Provide UI dashboard and REST API with FastAPI
• Combine & visualize data from multiple sources

🚀 𝗡𝗲𝘅𝘁 𝗦𝘁𝗲𝗽𝘀
I’ll continue refining this pipeline – adding features, hardening security, and expanding monitoring. If you’re a recruiter or senior ML/MLOps engineer looking for a self-taught, AI-Savvy Teammate, let’s chat!

📌 𝗧𝗵𝗲 𝗣𝗿𝗼𝗷𝗲𝗰𝘁

Predicts and visualizes the (earth, space) weather-related vulnerabilities for agriculture. It collects space weather data e.g. planetary K-index, which is used to characterize the magnitude of geomagnetic storms and earth agricultural data e.g. crop calendars for global agricultural production.


MachineLearning #MLOps #AIteammate #SelfTaughtDeveloper #Pydantic #SQLAlchemy #Python #Devpi #Kafka #Docker #CircleCI #FastAPI #TechRecruitment #Streaming #pytest #DevOps #Kubernetes #Jinja2 #AsyncIO #LookingForJob #OpenToWork #Hiring

Leave a Reply

Your email address will not be published. Required fields are marked *

ml-maverick

Hi, I’m Jacek. 𝗔𝗜-𝗠𝗶𝗻𝗱𝗲𝗱 𝗚𝘂𝘆 – I work with and teach about machine learning – self-taught. I’m interested in machine learning from the technical and mathematical perspective. 𝗠𝗲𝗻𝘁𝗼𝗿, 𝗧𝗿𝗮𝗶𝗻𝗲𝗿 𝗳𝗼𝗿 𝗦𝗼𝗳𝘁𝘄𝗮𝗿𝗲 𝗗𝗲𝘃𝗲𝗹𝗼𝗽𝗲𝗿𝘀 – Helping others to change their current occupation to Junior Java Developer. I hope you will find something interesting on my blog.

RECENT POST


RECENT COMMENT