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

Add batching support #2698

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from
Draft

Add batching support #2698

wants to merge 20 commits into from

Conversation

patrick91
Copy link
Member

Needs validation and configuration options

@codecov
Copy link

codecov bot commented Apr 7, 2023

Codecov Report

Merging #2698 (9d62fce) into main (efcd602) will increase coverage by 0.01%.
The diff coverage is 96.66%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2698      +/-   ##
==========================================
+ Coverage   96.11%   96.12%   +0.01%     
==========================================
  Files         211      211              
  Lines        9232     9264      +32     
  Branches     1489     1500      +11     
==========================================
+ Hits         8873     8905      +32     
  Misses        229      229              
  Partials      130      130              

@luisbc92
Copy link

Hi!

I'm currently running my project on top of your feature branch as I transitioned from Graphene over to Strawberry before learning that batching was not supported.

Everything works great! I have yet to run into any issues. Is there a particular reason why integration into main has stalled?

Thank you!

@patrick91
Copy link
Member Author

@luisbc92 just time! thanks for the ping, I'll add to my list of things to do in the next few days 😊

@luisbc92
Copy link

Wow! Fastest response I've ever gotten. You should get a trophy.

Thank you for your work!

@patrick91
Copy link
Member Author

@luisbc92 @Speedy1991 @mikoda1995 do you have any opinions on the configuration options? /cc @bellini666 @erikwrede

CleanShot 2023-07-11 at 14 09 33@2x

@erikwrede
Copy link
Member

I prefer an explicit BatchingConfig.enable_batching over not schema.batching_config <=> batching disabled.

Will do full review later

@bellini666
Copy link
Member

I prefer an explicit BatchingConfig.enable_batching over not schema.batching_config <=> batching disabled.

Will do full review later

I agree with @erikwrede here. Just maybe BatchingConfig.enabled since batching is already implied.

Also, maybe use a TypedDict instead of a dataclass in here? In general I prefer dataclasses, but typeddict would allow to pass the configuration without having to import BatchingConfig and still be properly typed. No strong opinions about this, just a thought that I always have when doing stuff like that =P

Regarding everything else, I took a quick look and it seems fine! :)

@patrick91
Copy link
Member Author

Also, maybe use a TypedDict instead of a dataclass in here? In general I prefer dataclasses, but typeddict would allow to pass the configuration without having to import BatchingConfig and still be properly typed. No strong opinions about this, just a thought that I always have when doing stuff like that =P

I think that would be quite nice, we should do it for the config class too, maybe in another PR (with deprecation and codemod I guess :) )

@codspeed-hq
Copy link

codspeed-hq bot commented Jul 11, 2023

CodSpeed Performance Report

Merging #2698 will not alter performance

Comparing feature/batching-2023 (9d62fce) with main (efcd602)

Summary

✅ 1 untouched benchmarks

@patrick91 patrick91 mentioned this pull request Jul 18, 2023
3 tasks
@cpd67
Copy link

cpd67 commented Sep 17, 2023

Hi! 😃 This would be an awesome feature to have soon, as we're currently thinking of transitioning our project over to using Strawberry and batching is a feature we use a lot. If there's anything I could do to help, let me know and i'd be happy to assist!

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.

5 participants