How flyrank-bih/flyrank-ml-internship-starter works
Purpose and Entry Points
FlyRank ML Internship is an educational, reproducible search-intelligence ML workspace. It teaches a controlled workflow for prioritizing pages for content refresh using anonymized search data—not prediction of Google’s ranking algorithm.
Primary execution paths:
• Local reference pipeline: scripts/run_all.py
• Guided introductory notebooks: notebooks/01_first_look_and_discovery.ipynb, notebooks/02_your_first_readable_model.ipynb
• Learner assignment/capstone workspace: work/notebooks/
• Google Colab is the primary zero-install interactive runtime.
Data Boundary and Contracts
The bundled input is a small anonymized CSV, data/raw/content_refresh_anonymized.csv; its field semantics and cautions are defined in docs/data-dictionary.md. The repository explicitly prohibits adding raw/private client data, governed by DATA_USE.md.
A separate scaled-data path uses the gated Hugging Face dataset FlyRank/internship-warehouse, queried through DuckDB in notebooks/03_working_with_the_full_release.ipynb. This is a material boundary: starter CSV runs locally, while the full release requires approved external access.
Reference ML Pipeline
scripts/run_all.py orchestrates five ordered stages against the sample data:
1. Feature preparation and label definition in scripts/01_prepare_features.py.
2. A transparent hand-built prioritization score in scripts/02_baseline_score.py.
3. Candidate learned models—logistic regression, decision tree, and random forest—with client holdout evaluation in scripts/03_train_model.py.
4. Ranking, metrics, charts, refresh queue, and Markdown reporting in scripts/04_evaluate_and_export.py.
5. PDF packaging in scripts/05_build_pdf_report.py.
Shared model/data utilities are centralized in scripts/ml_utils.py, keeping stage scripts focused on pipeline transitions.
Evaluation and Decision-Support Output
The pipeline compares the interpretable baseline against learned ranking quality, particularly Precision@50, then produces a ranked review queue rather than an autonomous action system. Outputs are materialized under outputs/, including outputs/refresh_queue_sample.csv and outputs/model_report.md; charts are placed in outputs/charts/.
This output boundary reinforces the intended use: measured, directional recommendations for review.
Learning and Capstone Control Flow
The instructional flow progresses from question framing through data contract, leakage checks, signal audit, baseline, modeling, validation, and action playbook. The persistent learner-owned artifacts are in work/notebooks/, ending with work/notebooks/capstone.ipynb.
Reference notebooks demonstrate the early stages, while skills/ supplies reusable assistant-oriented process guidance such as skills/framing-ml-problems/SKILL.md, skills/hunting-leakage-and-validating/SKILL.md, and skills/training-honest-models/SKILL.md.
Runtime, Dependencies, and Automation
The main runtime is Python with dependencies pinned through requirements.txt; supported environments are local Python and Google Colab. The full-data notebook introduces DuckDB and Hugging Face-hosted data access.
GitHub Actions provide operational guardrails and smoke coverage through .github/workflows/smoke-test.yml, .github/workflows/data-path-smoke.yml, and .github/workflows/personalize.yml. Personalization automation rewires Colab notebook links in template-derived learner repositories; data-path automation supports the repo’s no-private-data enforcement model.
Main entry points: 01_prepare_features.py Feature preparation · smoke-test.yml GitHub Actions guardrails · 04_evaluate_and_export.py Ranking & export · content_refresh_anonymized.csv Anonymized starter CSV
Components 18
Data boundaries
- Anonymized starter CSV · Small bundled input for reproducible local runs.
data/raw/content_refresh_anonymized.csv - Data contract · Defines field semantics and cautions.
docs/data-dictionary.md - No-private-data policy · Prohibits raw or private client data.
DATA_USE.md - Full release notebook · Queries approved scaled data through DuckDB.
notebooks/03_working_with_the_full_release.ipynb - Gated warehouse dataset · Hugging Face release requiring approved access.
Reference pipeline
- Local pipeline runner · Runs the five ordered reference stages.
scripts/run_all.py - Feature preparation · Defines features and labels from sample data.
scripts/01_prepare_features.py - Transparent baseline · Builds a hand-crafted prioritization score.
scripts/02_baseline_score.py - Candidate model training · Evaluates logistic regression, tree, and forest with client holdout.
scripts/03_train_model.py - Ranking & export · Compares ranking quality and creates review artifacts.
scripts/04_evaluate_and_export.py - PDF report packaging
scripts/05_build_pdf_report.py - Shared ML utilities · Shared data and model helpers for pipeline stages.
scripts/ml_utils.py - Review outputs · Ranked review queue, report, and charts—not autonomous actions.
Learning workspace
- Intro notebooks · Teach discovery and a first readable model.
notebooks/01_first_look_and_discovery.ipynb - Learner workspace · Persistent learner-owned work ending in the capstone.
- Process guidance · Reusable framing, leakage-validation, and honest-model guidance.
Runtime & automation
- Python & Colab runtime · Local Python and Google Colab are supported.
requirements.txt - GitHub Actions guardrails · Smoke tests, data-path checks, and Colab-link personalization.
.github/workflows/smoke-test.yml
Connections 20
- Local pipeline runner → Feature preparation: runs first
- Feature preparation → Transparent baseline: prepared features
- Transparent baseline → Candidate model training: baseline comparison
- Candidate model training → Ranking & export: model results
- Ranking & export → PDF report packaging: Markdown report
- Anonymized starter CSV → Feature preparation: local input
- Data contract → Anonymized starter CSV: defines fields
- No-private-data policy → Anonymized starter CSV: governs use
- Shared ML utilities → Feature preparation: shared helpers
- Shared ML utilities → Candidate model training: shared helpers
- Ranking & export → Review outputs: queue, metrics, charts
- PDF report packaging → Review outputs: packaged report
- Full release notebook → Gated warehouse dataset: DuckDB query
- Intro notebooks → Learner workspace: progresses into
- Process guidance → Learner workspace: guides work
- Python & Colab runtime → Local pipeline runner: executes
- Python & Colab runtime → Intro notebooks: interactive runtime
- GitHub Actions guardrails → Local pipeline runner: smoke coverage
- GitHub Actions guardrails → No-private-data policy: enforces data path
- GitHub Actions guardrails → Intro notebooks: personalizes Colab links