Skip to content

Add WeightLens input-invariant feature analysis - #130

Merged
Xmaster6y merged 2 commits into
mainfrom
codex/issue-124-weightlens
Aug 31, 2026
Merged

Xmaster6y merged 2 commits into
mainfrom
codex/issue-124-weightlens

Conversation

@Xmaster6y

@Xmaster6y Xmaster6y commented Aug 31, 2026

Copy link
Copy Markdown
Owner

Summary

  • add model-agnostic encoder-to-embedding, decoder-to-logit, and cross-layer feature projection APIs
  • add deterministic WeightLens-compatible z-score outlier selection and optional batched forward validation
  • support distinct input/output vocabularies, MPS-safe statistics, and no-grad analysis
  • emit frozen, JSON-serializable analysis artifacts and export the public API from tdhook.weights
  • cover projections, candidate pooling, validation, serialization, shape errors, and reference-formula agreement with toy-model tests

Validation

  • uv run pre-commit run --all-files
  • just tests (642 passed, 1 skipped; 98.36% total coverage; 100% coverage for weight_lens.py)

Closes #124

@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.36%. Comparing base (8f22922) to head (7eb5287).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #130      +/-   ##
==========================================
+ Coverage   98.31%   98.36%   +0.05%     
==========================================
  Files          52       53       +1     
  Lines        3968     4091     +123     
==========================================
+ Hits         3901     4024     +123     
  Misses         67       67              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 3 files

You’re at about 96% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread src/tdhook/weights/weight_lens.py
Comment thread src/tdhook/weights/weight_lens.py Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 95f2fac874

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/tdhook/weights/weight_lens.py Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-31T16:29:54.932798Z 95f2fac PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Xmaster6y
Xmaster6y merged commit c403cd2 into main Aug 31, 2026
6 checks passed
@Xmaster6y
Xmaster6y deleted the codex/issue-124-weightlens branch August 31, 2026 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add WeightLens input-invariant feature analysis

1 participant