jrmccluskey commented on code in PR #39194:
URL: https://github.com/apache/beam/pull/39194#discussion_r3538930263
##########
sdks/java/ml/inference/remote/src/main/java/org/apache/beam/sdk/ml/inference/remote/RemoteInference.java:
##########
@@ -164,6 +214,13 @@ public void setupHandler() {
try {
this.modelHandler =
handlerClass.getDeclaredConstructor().newInstance();
this.modelHandler.createClient(parameters);
+ this.throttler =
Review Comment:
Throwing it in the constructor has the problem of the throttler not being
serializable (I forget that this isn't Python and we can't aggressively pickle
most everything.) The code does handle a case where the throttler is null (we
just skip the throttling step) so we should be good to let it be null and take
a 0 delay as not wanting the throttler at all. Updated.
--
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]