Skip to content

Make EncodedEvent.cls optional - #16

Merged
sevmag merged 2 commits into
mainfrom
cls-optional
Aug 15, 2026
Merged

Make EncodedEvent.cls optional#16
sevmag merged 2 commits into
mainfrom
cls-optional

Conversation

@sevmag

@sevmag sevmag commented Aug 15, 2026

Copy link
Copy Markdown
Owner

What

Make EncodedEvent.cls optional (Tensor | None = None).

A backbone with no event-level readout can now leave cls unset, and per-token pretexts that read only tokens don't have to synthesize one. The single consumer that actually needs it — CURTAIN's QueryCrossAttnEncoder — guards for None with a clear error.

Existing backbones (DeepIce, DeepIceRope) still fill cls, so behavior is unchanged.

🤖 Generated with Claude Code

Per-token pretexts (masked point modeling) read `tokens` and never need the
pooled event embedding, so cls now defaults to None. The one consumer that
requires it -- CURTAIN's QueryCrossAttnEncoder -- guards for None with a clear
error. Existing backbones still fill cls, so behavior is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The cls=None guard raises ValueError; add the matching Raises section so
pydoclint (DOC503) passes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@sevmag sevmag left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

👍

@sevmag
sevmag merged commit e37930e into main Aug 15, 2026
1 check passed
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.

1 participant