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

Canonicalize PartitionSpec so that we can delete ParsedPartitionSpec #4577

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

Conversation

copybara-service[bot]
Copy link

@copybara-service copybara-service bot commented Feb 26, 2025

Canonicalize PartitionSpec so that we can delete ParsedPartitionSpec

  • _partitions is now canonicalized and only contains tuples, None or UNCONSTRAINED.

  • Cache the creating of sharding on ShapedArray since it's expensive to do it a lot of times

  • Change the __hash__ and __eq__ of NamedSharding to depend on self.spec instead of self._parsed_pspec.

@copybara-service copybara-service bot force-pushed the test_730436599 branch 4 times, most recently from 2521ca3 to 77480b5 Compare February 26, 2025 16:48
* `_partitions` is now canonicalized and only contains `tuples`, `None` or `UNCONSTRAINED`.

* Cache the creating of sharding on ShapedArray since it's expensive to do it a lot of times

* Change the `__hash__` and `__eq__` of `NamedSharding` to depend on `self.spec` instead of `self._parsed_pspec`.

PiperOrigin-RevId: 730436599
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.

1 participant