Skip to content

Support configurable Enformer output heads - #762

Open
sylvesterkaczmarek wants to merge 1 commit into
google-deepmind:masterfrom
sylvesterkaczmarek:feature/enformer-configurable-heads
Open

sylvesterkaczmarek wants to merge 1 commit into
google-deepmind:masterfrom
sylvesterkaczmarek:feature/enformer-configurable-heads

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Summary

Allow the source Enformer model to configure output heads instead of hard-coding only the published human and mouse track counts.

The implementation currently creates {'human': 5313, 'mouse': 1643} inside Enformer.__init__, which means users adapting the architecture to another species cannot specify a different target set without editing the model source. This is the limitation raised in #297.

This change:

  • adds an optional heads_channels mapping to Enformer.__init__
  • preserves the existing human and mouse heads by default
  • preserves the existing positional constructor arguments by adding the new option after name
  • rejects an empty head mapping
  • adds focused tests for a custom pig head and the empty-mapping case
  • documents that newly configured heads need training because the published checkpoint contains only the published heads

Fixes #297.

Validation

The final branch is based directly on current upstream master and contains one commit (3f3400ec93d7fdc8aa5dcc64dda8c230b104534d).

The final diff changes only:

  • enformer/enformer.py
  • enformer/enformer_test.py
  • enformer/README.md

The legacy Enformer/TensorFlow dependency stack is not installed in this execution environment, so the tests were not executed locally and no local test pass is claimed.

@polarbe

polarbe commented Aug 23, 2026 via email

Copy link
Copy Markdown

@sylvesterkaczmarek

Copy link
Copy Markdown
Author

Could a maintainer review the configurable Enformer output heads and arrange a fresh approved workflow run? The previous security run ended with no jobs after 30 days, which looks like expired approval.

@polarbe

polarbe commented Oct 7, 2026 via email

Copy link
Copy Markdown

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.

enformer for other species

2 participants