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

Rename SubPartition to Batch in partitioning types. #17263

Merged

Conversation

danxmoran
Copy link
Contributor

We've been mixing terminology a bit in subsystems that partition inputs. After this commit, we use terms (more) consistently to mean:

  1. "Partition": a set of compatible inputs that can be processed together, but might not be depending on other settings
  2. "Batch": a set of inputs that are actually processed together

We've been mixing terminology a bit in subsystems that partition inputs.
After this commit, we use terms (more) consistently to mean:

  1. "Partition": a set of compatible inputs that _can_ be processed
     together, but might not be depending on other settings
  2. "Batch": a set of inputs that are actually processed together
Copy link
Member

@thejcannon thejcannon left a comment

Choose a reason for hiding this comment

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

LGTM. I like that it matches the option name (batch_size) and is shorter and less hard to type 😄

src/python/pants/core/util_rules/partitions.py Outdated Show resolved Hide resolved
src/python/pants/core/util_rules/partitions.py Outdated Show resolved Hide resolved
@benjyw
Copy link
Sponsor Contributor

benjyw commented Oct 19, 2022

I think this terminology change is excellent! The linguistic distinction between "Partition" and "Batch" is subtle, but I do think they each convey the nuance you've assigned to them. And it will support an API where those two things are disjoint concerns. E.g., the implementer of a test runner would have to care about how to split into Partitions, but might not have to care about batching - a generic "batch by size" mechanism would work in most/all cases.

@stuhood stuhood enabled auto-merge (squash) October 19, 2022 17:41
auto-merge was automatically disabled October 19, 2022 18:09

Head branch was pushed to by a user without write access

@danxmoran
Copy link
Contributor Author

Oops, sorry @stuhood looks like I disabled auto-merge with the last push to update docs 😞

@stuhood stuhood enabled auto-merge (squash) October 19, 2022 18:44
@stuhood stuhood merged commit 08410e5 into pantsbuild:main Oct 19, 2022
@danxmoran danxmoran deleted the danxmoran/rename-subpartition-to-batch branch October 19, 2022 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants