Skip to content

Handle ESM wrapper's embed method in peer callback - #176

Merged
taylormjs merged 4 commits into
mainfrom
tj/esm-peer-compat-minimal
Aug 1, 2025
Merged

Handle ESM wrapper's embed method in peer callback#176
taylormjs merged 4 commits into
mainfrom
tj/esm-peer-compat-minimal

Conversation

@taylormjs

Copy link
Copy Markdown
Collaborator

Description

The ESM wrapper's embed method expects sequences, not tokenized inputs. The PEER evals, however, previously assumed embed took in tokenized inputs. Updating peer callback to account for this

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Performance improvement
  • Code refactoring

@taylormjs
taylormjs requested review from karinazad and ncfrey July 31, 2025 21:31
is_tokenized_input = isinstance(inputs, (dict, BatchEncoding))
isinstance(inputs, (list, str))

# Check for dangerous combinations

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.

good check!

@taylormjs
taylormjs marked this pull request as ready for review August 1, 2025 16:07
@taylormjs
taylormjs merged commit ad91639 into main Aug 1, 2025
4 checks passed
@taylormjs
taylormjs deleted the tj/esm-peer-compat-minimal branch August 1, 2025 16:08
taylormjs added a commit that referenced this pull request Aug 1, 2025
* handle embed methods that take in sequence or tokenized inputs (previously just tokenized inputs

* clean up, add warnings

* ruff

* fix error chaining

---------

Co-authored-by: Taylor Joren <joren.taylor@gene.com>
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