audio streaming app plyr.fm
38
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: update docs for auto-tag at upload and ML audit script (#873)

- STATUS.md: add PRs #871-872, update current focus to ML features
- genre-classification.md: add auto-tag section, auditing section, key files
- background-tasks.md: note auto-tag behavior in genre classification bullet

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

authored by

nate nowack
Claude Opus 4.6
and committed by
GitHub
9b5b124d 5046e77e

+43 -9
+16 -7
STATUS.md
··· 47 47 48 48 ### February 2026 49 49 50 + #### auto-tag at upload + ML audit script (PRs #871-872, Feb 7) 51 + 52 + **auto-tag on upload (PR #871)**: checkbox on the upload form ("auto-tag with recommended genres") that automatically applies genre tags after classification completes. user doesn't need to come back to the portal to apply suggested tags. 53 + 54 + - frontend: `autoTag` state + checkbox below TagInput, threaded through `uploader.svelte.ts` into FormData 55 + - backend: `auto_tag` form param stored in `track.extra["auto_tag"]`, consumed by `classify_genres` background task 56 + - after classification, applies top tags using ratio-to-top filter (>= 50% of top score, capped at 5) 57 + - additive with manual tags — user can add their own AND get auto-tags 58 + - flag cleaned up from `track.extra` after use (no schema migration needed) 59 + 60 + **ML audit script (PR #872)**: `scripts/ml_audit.py` reports which tracks and artists have been processed by ML features (genre classification, CLAP embeddings, auto-tagging). for privacy policy and terms-of-service auditing. supports `--verbose` for track-level detail, `--check-embeddings` for turbopuffer vector counts. 61 + 62 + --- 63 + 50 64 #### ML genre classification + suggested tags (PRs #864-868, Feb 6-7) 51 65 52 66 **genre classification via Replicate**: tracks are now automatically classified into genre labels using the [effnet-discogs](https://replicate.com/mtg/effnet-discogs) model on Replicate (EfficientNet trained on Discogs ~400 categories). ··· 411 425 412 426 ### current focus 413 427 414 - PDS blob storage shipped and feature-flagged. uploads store audio on user's PDS when the `pds-audio-uploads` flag is enabled and the user opts in via settings. per-track migration modal lets users selectively backfill existing tracks to PDS with file size visibility and non-blocking toast-based progress. R2 CDN remains primary delivery path. 415 - 416 - **end-of-year sprint [#625](https://github.com/zzstoatzz/plyr.fm/issues/625) shipped:** 417 - - moderation consolidation: sensitive images moved to moderation service (#644) 418 - - moderation batch review UI with Claude vision integration (#672, #687-690) 419 - - atprotofans: supporter badges (#627) and content gating (#637) 428 + ML-powered track features rolling out: genre classification (Replicate effnet-discogs) auto-runs on upload, with optional auto-tagging checkbox on the upload form. mood search (CLAP embeddings + turbopuffer) feature-flagged behind `vibe-search`. ML audit script (`scripts/ml_audit.py`) tracks which tracks/artists have been processed for privacy/ToS compliance. 420 429 421 430 ### known issues 422 431 - iOS PWA audio may hang on first play after backgrounding ··· 473 482 - ✅ unified search with Cmd/Ctrl+K 474 483 - ✅ teal.fm scrobbling 475 484 - ✅ copyright moderation with ATProto labeler 476 - - ✅ ML genre classification with suggested tags in edit modal (Replicate effnet-discogs) 485 + - ✅ ML genre classification with suggested tags in edit modal + auto-tag at upload (Replicate effnet-discogs) 477 486 - ✅ docket background tasks (copyright scan, export, atproto sync, scrobble, genre classification) 478 487 - ✅ media export with concurrent downloads 479 488 - ✅ supporter-gated content via atprotofans
+1 -1
docs/backend/background-tasks.md
··· 12 12 - **album list sync** - updates ATProto list records when album metadata changes 13 13 - **PDS like/unlike** - syncs like records to user's PDS asynchronously 14 14 - **PDS comment create/update/delete** - syncs comment records to user's PDS asynchronously 15 - - **genre classification** - classifies tracks via Replicate effnet-discogs, stores predictions in `track.extra` 15 + - **genre classification** - classifies tracks via Replicate effnet-discogs, stores predictions in `track.extra`. if `auto_tag` flag is set, applies top genre tags automatically after classification 16 16 - **move track audio** - moves files between public/private R2 buckets when support_gate is toggled 17 17 - **sync copyright resolutions** (perpetual) - syncs copyright label resolutions from ATProto labeler every 5 minutes 18 18
+26 -1
docs/backend/genre-classification.md
··· 55 55 - empty `tags` with `available: true` means the track has no R2 URL or classification returned no results 56 56 - `score` is the model's confidence (0-1) 57 57 58 + ## auto-tag at upload 59 + 60 + users can check "auto-tag with recommended genres" on the upload form. when enabled: 61 + 62 + 1. `auto_tag: true` is stored in `track.extra` during upload 63 + 2. `classify_genres` background task runs as usual 64 + 3. after storing predictions, the task checks for the `auto_tag` flag 65 + 4. applies top genre tags using ratio-to-top filter: tags scoring >= 50% of the top score, capped at 5 66 + 5. cleans up the `auto_tag` flag from `track.extra` 67 + 68 + auto-tags are additive with manual tags — if the user also typed tags, both appear on the track. 69 + 70 + **key files**: `backend/src/backend/api/tracks/uploads.py` (form param + UploadContext), `backend/src/backend/_internal/background_tasks.py` (apply logic in `classify_genres`) 71 + 72 + ## auditing 73 + 74 + `scripts/ml_audit.py` reports which tracks and artists have been processed by genre classification (and other ML features). useful for privacy/ToS auditing. 75 + 76 + ```bash 77 + cd backend && uv run python ../scripts/ml_audit.py --verbose 78 + ``` 79 + 58 80 ## storage format 59 81 60 82 predictions are stored in `track.extra["genre_predictions"]`: ··· 127 149 ## key files 128 150 129 151 - `backend/src/backend/_internal/replicate_client.py` — Replicate HTTP client 130 - - `backend/src/backend/_internal/background_tasks.py` — `classify_genres` task 152 + - `backend/src/backend/_internal/background_tasks.py` — `classify_genres` task (+ auto-tag logic) 153 + - `backend/src/backend/api/tracks/uploads.py` — `auto_tag` form param and `UploadContext` 131 154 - `backend/src/backend/api/tracks/tags.py` — `recommended-tags` endpoint 132 155 - `backend/src/backend/config.py` — `ReplicateSettings` 133 156 - `scripts/backfill_genres.py` — batch classification script 157 + - `scripts/ml_audit.py` — ML processing audit script 158 + - `frontend/src/routes/upload/+page.svelte` — auto-tag checkbox on upload form 134 159 - `frontend/src/routes/portal/+page.svelte` — suggested tags UI in edit modal