tarun-google commented on code in PR #37218:
URL: https://github.com/apache/beam/pull/37218#discussion_r2676073231
##########
sdks/python/apache_beam/ml/inference/base_test.py:
##########
@@ -2071,6 +2071,70 @@ def run_inference(self,
responses.append(model.predict(example))
return responses
+ def test_run_inference_with_rate_limiter(self):
+ class FakeRateLimiter(base.RateLimiter):
+ def __init__(self):
+ super().__init__(namespace='test_namespace')
+
+ def throttle(self, hits_added=1):
+ self.requests_counter.inc()
+ return True
Review Comment:
Thanks for pointing to the source of confusion. I have updated the doc
string to set the expectations of the functions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]