Repository navigation
feat(profiles): drop the local MiniLM grouping and show when classification is not configured - #255
Merged
Merged
Conversation
…cation is not configured Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Contributor
|
Runtime QA at 6987f7c passed for admin notices, setup button, recorded categories and the container build. Reader and team-scoped views untested |
Collaborator
Author
|
bugbot run |
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Collaborator
Author
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 4cbff78. Configure here.
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.
Summary
Fixes #254.
litellm-lenscrashed with SIGILL beforemainon x86_64 hosts without AVX. The cause is thatfastembedstatically links ONNX Runtime, whose C++ static initializers use AVX. ORT was there only for the local "automatic grouping" worker, which embedded each run with quantized all-MiniLM-L6-v2 and assigned it to a keyword cluster. Task discovery already groups runs with gateway embeddings and a decision model, so this PR removes the local path entirely and dropsfastembed/ortfrom the binaryRemoved:
lens_profiles::Classifierand its cluster assignment code (the crate now only holds the UMAP/HDBSCAN clustering discovery uses), thetask-profile-workersubprocess and its memory supervisor,traces_clickhouse::profiles::projectand its candidate/input queries, the build-time model download andresource_proberun in the Dockerfile, andLENS_TASK_PROFILES_ENABLED/LENS_PROFILE_MODEL_CACHE. Thelens_task_profilesandlens_task_clusterstables are left alone. Nothing reads or writes them anymore, and their rows expire through the existing retention TTLThe Profiles tab no longer shows a run as
Unclassifiedjust because nobody has set up discovery.trace_profiles.sqlnow resolves a run with no recorded category to a newunconfiguredprofile ("Not configured") when no taxonomy is active. InProfileSource,unconfiguredreplaceslocalanduncertain:When the overview contains
unconfiguredruns, the tab shows a "Task classification is not configured" notice. An admin whose gateway has no decision model is told to add one. An admin with a decision model is pointed at Task discovery. Both get a button that opens it. Readers are told a proxy admin needs to set it up. Callers who can't read every team never see the shared taxonomy, soload_runsmapsunconfiguredback tounclassifiedfor them rather than claiming it isn't configured. The sample and finding-source filters inlens_sample.sqlandlens_finding_source.sqltreatUnclassified/unclassifiedas also matchingunconfiguredruns. That way those scoped callers, and investigations saved before this change, still resolve their runsTested with:
cargo clippy -D warningslens-serverprofile unit and route tests, including a new admin vs scoped casetraces-clickhouseprofile sampling and finding-source tests against ClickHousenpm run check:worker-contractandnpm run typecheck:uiI haven't run it on a host without AVX
Details
Link to Devin session: https://app.devin.ai/sessions/76c11fe2cc2a453e863a72bbda70756b
Open in Devin Desktop: https://app.devin.ai/desktop/session/76c11fe2cc2a453e863a72bbda70756b?variant=devin
Requested by: @moe-berri
Note
Medium Risk
Removes background grouping and changes profile IDs/labels and investigation filters; existing
cluster:*/ uncertain assignments are no longer produced, though legacy DB rows are untouched.Overview
Removes the local automatic task grouping path (MiniLM/
fastembed/ort, thetask-profile-workersubprocess, supervisor, Docker model probe/cache, and ClickHouse projection intolens_task_profiles/lens_task_clusters). Task profiles now depend on gateway-based Task discovery only; thelens-profilescrate is trimmed to clustering helpers used by discovery.Profile resolution drops
local/uncertainand addsunconfigured("Not configured") when there is no active taxonomy and no recorded category. SQL filters and APIs align sounclassifiedfilters can still match those runs where appropriate. Scoped callers who cannot see the shared taxonomy haveunconfiguredmapped back toUnclassifiedso the UI does not claim setup is missing.The Profiles tab shows a “Task classification is not configured” banner (admin vs reader copy, optional Set up task discovery button) when overview data includes
unconfiguredruns. Docs are updated to describe gateway decision-model discovery instead of local embedding grouping.Reviewed by Cursor Bugbot for commit 4cbff78. Bugbot is set up for automated code reviews on this repo. Configure here.