kerrydc commented on code in PR #26603:
URL: https://github.com/apache/beam/pull/26603#discussion_r1192738151


##########
sdks/python/apache_beam/ml/inference/base.py:
##########
@@ -836,7 +838,12 @@ def get_metrics_collector(self, prefix: str = ''):
 
   def setup(self):
     self._metrics_collector = self.get_metrics_collector()
-    self._model_handler.set_environment_vars()
+    try:
+      self._model_handler.set_environment_vars()
+    except AttributeError:
+      logging.warning(
+          "ModelHander should call super().__init__ or set _env_vars.")

Review Comment:
   Yes, I removed it because it is fully redundant. I removed the warning, 
updating the pydoc instead.



-- 
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]

Reply via email to