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

🧼🫧 Fix shape handling in Interaction #1459

Merged
merged 7 commits into from
Oct 12, 2024

Conversation

mberr
Copy link
Member

@mberr mberr commented Oct 12, 2024

This MR cleans up inconsistencies in how we handle symbolic shapes in Interaction.

It now uses entity_shape as the shape information for all entity representations (head & tail). head_indices and tail_indices can be used to derive the shapes for a given role, exposed as properties head_shape and tail_shape.

It also lifts the restriction of only using interactions with shared head and entity shape via the interaction + dimensions API inside pipeline, and converts the class method get_dimensions to an instance-property dimensions which now also supports interaction with variable number of representations, e.g., AutoSF.

Follow up:
I think it makes sense to change the generic type of ERModel[HeadRepresentation, RelationRepresentation, TailRepresentation] to ERModel[EntityRepresentation, RelationRepresentation] and only distinguish in the interaction.

@mberr mberr changed the title Fix shape handling in Interaction 🧼🫧 Fix shape handling in Interaction Oct 12, 2024
@mberr mberr marked this pull request as ready for review October 12, 2024 09:33
@mberr mberr requested a review from cthoyt October 12, 2024 11:03
Copy link
Member

@cthoyt cthoyt left a comment

Choose a reason for hiding this comment

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

Do you think this interface is private enough that changing it won't have an impact? I guess it should be implicitly covererd by existing tests. If so, :shipit:

@mberr
Copy link
Member Author

mberr commented Oct 12, 2024

Do you think this interface is private enough that changing it won't have an impact? I guess it should be implicitly covererd by existing tests. If so, :shipit:

I tend to say yes 😅 If someone depends on an exact API, version pinning is still possible.

@mberr mberr merged commit 2835b6d into master Oct 12, 2024
14 checks passed
@mberr mberr deleted the fix-shape-handling-interaction branch October 12, 2024 12:42
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

2 participants