Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove batch encoder #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jteijema
Copy link
Member

This PR removes the batch encoder. While the performance was better, it removed the ability of variable length abstracts. Retained is the removal of storing embeddings to the result dataframe.

@jteijema jteijema requested a review from J535D165 November 22, 2021 17:07
for x in tqdm(encoded.input_ids):
embeddings.append(model(x.unsqueeze(0), output_hidden_states=False)[-1].detach().numpy().squeeze()) # noqa: E501
for x in tqdm(encoded):
embeddings.append(model(**x, output_hidden_states=False)[-1].detach().numpy().squeeze()) # noqa: E501
Copy link
Member

Choose a reason for hiding this comment

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

Not a big fan of the noqa.

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