Skip to content

Unsafe non-blocking memory transfer #77

@chschroeder

Description

@chschroeder

Bug description

Embeddings in an approval test for KimCNNClassifier's clf.embed() returned embeddings that were all zeros.

Strangely, the timing seems to work most of the time, including after the first call. I diagnosed the underlying issue to be an unsafe data transfer where .to(..., non_blocking=True) was used.

Expected behavior

Should return correct embeddings.

Environment:

small-text version: 2.0.0.dev2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions