You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by da...@apache.org on 2023/08/21 14:14:22 UTC

[beam] branch damccorm-patch-1 created (now bc14eab3c15)

This is an automated email from the ASF dual-hosted git repository.

damccorm pushed a change to branch damccorm-patch-1
in repository https://gitbox.apache.org/repos/asf/beam.git


      at bc14eab3c15 Fix error condition checking

This branch includes the following new commits:

     new bc14eab3c15 Fix error condition checking

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[beam] 01/01: Fix error condition checking

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

damccorm pushed a commit to branch damccorm-patch-1
in repository https://gitbox.apache.org/repos/asf/beam.git

commit bc14eab3c15daf7cfa704a041725c7475bc393fc
Author: Danny McCormick <da...@google.com>
AuthorDate: Mon Aug 21 10:14:15 2023 -0400

    Fix error condition checking
---
 sdks/python/apache_beam/ml/inference/base.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sdks/python/apache_beam/ml/inference/base.py b/sdks/python/apache_beam/ml/inference/base.py
index 5f2b4dc465f..70e9db2b1a9 100644
--- a/sdks/python/apache_beam/ml/inference/base.py
+++ b/sdks/python/apache_beam/ml/inference/base.py
@@ -404,7 +404,7 @@ class KeyedModelHandler(Generic[KeyT, ExampleT, PredictionT, ModelT],
             mh,
             hints)
       batch_kwargs = mh.batch_elements_kwargs()
-      if len(hints) > 0:
+      if len(batch_kwargs) > 0:
         logging.warning(
             'mh %s defines the following batching kwargs which will be '
             'ignored %s. Batching kwargs are not respected when '
@@ -414,7 +414,7 @@ class KeyedModelHandler(Generic[KeyT, ExampleT, PredictionT, ModelT],
             hints,
             batch_kwargs)
       env_vars = mh._env_vars
-      if len(hints) > 0:
+      if len(env_vars) > 0:
         logging.warning(
             'mh %s defines the following _env_vars which will be ignored %s. '
             '_env_vars are not respected when more than one model handler is '