Skip to content

Add CORrelation ALignment domain adaptation - #21

Open
shuo-zhou wants to merge 4 commits into
mainfrom
add-coral
Open

shuo-zhou wants to merge 4 commits into
mainfrom
add-coral

Conversation

@shuo-zhou

@shuo-zhou shuo-zhou commented Sep 12, 2026 •

Copy link
Copy Markdown
Member

Description

Add CORAL (CORrelation ALignment) domain adaptation

Status

Ready

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • In-line docstrings updated and documentation docs updated.

@codecov

codecov Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.25000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.40%. Comparing base (5b9ef29) to head (27c98f9).

Files with missing lines Patch % Lines
kalelinear/transformer/_coral.py 96.10% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #21      +/-   ##
==========================================
+ Coverage   90.16%   90.40%   +0.23%     
==========================================
  Files          24       25       +1     
  Lines        1922     2000      +78     
==========================================
+ Hits         1733     1808      +75     
- Misses        189      192       +3     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The whitening cutoff can collapse valid low-scale covariance matrices to a zero alignment.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds CORAL domain adaptation with public exports, documentation, and tests.

Changes:

  • Implements covariance-based source-to-target alignment.
  • Exposes CORAL through transformer and embedding APIs.
  • Adds validation, numerical, API, and documentation coverage.
File summaries
File Description
kalelinear/transformer/_coral.py Implements CORAL.
kalelinear/transformer/__init__.py Exports CORAL.
kalelinear/embed.py Adds embedding API alias.
tests/transformer/test_coral.py Tests CORAL behavior and validation.
tests/test_public_api.py Verifies public exposure.
README.md Documents feature and citation.
TUTORIALS.md Adds usage example.
docs/source/usage.rst Describes domain alignment behavior.
docs/source/tutorial.rst Adds CORAL tutorial.
docs/source/introduction.rst Lists CORAL among transformers.
docs/source/api_transformers.rst Adds generated API documentation.
Review details
  • Files reviewed: 11/11 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread kalelinear/transformer/_coral.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The PR is marked work in progress and includes substantial release automation outside its stated CORAL scope.

Get a fresh assessment by requesting another Copilot review.

Review details
  • Files reviewed: 16/17 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment on lines +20 to +25
# Writing the changelog commit and the pull request comment needs more than
# the default read-only token. Without these permissions both operations fail
# and the action only reports a warning, leaving a green but empty run.
permissions:
contents: write
pull-requests: write
An absolute floor rejected valid low-scale covariances and returned a zero alignment; scale the cutoff with the largest eigenvalue instead.
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.

2 participants