Repository navigation
Remove rearrange and einops dependency - #178
Merged
Merged
Conversation
marcelluethi
approved these changes
Oct 24, 2026
marcelluethi
left a comment
Contributor
There was a problem hiding this comment.
Great change. It is telling that the changes to our code base are actually quite minimal after removing this metod.
benikm91
added a commit
that referenced
this pull request
Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We have a quite complex, rarly used
rearrangemethod that was designed very early when experimenting with the type system. While it is an impressive method, it is rarly used, quite complex in implementation, and requires einops dependency in the underlying Python environment. Due to its rare use we are also unsure if it works withjit, automatic differentiation, etc. There might be unexpected limits.Due to these reasons and mostly due to the extra einops dependency this PR suggests removing the rearrange method for now. The code was backed up in an internal repo "dimwit-einops" that we might publish in the future. This follows our decision for dimwit-sharding, that we keep the core minimal while possibly adding more features with additional packages. So, if rearrange makes a comeback it will probably be as an additional package outside of dimwit (the core).
Overview changes:
rearrangein the VAE example, which now usesflattenandunflatten. I added an extra function to make the code still quite nice to read.einopsfrom theDockerfile, which still installs, e.g., matplotlib. Let me know if we want to rollback on that and keepeinopsthere as a dependency. I am quite unsure about it.