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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃尰 鉂勶笍 Add dtype annotation to pykeen.nn.Embedding #292

Merged
merged 8 commits into from Feb 15, 2021

Conversation

cthoyt
Copy link
Member

@cthoyt cthoyt commented Feb 12, 2021

This PR is the next step after #287 in bringing the embeddings and embedding specifications into the future. It adds the ability to annotate the data inside the embedding. Unfortunately, embeddings do not yet support native complex tensors (see #134) so this is a nice abstraction in the mean time. Futher, it is the final abstraction on the embeddings/representations necessary for #260. Luckily, very little code needed to be changed.

All credit goes to @mberr since this code was originally in #107 and later #260.

Tasks:

  • Add dtype to embedding (@cthoyt)
  • Add dtype to embedding specification (@cthoyt)
  • Add tests (@mberr)

@cthoyt cthoyt requested a review from mberr February 12, 2021 14:49
Trigger CI
@cthoyt cthoyt changed the title 馃尰 鉂勶笍 Add complex datatype annotations 馃尰 鉂勶笍 Add dtype annotation to pykeen.nn.Embedding Feb 12, 2021
@cthoyt
Copy link
Member Author

cthoyt commented Feb 12, 2021

Could use some tests...

@cthoyt
Copy link
Member Author

cthoyt commented Feb 12, 2021

@mberr I copied a few tests over from #107 and also added a specific one to check that the complex number is doubling the dimension properly along the last axis of the shape. Should be ready for review now.

@cthoyt
Copy link
Member Author

cthoyt commented Feb 13, 2021

@PyKEEN-bot test please

Copy link
Member

@mberr mberr left a comment

Choose a reason for hiding this comment

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

lgtm

@cthoyt cthoyt merged commit c82f150 into master Feb 15, 2021
@cthoyt cthoyt deleted the complex-shapes-norman-bates branch February 15, 2021 12:50
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.

None yet

3 participants