feat(ml): PR 1 — Python scaffold for Phase 5 RL agent - #23
Conversation
|
Important Review available on request
Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Summary by QodoAdd Phase 5 ML Python scaffold with uv/ruff/mypy/pytest green loop
AI Description
Diagram
High-Level Assessment
Files changed (6)
|
Code Review by Qodo
1.
|
Summary
First of 15 Phase 5 PRs. Sets up the Python project skeleton at
src/ml/so subsequent PRs (action decoder, feature names, reward, envs, PPO, SHAP, serving) land on a stable, lint-clean, type-checked base. No RL logic yet — this PR only proves the toolchain runs green on an empty package.What this PR proves
uv sync && uv run ruff check . && uv run mypy && uv run pytestall pass on a package that does nothing but expose__version__. Every future Phase 5 PR inherits a workingruff+mypy --strict+pytestloop from day one.Contents
src/ml/pyproject.tomlafie-mlproject,hatchlingbackend,ruff/mypy/pytestin dev groupsrc/ml/.python-versionsrc/ml/uv.locksrc/ml/.gitignore.venv/,__pycache__/,*.pyc,.mypy_cache/,.ruff_cache/,.pytest_cache/,*.egg-info/src/ml/src/ml/afie_ml/__init__.py__version__ = "0.1.0"src/ml/tests/AFIE.Ml.Tests/test_scaffold.pyafie_ml, asserts versionStandards checked
mypyconfigured withstrict = trueruffrules:E, F, I, UP, B; line length 100.NETconvention:tests/AFIE.<Service>.Tests/dependencies = [](torch, SB3, gymnasium, SHAP land with the code that uses them)Test plan
cd src/ml && uv sync— clean installuv run ruff check .— cleanuv run mypy— clean under strictuv run pytest— scaffold test passesgit status --ignored src/ml/— confirms.venv/,.mypy_cache/,.ruff_cache/are excludedNot in this PR
PRs 2–15 add: action decoder,
FEATURE_NAMES, reward function,AFIEOfflineEnv,AFIEEnv, dataset ingestion, PPO training, online fine-tune stub, SHAP explainer, explanation templates, Flask serving, Azure MLscore.py, Dockerfile, docs.