coding
Registration Open
Solo only.
Build a Python ML Pipeline with Docker - Week of 12 Oct 2026
Create a complete machine learning pipeline in Python that trains a classification model, validates it with pytest, and packages it in a Docker container. This entry-level challenge exercises Version Control, Programming Fundamentals, Debugging & Troubleshooting, AI Assisted Software Development, Containerization (Docker), and Package & Dependency Management.
For AI Engineer
Key dates
Registration opens
12 Oct 2026, 12:00 am
Registration closes
17 Oct 2026, 12:00 am
Starts
17 Oct 2026, 12:00 am
Ends
19 Oct 2026, 12:00 am
Judging ends
21 Oct 2026, 12:00 am
Before you join
- Prerequisites: review the target audience, skills covered, and challenge brief.
- Deadlines: check the key dates and complete required submissions before the challenge deadline.
- Participation: Solo only.
- Evaluation: review the brief and FAQs for scoring criteria and how your work will be assessed.
- AI assistance: check this challenge's rules before using AI tools. If the rules are unclear, ask support before submitting.
Questions? Contact SahkaarX support.
Problem definition
You are building a machine learning service for a startup that needs to classify customer churn risk. Input data (download): https://raw.githubusercontent.com/IBM/telco-customer-churn-on-icp4d/master/data/Telco-Customer-Churn.csv. The dataset contains columns such as tenure, MonthlyCharges, Contract, Churn, TotalCharges, and InternetService. Your task is to write a Python 3 application that loads this CSV, preprocesses the data (handle missing values, encode categorical features), trains a logistic regression or random forest classifier, evaluates it with standard metrics (accuracy, precision, recall, F1), and packages the entire pipeline in a Docker container for reproducible deployment. The pipeline must include unit tests using pytest to verify data loading, preprocessing, and model prediction logic. You will use git for version control, manage dependencies with pip and a requirements.txt file, and debug any issues that arise during development. Out of scope: web UI, API endpoints, hyperparameter tuning beyond basic defaults, and production monitoring. Every line under Success criteria is in scope for this challenge. Evaluation considers all of those topics, so your code should demonstrate as many skills and topics as possible.
Task brief
Build a Python 3 machine learning pipeline that ingests the Telco churn CSV, preprocesses features, trains a classifier, and validates predictions with pytest. Package the entire application in a Docker container using a Dockerfile and docker-compose.yml. Demonstrate Version Control by committing regularly to git, manage dependencies with requirements.txt, debug and fix issues systematically, use AI tools to accelerate development, and ensure the container runs end-to-end without manual setup.
Version Control
Version Control enables you to track all changes to the churn classification pipeline code, collaborate safely with branching and merging, and maintain a clean history of commits that document the evolution from prototype to containerized application. You will initialize a git repository, commit your Python code and Dockerfile incrementally, manage feature branches for different pipeline components, and resolve any merge conflicts that arise when integrating preprocessing and model training logic.
Programming Fundamentals
Programming Fundamentals teaches you to write clean, readable Python code that forms the foundation of the churn classification pipeline. You will use variables, operators, control flow, and functions to load CSV data, preprocess features, train a model, and evaluate results. This skill ensures every line of your application is correct, maintainable, and testable.
Debugging & Troubleshooting
Debugging & Troubleshooting teaches you to identify and fix errors in the churn classification pipeline. You will use logging, breakpoints, and stack trace analysis to diagnose issues in data loading, preprocessing, model training, and Docker execution, ensuring the pipeline runs reliably end-to-end.
Ai Assisted Software Development
AI Assisted Software Development teaches you to leverage AI tools (such as ChatGPT, GitHub Copilot, or Claude) to accelerate the churn-risk pipeline build. You will use AI to generate boilerplate code, debug runtime errors, refactor for clarity, write unit tests, and document the application—while validating outputs and recognizing AI limitations. This skill demonstrates how to work effectively with AI assistants in a real, time-constrained delivery scenario.
Containerization (Docker)
Containerization (Docker) packages the churn classification pipeline into a reproducible, portable Docker image so the ops team can run the model consistently on any machine without local Python setup. You will write a Dockerfile that installs dependencies, copies the application code, and defines the entry point to train and evaluate the model, then build and run the container to verify the pipeline executes end-to-end.
Package & Dependency Management
Package & Dependency Management ensures the churn classification pipeline declares all Python dependencies explicitly, pins versions for reproducibility, and validates that the Docker container and local development environment use consistent, secure packages. You will create a requirements.txt file, manage transitive dependencies, and verify that all third-party libraries (scikit-learn, pandas, pytest, etc.) are correctly specified and locked so the ops team can rebuild the exact same environment on any machine.
Language and stack
Python 3, scikit-learn, pandas, pytest, Docker, pip, git.
Scenario
Your startup has a customer retention team that needs a reproducible way to score churn risk on new customer batches. Currently, the data scientist runs notebooks locally, making it hard for the ops team to rerun the model consistently. You are tasked with converting the prototype into a containerized Python application that the ops team can run on any machine with Docker installed. The deadline is tight: you have one day to deliver a working pipeline with tests and a Dockerfile so the team can deploy it by end of week.
Deliverables
- A Python package with modules for data loading, preprocessing, model training, and prediction; unit tests using pytest covering at least data loading and prediction logic.
- A Dockerfile and docker-compose.yml that build and run the pipeline in an isolated container; a requirements.txt file listing all dependencies.
- A git repository with clear commit history showing iterative development, debugging steps, and final working code.
Success criteria
AI evaluation scores every topic bullet below. Aim to demonstrate as many of these skills and topics as possible in your repository.
Version Control
- Repository Setup (beginner): A git repository is initialized in the project root with a .gitignore file that excludes pycache, *.pyc, .pytest_cache, venv, and the downloaded CSV data file.
- Basic Commands (beginner): The learner repo contains at least five commits with clear, descriptive messages documenting key milestones such as initial project structure, data loading module, preprocessing logic, model training, and Dockerfile addition.
- Commits (beginner): Each commit in the repo history addresses a single logical unit of work, such as adding the data loader, implementing preprocessing, or writing unit tests, with no commits that mix unrelated changes.
- Branching (beginner): The repo contains at least two feature branches created from main, such as feature/data-preprocessing and feature/model-training, that are later merged back into main.
- Merging (beginner): All feature branches are successfully merged into main without leaving the repo in a broken state; the final main branch contains all pipeline components and passes all tests.
- Conflict Resolution (intermediate): When two branches modify overlapping code sections, the learner manually resolves merge conflicts by editing the conflicted files, choosing the correct logic, and completing the merge with a clear resolution commit message.
- Pull Requests (intermediate): The repo demonstrates a pull request workflow where at least one feature branch is pushed to a remote, a pull request is opened with a description of changes, and the branch is merged via the pull request interface after verification that tests pass.
Programming Fundamentals
- Variables & Data Types (beginner): The main.py script declares and uses variables for dataset paths, model parameters, and prediction outputs with appropriate types (str, int, float, list, dict).
- Operators (beginner): The preprocessing module uses arithmetic operators (+, -, *, /) to normalize numerical features and comparison operators (==, !=, <, >) to filter or validate data rows.
- Expressions (beginner): The model evaluation code constructs expressions that compute accuracy, precision, recall, and F1 score from confusion matrix values.
- Control Flow (beginner): The data loading function includes if-else blocks to handle missing values and for loops to iterate over rows or columns during preprocessing.
- Functions & Methods (beginner): The codebase defines at least three functions (load_data, preprocess, train_model, evaluate) that each perform a single responsibility and are called in sequence in main.
- Collections (intermediate): The preprocessing module uses lists and dictionaries to store feature names, encoded categorical mappings, and model predictions; pandas DataFrames are used correctly to filter, group, and transform data.
- Exception Handling (intermediate): The data loading and model training functions include try-except blocks that catch FileNotFoundError, ValueError, and other exceptions, log errors clearly, and allow the pipeline to fail gracefully with informative messages.
- File Handling (beginner): The main script opens and reads the CSV file using context managers (with statement) and writes model artifacts (pickle or joblib) and test results to disk without resource leaks.
Debugging & Troubleshooting
- Breakpoints (beginner): The learner repo includes a debug script or test file that sets at least one pdb breakpoint in the preprocessing or model training logic and documents how to invoke it.
- Debugging Techniques (beginner): The learner repo demonstrates at least two distinct debugging approaches (e.g., print statements, assertions, or pdb inspection) applied to catch a real or simulated bug in data loading or feature encoding.
- Logging (beginner): The learner repo includes a logging configuration that captures INFO and ERROR level messages to both console and a log file, with at least three strategic log statements in the pipeline (data load, preprocessing, model evaluation).
- Stack Traces (intermediate): The learner repo includes a test or script that intentionally triggers an exception (e.g., missing column, type mismatch), captures the full stack trace, and documents the root cause and fix in a comment or README section.
- Root Cause Analysis (intermediate): The learner repo includes a documented example (in code comments or a troubleshooting guide) that traces a realistic failure scenario (e.g., categorical encoding mismatch, Docker volume mount error) back to its source and shows the corrective action taken.
Ai Assisted Software Development
- Working with AI Assistants (beginner): Learner repo contains a README or commit messages showing at least three distinct prompts to an AI tool (e.g., code generation, debugging, or test writing) with evidence of iterative refinement.
- Prompt Writing Fundamentals (beginner): Learner repo includes a PROMPTS.md file or commit history showing at least two well-structured prompts that specify context, task, and expected output format for the churn pipeline.
- Code Generation (beginner): Learner repo contains Python modules (e.g., data_loader.py, preprocessor.py, model.py) with inline comments or git log entries indicating AI-generated code blocks that were reviewed and integrated.
- AI-assisted Debugging (beginner): Learner repo includes a DEBUG_LOG.md or commit messages documenting at least one runtime error (e.g., missing dependency, CSV parsing failure, model prediction shape mismatch) resolved with AI assistance.
- AI-assisted Refactoring (intermediate): Learner repo shows refactored code (e.g., extracted functions, reduced duplication, improved naming) with commit messages or a REFACTORING.md explaining how AI suggestions improved readability and maintainability of the pipeline.
- AI-assisted Unit Testing (intermediate): Learner repo contains a tests/ directory with pytest test files (test_data_loader.py, test_preprocessor.py, test_model.py) where AI generated test cases, and all tests pass with >80% code coverage.
- AI-assisted Documentation (beginner): Learner repo includes docstrings in Python modules and a comprehensive README.md generated or refined with AI assistance, covering setup, usage, and pipeline architecture.
- AI Output Validation (intermediate): Learner repo contains validation logic (e.g., data shape assertions, model metric sanity checks) and a VALIDATION.md documenting how AI-generated code was tested against expected outputs before merge.
- AI Limitations & Hallucinations (beginner): Learner repo includes a LIMITATIONS.md or commit notes identifying at least two instances where AI output was incorrect or incomplete, and how the learner corrected or rejected it.
- Responsible AI Usage (beginner): Learner repo contains a RESPONSIBLE_AI.md or section in README acknowledging data privacy (customer churn data sensitivity), model bias risks, and ethical considerations for churn prediction in production.
Containerization (Docker)
- What is Containerization (beginner): Repository includes a Dockerfile that encapsulates the Python application, dependencies, and model pipeline so the container runs identically on any Docker-enabled machine.
- Docker Architecture (beginner): Dockerfile uses a base image (e.g., python:3.9-slim) and follows layering best practices to separate dependency installation from application code.
- Docker Images (beginner): Repository demonstrates building a Docker image via docker build command with a tag (e.g., churn-classifier:latest) that is documented in README or a build script.
- Docker Containers (beginner): Repository includes evidence (e.g., docker run output, test logs) that the container successfully runs the churn pipeline, loads data, trains the model, and outputs evaluation metrics.
- Dockerfile Basics (beginner): Dockerfile includes FROM, COPY, RUN, WORKDIR, and CMD or ENTRYPOINT instructions to set up the environment and define the container entry point.
- Building Images (beginner): Repository includes a script or documented command to build the Docker image; the build completes without errors and produces a runnable image.
- Running Containers (beginner): Repository demonstrates running the container with docker run, passing any required arguments (e.g., input CSV path, output directory), and capturing model output or logs.
- Environment Variables (beginner): Dockerfile or docker run command uses ENV or -e flags to pass configuration (e.g., MODEL_TYPE=logistic_regression, DATA_PATH=/data/churn.csv) into the container.
- Docker Volumes (beginner): Dockerfile or run documentation shows mounting a host directory as a volume (e.g., -v /local/data:/data) so the container can read input data and write model artifacts.
- Docker Networks (beginner): If multiple containers are used (e.g., for testing or data services), repository includes docker network setup or docker-compose configuration to enable inter-container communication.
- Docker Compose (intermediate): Repository includes a docker-compose.yml file that defines the churn pipeline service with build context, volumes, environment variables, and any supporting services; docker-compose up successfully runs the full pipeline.
- Container Debugging (intermediate): Repository includes debugging evidence such as docker logs output, docker exec commands to inspect running containers, or a documented troubleshooting section showing how to diagnose container failures (e.g., missing dependencies, data not found, model training errors).
Package & Dependency Management
- Package Managers Overview (beginner): requirements.txt file exists at the root of the learner repo and lists all direct dependencies (pandas, scikit-learn, pytest, requests) with no comments or extraneous text.
- Semantic Versioning (beginner): Each dependency in requirements.txt uses semantic versioning format (e.g., scikit-learn==1.3.2 or pandas>=1.5.0,<2.0.0) rather than unversioned or wildcard entries.
- Version Constraints (intermediate): requirements.txt uses appropriate constraint operators (==, >=, <=, ~=) such that scikit-learn and pandas are pinned to specific minor versions to prevent breaking changes while allowing patch updates.
- Installing Dependencies (beginner): A Dockerfile or setup documentation shows pip install -r requirements.txt executed successfully, and the Docker image builds without dependency resolution errors.
- Dependency Lock Files (intermediate): A requirements.lock or pip freeze output file is committed to the learner repo, capturing exact transitive dependency versions (e.g., numpy, scipy, joblib) so rebuilds are bit-for-bit reproducible.
- Updating Dependencies (intermediate): The learner repo includes a documented process (e.g., a comment or script) showing how to safely update dependencies, such as running pip install --upgrade -r requirements.txt and re-locking the file.
- Transitive Dependencies (intermediate): The learner repo demonstrates awareness of transitive dependencies by documenting or pinning indirect packages (e.g., numpy and scipy required by scikit-learn) in the lock file or requirements.txt.
- Private Package Repositories (beginner): If any internal or private packages are used, the requirements.txt or Dockerfile includes a comment or index-url configuration showing how to authenticate to a private PyPI repository.
- Publishing Packages (beginner): The learner repo includes a setup.py or pyproject.toml file that defines the churn classifier as a package with name, version, and dependencies, even if not published to PyPI.
- Dependency Security & Vulnerability Scanning (intermediate): The learner repo includes a security check (e.g., a GitHub Actions workflow, a bandit or safety scan, or a documented manual audit) that flags known vulnerabilities in pinned dependencies before deployment.
- License Management (beginner): The learner repo includes a LICENSE file and a comment or document listing the licenses of key dependencies (e.g., scikit-learn is BSD, pandas is BSD) to ensure compliance.
- Dependency Best Practices (intermediate): The learner repo separates development dependencies (pytest, black, flake8) from production dependencies in a requirements-dev.txt file, and the Dockerfile installs only production dependencies to minimize image size.
How to submit
- Before you start, register on SahkaarX and connect your GitHub account via the app.
- When the challenge begins, SahkaarX will create a private GitHub repository under your account and notify you in the app with a clone URL.
- Clone the repository, implement your Python pipeline, write tests, create the Dockerfile, and commit your work regularly using git.
- Push all commits to the private repository and submit your work in the app using the system-created repo link.
What happens after you submit
When the challenge window closes, an automated AI system will review your repository for code quality, test coverage, Docker configuration, and adherence to the skill topics. You will then complete a mandatory in-app conversation where you explain your pipeline design, how you handled data preprocessing, what tests you wrote, and how your Docker setup ensures reproducibility. This conversation verifies your understanding of the work; it is not a quiz. After the conversation, results are finalized automatically.
Intellectual property
You retain full ownership of the code and design in your submission. SahkaarX may host, evaluate, and display your repository on leaderboards and in challenge galleries. Your GitHub repository remains private under your account; only you and SahkaarX evaluators can access it during and after the challenge.
FAQ
Who can join this challenge?
Entry-level AI engineers and data engineers with basic Python knowledge. Solo participation only; teams are not allowed.
Do I need to create my own GitHub repository?
No. SahkaarX creates a private repository for you when the challenge starts. You clone that repo, implement your code, and push to it.
When does evaluation happen?
Evaluation begins after the challenge window closes. An AI system reviews your code, then you complete a mandatory in-app conversation to discuss your implementation.
What is the mandatory conversation after submission?
A structured discussion where you explain your pipeline, preprocessing choices, test strategy, and Docker setup. It verifies you understand your own code; it is not a written quiz.