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

Make Partition into dedicated dataclass #3563

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

Conversation

mr0re1
Copy link
Collaborator

@mr0re1 mr0re1 commented Jan 20, 2025

  • Improve type-constraints;
  • Fixed a bug of using never-defined partition_feature.

@mr0re1 mr0re1 added the release-chore To not include into release notes label Jan 20, 2025
@mr0re1 mr0re1 requested a review from abbas1902 January 20, 2025 05:52
return len(self.nodesets_tpu) > 0

@property
def any_dynamic(self) -> bool:
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: I'd probably name it something like has_dynamic

@@ -180,7 +177,7 @@ def nodeset_dyn_lines(nodeset):
)


def partitionlines(partition, lkp: util.Lookup) -> str:
def partitionlines(partition: Partition, lkp: util.Lookup) -> str:
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Could we change this to partition_lines?

@@ -74,11 +74,11 @@ def test_group_nodes_bulk(mock_create_placements, mock_tpu):
"t": TstNodeset(nodeset_name="t"),
},
partitions={
"p1": TstPartition(
"p1": dict(
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not use the Partition class?

@abbas1902 abbas1902 assigned mr0re1 and unassigned abbas1902 Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-chore To not include into release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants