-
Notifications
You must be signed in to change notification settings - Fork 71
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: include_feedback
breaks when > 10 results AND no expand fields listed
#2541
Conversation
Preview this PR with FeatureBee: https://beta.wandb.ai/?betaVersion=874e2383126a421baa23292d16a4e8f1a9eba727 |
@@ -2664,6 +2664,42 @@ def return_nested_object(nested_obj: NestedObject): | |||
assert call_result.output == nested_ref.uri() | |||
|
|||
|
|||
@pytest.mark.parametrize("batch_size", [1, 11, 101, 120]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why these numbers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this tests batch of 10, 100, and 500. 120 because what if theres an off by one error and we are just getting lucky 🧠
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should add a comment -- these look like magic numbers otherwise. I would make the 10, 100, 500 consts and re-use them here with that comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because of how the tests insert calls synchronously generating 500 calls actually gets pretty expensive, like 60+ seconds expensive. 120 completed in 15 seconds ish. I will add a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah you dont have to do 500, just comments RE: what these numbers mean
# double batch size up to what refs_read_batch can handle | ||
batch_size = min(max_size, batch_size * 2) | ||
# *** Dynamic increase from 10 to 500 *** | ||
batch_size = min(500, batch_size * 10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move this to a top level constant
Simplify dynamic batch size calculation in calls stream to be
10
then100
then a max of500