coding
Registration Open
Solo only.
Build a Customer Churn Prediction Pipeline - Week of 12 Oct 2026
Build an end-to-end machine learning pipeline in Python that predicts customer churn using the Telco dataset. You will manage dependencies, version control your work, query and prepare data with SQL and pandas, train a classification model, and document your process in a Git repository.
For Data Scientist
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
Input data (download): https://raw.githubusercontent.com/IBM/telco-customer-churn-on-icp4d/master/data/Telco-Customer-Churn.csv
You are given a Telco customer dataset with columns including tenure, MonthlyCharges, Contract, Churn, TotalCharges, and InternetService. Your task is to build a reproducible machine learning pipeline that predicts whether a customer will churn (leave the service). The pipeline must load data, perform exploratory analysis, engineer features, train a classifier, and evaluate performance. You will use Python 3, pytest for testing, scikit-learn for modeling, and Git for version control. The deliverable is a working codebase with clear structure, dependency management via requirements.txt, and passing unit tests.
Out of scope: UI dashboards, real-time serving infrastructure, hyperparameter tuning beyond basic grid search, and production deployment.
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
Design and implement a churn prediction pipeline using Python 3 and scikit-learn. Your work must demonstrate Version Control (Git commits and branch discipline), SQL (data extraction and filtering queries), Python Programming (clean, modular code with functions and classes), and Package & Dependency Management (requirements.txt and virtual environment setup). Load the Telco CSV, explore the data, prepare features, train a logistic regression or tree-based classifier, and validate with train-test split and cross-validation. Write pytest tests for data loading, feature engineering, and model prediction. Commit your work regularly to Git and push to the provided private repository.
Version Control
Version Control ensures the churn prediction pipeline is tracked, collaborative, and reproducible. You will initialize a Git repository, commit code changes with clear messages, create feature branches for isolated work, merge changes safely, and use pull requests to review code before integration.
SQL
SQL is used in this product to query and aggregate the Telco customer dataset from a relational database, enabling the data scientist to extract features, validate data quality, and prepare subsets for model training. You will write SQL queries to explore customer segments, compute aggregations by contract type and service, and join customer attributes with churn outcomes to inform feature engineering.
Python Programming
Python Programming provides the foundation for building the churn prediction pipeline. You will write modular, well-structured Python code that loads the Telco dataset, performs data transformations, trains a classifier, and evaluates results. Your code must use virtual environments for dependency isolation, apply type hints for clarity, and demonstrate both functional and object-oriented design patterns so that team members can easily understand and extend the codebase.
Package & Dependency Management
Package & Dependency Management ensures the churn prediction pipeline has reproducible, secure, and well-documented dependencies. You will create and maintain a requirements.txt file that pins library versions, document transitive dependencies, scan for vulnerabilities, and follow best practices so that team members and CI/CD systems can reliably install and run the same codebase.
Language and stack
Python 3, pytest, scikit-learn, pandas, numpy. Dependency management via requirements.txt. Version control via Git and GitHub.
Scenario
You are a junior data scientist at a telecom company. The product team needs a proof-of-concept churn prediction model to identify at-risk customers. You have one day to build a working pipeline that the team can review and potentially integrate into their analytics platform. Your code must be clean, testable, and well-documented so that senior engineers can understand and extend it. The codebase will be evaluated for code quality, correctness, and demonstration of core data science and engineering practices.
Deliverables
- A Python package with modules for data loading, feature engineering, model training, and evaluation. Include a main script or notebook that orchestrates the pipeline end-to-end.
- A requirements.txt file listing all dependencies (pandas, scikit-learn, pytest, etc.) and a README.md explaining how to set up the environment, run the pipeline, and execute tests.
- A pytest test suite with at least 3-5 tests covering data loading, feature transformations, and model predictions. All tests must pass.
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): Git repository is initialized in the project root with a .gitignore file excluding pycache, .pytest_cache, venv, and *.pyc.
- Basic Commands (beginner): All source files (Python scripts, requirements.txt, tests) are staged and committed to the main branch with at least 5 commits showing incremental progress.
- Commits (beginner): Each commit has a clear, descriptive message (e.g., "Add data loading module", "Implement feature engineering", "Add unit tests for preprocessing") that explains what changed and why.
- Branching (beginner): At least two feature branches (e.g., feature/data-loading, feature/model-training) are created, checked out, and used to isolate work before merging to main.
- Merging (beginner): Feature branches are merged back into main using git merge with no unresolved conflicts; merge commits or fast-forward merges are visible in the log.
- Conflict Resolution (intermediate): If a merge conflict occurs (e.g., two branches modify the same file), the conflict is resolved manually, the conflicting markers are removed, and the resolved file is committed with a clear message.
- Pull Requests (intermediate): A pull request is opened on GitHub or GitLab comparing a feature branch to main, includes a description of changes and rationale, receives at least one review comment, and is merged only after review approval.
SQL
- SELECT Queries (beginner): Repository contains at least one SQL script or query string that retrieves specific columns (e.g., tenure, MonthlyCharges, Churn) from the customer table without errors.
- JOINs (intermediate): Repository includes a SQL query that joins two or more tables (e.g., customer demographics with service usage or contract details) to combine related attributes for analysis.
- GROUP BY (intermediate): Repository contains a SQL query using GROUP BY to aggregate metrics (e.g., average tenure or churn rate) by one or more dimensions such as Contract type or InternetService.
- Basic SQL Queries (intermediate): Repository demonstrates correct, complete SELECT queries with WHERE clauses, ORDER BY, and LIMIT to filter and sort customer records for exploratory data analysis.
- SQL Join S (intermediate): Repository includes a multi-table join query that correctly matches customer records across tables using primary and foreign keys without duplicates or null mismatches.
- Aggregation & Grouping (intermediate): Repository contains a query combining GROUP BY with aggregate functions (COUNT, AVG, SUM) and HAVING clauses to compute segment-level statistics used in feature engineering.
- Basic Subqueries & Cte S (beginner): Repository includes at least one query using a subquery or Common Table Expression (CTE) to compute an intermediate result set (e.g., customer cohorts or filtered segments) that feeds into a larger analysis.
Python Programming
- Virtual Environments (beginner): requirements.txt lists all dependencies (pandas, scikit-learn, pytest); learner repo includes a venv or conda setup instruction in README so reviewers can reproduce the environment.
- Functions & Modules (intermediate): Pipeline logic is split into separate modules (e.g., data_loader.py, feature_engineering.py, model.py, evaluation.py); each module exports clear functions with single responsibilities and is imported correctly in main scripts.
- Object-Oriented Programming (intermediate): At least one class (e.g., ChurnPredictor or DataPipeline) encapsulates related methods and state; the class is instantiated and used in the main workflow to train and evaluate the model.
- Type Hints (intermediate): Function signatures throughout the codebase include type hints for parameters and return values (e.g., def load_data(filepath: str) -> pd.DataFrame); type hints are consistent and aid code readability.
- Python Syntax & Data Structures (intermediate): Code correctly uses lists, dictionaries, pandas DataFrames, and NumPy arrays for data manipulation; list comprehensions or dict comprehensions are used where appropriate; string formatting and f-strings are applied correctly.
- Basic OOP Concepts (beginner): The learner repo includes at least one class with an init method and instance methods; the class is instantiated and used in the pipeline to demonstrate basic object instantiation and method calls.
- Error Handling & Debugging (intermediate): Code includes try-except blocks for file I/O and data validation; custom error messages or logging statements clarify what went wrong; pytest tests verify that errors are raised or handled correctly for invalid inputs (e.g., missing columns, malformed CSV).
Package & Dependency Management
- Package Managers Overview (beginner): requirements.txt file exists in the repo root and lists all direct Python dependencies (pandas, scikit-learn, pytest, requests) with no syntax errors.
- Semantic Versioning (beginner): Each dependency in requirements.txt uses semantic versioning format (e.g., scikit-learn==1.0.2 or pandas>=1.3.0,<2.0.0) rather than unversioned or wildcard pins.
- Version Constraints (intermediate): requirements.txt uses appropriate constraint operators (==, >=, <=, ~=) to balance reproducibility and flexibility; for example, scikit-learn>=1.0.0,<2.0.0 allows patch updates but prevents major version breaks.
- Installing Dependencies (beginner): A new team member can run pip install -r requirements.txt and successfully install all packages without errors; the pipeline then runs without import failures.
- Dependency Lock Files (intermediate): A requirements-lock.txt or similar file is generated (e.g., via pip freeze) and committed to the repo, capturing exact transitive dependency versions so that CI/CD and team builds are byte-for-byte identical.
- Updating Dependencies (intermediate): The repo includes a documented process (e.g., a script or README section) for safely updating dependencies; when executed, it regenerates the lock file and runs pytest to verify no breaking changes.
- Transitive Dependencies (intermediate): The repo documents or lists transitive dependencies (e.g., numpy pulled in by scikit-learn); lock file captures all transitive versions so builds remain reproducible across environments.
- Private Package Repositories (beginner): If any private packages are used, the requirements.txt or setup.cfg includes the repository URL or authentication method (e.g., --index-url or environment variable reference) so CI/CD can authenticate and install.
- Publishing Packages (beginner): The repo includes a setup.py or pyproject.toml that defines the churn pipeline as an installable package with name, version, and dependencies; the package can be installed locally via pip install -e . for development.
- Dependency Security & Vulnerability Scanning (intermediate): The repo includes a security check (e.g., via safety, pip-audit, or a GitHub Actions workflow) that scans requirements.txt for known vulnerabilities; results are logged or reported so the team can address CVEs before deployment.
- License Management (beginner): The repo includes a LICENSE file and a LICENSES.txt or similar document listing the licenses of all direct dependencies (e.g., scikit-learn is BSD, pandas is BSD) to ensure compliance.
- Dependency Best Practices (intermediate): The repo separates development dependencies (pytest, black, flake8) into a requirements-dev.txt file; production deployments use only requirements.txt, reducing attack surface and image size.
How to submit
- Before you start, register on SahkaarX and connect your GitHub account via the app settings.
- 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, create a virtual environment, install dependencies from requirements.txt, and implement your pipeline code in the repo.
- Commit your work regularly with clear commit messages, push to the main branch, and submit your final solution in the app by clicking Submit. Do not create your own GitHub repository; use only the one provided by SahkaarX.
What happens after you submit
After you submit, your repository will be evaluated when the challenge window closes. An automated AI review will analyze your code for correctness, test coverage, and adherence to best practices. You will then be required to complete a mandatory in-app conversation with an evaluator to discuss your implementation, design choices, and code understanding. This conversation is not a quiz but a comprehension check to verify you understand your own work. Once the conversation is complete, results will be finalized.
Intellectual property
You retain full ownership of the code and work you submit. SahkaarX may host, evaluate, and display your submission on leaderboards and in challenge galleries for educational purposes. Your GitHub repository remains private under your account; only you and SahkaarX evaluators have access during the challenge window. After the challenge closes, you may choose to make the repository public or keep it private.
FAQ
Who can join this challenge?
This is an open challenge for entry-level data scientists. Solo participants are welcome; teams are not allowed.
Do I need to create my own GitHub repository?
No. SahkaarX will create a private repository for you when the challenge starts. You will receive a clone URL in the app. Clone that repo and push your work there.
When does evaluation happen?
Automated code review runs after the challenge window closes, not immediately after you submit. You will then participate in a mandatory in-app conversation to discuss your work.
What is the mandatory conversation after submission?
After your code is reviewed, you will have a brief in-app conversation with an evaluator to verify you understand your implementation and design decisions. This is a comprehension check, not a written test.