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

Maximum batch size set by tf_serving pod instead of consumer #449

Open
elaubsch opened this issue Mar 12, 2022 · 1 comment
Open

Maximum batch size set by tf_serving pod instead of consumer #449

elaubsch opened this issue Mar 12, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@elaubsch
Copy link
Member

Describe the bug
The batch size used for each consumer is determined by the batch size of the model run by the consumer. The GrpcModelWrapper.get_batch_size in grpc_clients.py to determine this. The maximum batch size for a consumer is determined with the environment variable TF_MAX_BATCH_SIZE in the helmfile for each consumer. If this value is larger than the maximum batch size set by the environment variable MAX_BATCH_SIZE in the tf-serving helmfile, the prediction will fail.

To Reproduce
Steps to reproduce the behavior:

  1. Set TF_MAX_BATCH_SIZE in the helmfile for the consumer to a number larger than MAX_BATCH_SIZE in the tf-serving helmfile. For example, for the segmentation consumer, set TF_MAX_BATCH_SIZE in the segmentation consumer helmfile to 64 and ensure that MAX_BATCH_SIZE in the tf-serving helmfile is 32.
  2. Upload an image to the kiosk for prediction.
  3. See error: "Task size 64 is larger than maximum input batch size 32"

Expected behavior
Enforce that the maximum batch size of the consumer is smaller than the maximum batch size of tf-serving before prediction.

@elaubsch elaubsch added the bug Something isn't working label Mar 12, 2022
@msschwartz21
Copy link
Member

An additional complication with this issue is that the maximum number of frames that can be tracked is directly limited by the maximum batch size for tensorflow serving.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants