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

Abacn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new 301ffe9b15a [Python] Fix __int__ typo and join_fn type hints in Milvus 
search handler (#40475)
301ffe9b15a is described below

commit 301ffe9b15a0fa582397fdcf9589d08f0555f243
Author: Wangshu <[email protected]>
AuthorDate: Fri Oct 9 07:37:36 2026 -0700

    [Python] Fix __int__ typo and join_fn type hints in Milvus search handler 
(#40475)
    
    Remove the stray MilvusBaseRanker.__int__ (a typo for __init__ that made
    int(ranker) raise TypeError, and the base class has no state to
    initialize), and annotate join_fn with EmbeddableItem, which is what the
    handler actually passes in, instead of Embedding.
    
    Fixes #40474
    
    Co-authored-by: Claude Sonnet 5.5 <[email protected]>
---
 sdks/python/apache_beam/ml/rag/enrichment/milvus_search.py | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/sdks/python/apache_beam/ml/rag/enrichment/milvus_search.py 
b/sdks/python/apache_beam/ml/rag/enrichment/milvus_search.py
index cd310b78470..dfcec7abe6c 100644
--- a/sdks/python/apache_beam/ml/rag/enrichment/milvus_search.py
+++ b/sdks/python/apache_beam/ml/rag/enrichment/milvus_search.py
@@ -32,7 +32,6 @@ from pymilvus import SearchResult
 from pymilvus.exceptions import MilvusException
 
 from apache_beam.ml.rag.types import EmbeddableItem
-from apache_beam.ml.rag.types import Embedding
 from apache_beam.ml.rag.utils import MilvusConnectionParameters
 from apache_beam.ml.rag.utils import MilvusHelpers
 from apache_beam.ml.rag.utils import retry_with_backoff
@@ -96,9 +95,6 @@ class VectorSearchMetrics(Enum):
 
 class MilvusBaseRanker:
   """Base class for ranking algorithms in Milvus hybrid search strategy."""
-  def __int__(self):
-    return
-
   def dict(self):
     return {}
 
@@ -588,6 +584,6 @@ class 
MilvusSearchEnrichmentHandler(EnrichmentSourceHandler[InputT, OutputT]):
     return self._batching_kwargs
 
 
-def join_fn(left: Embedding, right: dict[str, Any]) -> Embedding:
+def join_fn(left: EmbeddableItem, right: dict[str, Any]) -> EmbeddableItem:
   left.metadata['enrichment_data'] = right
   return left

Reply via email to