feat: LesNet 4.5.0 — data-sourcing module + S/M/L/XL model family (distillation, int8 quantisation)#69
Merged
Merged
Conversation
…ce, sort New lesnet/data/ subsystem (no TensorFlow): per-source loaders (ISIC API malignant-maximal download, PAD-UFES-20, Fitzpatrick17k, DDI) -> curated diagnosis-name canonicalisation -> quality gate + perceptual-hash near-duplicate removal -> sort into benign/not_sure/malignant /<diagnosis>/ folders -> fair, group-safe, fairness-aware 1:1 benign:malignant balancing with per-diagnosis caps -> leakage-safe grouped manifest + report. Driven by commands/build_dataset.py. Restructure: moved the data concerns out of lesnet/ml (taxonomy, splits, records/manifest IO) into lesnet/data; lesnet/ml keeps the TF-coupled model/training/inference. Removed the three old data commands (download_isic_full, fetch_isic_sample, run_build_dataset) and the stale datasets test, rewired all importers, updated CLAUDE.md + train_full_m4.sh. 100% unit-test coverage on lesnet/data (63 tests, network mocked), ruff clean. Existing training (CPU smoke) + inference (web /labels+/predict, real M-4s CLI) still pass. Validated end-to-end on the live ISIC API: 1199 labelled -> balanced 163:163, leakage-safe splits.
… quantisation, EMA/label-smoothing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LesNet 4.5.0 — clinically-usable, sub-500 MB triage system
Builds the 4.5.0 architecture as a flow of separate, tested modules. Two parts land here:
Stage 1 — data sourcing (
lesnet/data/, no TensorFlow)benign/not_sure/malignant/<diagnosis>/, then fair, group-safe, fairness-aware ~1:1 benign:malignant balancing with per-diagnosis caps.report.json. Driven bycommands/build_dataset.py.lesnet/data(network mocked); validated end-to-end on the live ISIC API (1199 labelled → balanced 163:163).Stage 2+ — model family (
lesnet/ml/)commands/build_models.pytrains teacher → distils students → quantises M4.5s → packages for release.v*tag → GitHub Release);commands/package_model.py+gh release uploadattach the model assets.Restructure / cleanup
lesnet/mlintolesnet/data(taxonomy, splits, records/manifest IO);lesnet/mlkeeps the TF-coupled model/training/inference.CLAUDE.md,scripts/train_full_m4.sh.Verification:
ruffclean, 69 tests pass (CPU-deterministic viaconftest.py), existing training (CPU smoke) + inference (web/labels+/predict, real M-4s CLI) intact. Trained models + the v4.5.0 release with downloadable artifacts follow once the full dataset build + training cycle complete; the live demo will pull M4.5s.