Skip to content

Revert "Update dill requirement in /sdks/python (#36147)"

39c05d3
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

Revert "Update dill requirement from <0.3.2,>=0.3.1.1 to >=0.3.1.1,<0.4.1 in /sdks/python" #36270

Revert "Update dill requirement in /sdks/python (#36147)"
39c05d3
Select commit
Loading
Failed to load commit list.
GitHub Actions / Python 3.12 Test Results (ubuntu-latest) failed Sep 24, 2025 in 0s

2 fail, 5 skipped, 7 pass in 6m 22s

 2 files  2 suites   6m 22s ⏱️
14 tests 7 ✅  5 💤 2 ❌
19 runs  7 ✅ 10 💤 2 ❌

Results for commit 39c05d3.

Annotations

Check warning on line 0 in apache_beam.ml.rag.enrichment.milvus_search_it_test.TestMilvusSearchEnrichment

See this annotation in the file changed.

@github-actions github-actions / Python 3.12 Test Results (ubuntu-latest)

test_filtered_search_with_bm25_full_text_and_batching (apache_beam.ml.rag.enrichment.milvus_search_it_test.TestMilvusSearchEnrichment) failed

sdks/python/test-suites/tox/py312/build/srcs/sdks/python/pytest_py312-ml.xml [took 5m 5s]
Raw output
RuntimeError: pymilvus.exceptions.MilvusException: <MilvusException: (code=2, message=Fail connecting to server on localhost:44911, illegal connection params or server unavailable)> [while running 'Enrichment/Enrichment-RRIO/_Call/ParDo(_CallDoFn)']
>   lifecycle_method()

apache_beam/runners/common.py:1562: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
apache_beam/runners/common.py:602: in apache_beam.runners.common.DoFnInvoker.invoke_setup
    self.signature.setup_lifecycle_method.method_value()
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/io/requestresponse.py:340: in setup
    self._caller.__enter__()
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/ml/rag/enrichment/milvus_search.py:411: in __enter__
    self._client = MilvusClient(**connection_params)
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/milvus_client/milvus_client.py:64: in __init__
    self._using = create_connection(
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/milvus_client/_utils.py:49: in create_connection
    raise ex from ex
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/milvus_client/_utils.py:44: in create_connection
    connections.connect(
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/orm/connections.py:459: in connect
    connect_milvus(**kwargs, user=user, password=password, token=token, db_name=db_name)
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/orm/connections.py:420: in connect_milvus
    raise e from e
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/orm/connections.py:412: in connect_milvus
    gh._wait_for_channel_ready(timeout=timeout)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pymilvus.client.grpc_handler.GrpcHandler object at 0x7f85b214be90>
timeout = 10.0

    def _wait_for_channel_ready(self, timeout: Union[float] = 10):
        if self._channel is None:
            raise MilvusException(
                code=Status.CONNECT_FAILED,
                message="No channel in handler, please setup grpc channel first",
            )
    
        try:
            grpc.channel_ready_future(self._channel).result(timeout=timeout)
            self._setup_identifier_interceptor(self._user, timeout=timeout)
        except grpc.FutureTimeoutError as e:
            self.close()
>           raise MilvusException(
                code=Status.CONNECT_FAILED,
                message=f"Fail connecting to server on {self._address}, illegal connection params or server unavailable",
            ) from e
E           pymilvus.exceptions.MilvusException: <MilvusException: (code=2, message=Fail connecting to server on localhost:44911, illegal connection params or server unavailable)>

target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/client/grpc_handler.py:159: MilvusException

During handling of the above exception, another exception occurred:

self = <apache_beam.ml.rag.enrichment.milvus_search_it_test.TestMilvusSearchEnrichment testMethod=test_filtered_search_with_bm25_full_text_and_batching>

    def test_filtered_search_with_bm25_full_text_and_batching(self):
      test_chunks = [
          Chunk(
              id="query1",
              embedding=Embedding(sparse_embedding=None),
              content=Content(text="This is a test document")),
          Chunk(
              id="query2",
              embedding=Embedding(sparse_embedding=None),
              content=Content(text="Another test document")),
          Chunk(
              id="query3",
              embedding=Embedding(sparse_embedding=None),
              content=Content(text="وثيقة اختبار"))
      ]
    
      filter_condition = 'ARRAY_CONTAINS_ANY(tags, ["healthcare", "banking"])'
    
      anns_field = "sparse_embedding_bm25"
    
      addition_search_params = {"metric_type": KeywordSearchMetrics.BM25.value}
    
      keyword_search_parameters = KeywordSearchParameters(
          anns_field=anns_field,
          limit=10,
          filter=filter_condition,
          search_params=addition_search_params)
    
      search_parameters = MilvusSearchParameters(
          collection_name=MILVUS_IT_CONFIG["collection_name"],
          search_strategy=keyword_search_parameters,
          output_fields=["id", "content", "metadata"],
          round_decimal=1)
    
      collection_load_parameters = MilvusCollectionLoadParameters()
    
      # Force batching.
      min_batch_size, max_batch_size = 2, 2
      handler = MilvusSearchEnrichmentHandler(
          connection_parameters=self._connection_params,
          search_parameters=search_parameters,
          collection_load_parameters=collection_load_parameters,
          min_batch_size=min_batch_size,
          max_batch_size=max_batch_size)
    
      expected_chunks = [
          Chunk(
              id='query1',
              content=Content(text='This is a test document'),
              metadata={
                  'enrichment_data': {
                      'id': [1],
                      'distance': [3.3],
                      'fields': [{
                          'content': 'This is a test document',
                          'metadata': {
                              'language': 'en'
                          },
                          'id': 1
                      }]
                  }
              },
              embedding=Embedding()),
          Chunk(
              id='query2',
              content=Content(text='Another test document'),
              metadata={
                  'enrichment_data': {
                      'id': [1],
                      'distance': [0.8],
                      'fields': [{
                          'content': 'This is a test document',
                          'metadata': {
                              'language': 'en'
                          },
                          'id': 1
                      }]
                  }
              },
              embedding=Embedding()),
          Chunk(
              id='query3',
              content=Content(text='وثيقة اختبار'),
              metadata={
                  'enrichment_data': {
                      'id': [3],
                      'distance': [2.3],
                      'fields': [{
                          'content': 'وثيقة اختبار',
                          'metadata': {
                              'language': 'ar'
                          },
                          'id': 3
                      }]
                  }
              },
              embedding=Embedding())
      ]
    
>     with TestPipeline() as p:

apache_beam/ml/rag/enrichment/milvus_search_it_test.py:810: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/pipeline.py:670: in __exit__
    self.result = self.run()
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/testing/test_pipeline.py:118: in run
    result = super().run(
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/pipeline.py:620: in run
    self._options).run(False)
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/pipeline.py:644: in run
    return self.runner.run_pipeline(self, self._options)
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/runners/direct/direct_runner.py:245: in run_pipeline
    return runner.run_pipeline(pipeline, options)
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py:196: in run_pipeline
    self._latest_run_result = self.run_via_runner_api(
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py:223: in run_via_runner_api
    return self.run_stages(stage_context, stages)
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py:470: in run_stages
    bundle_results = self._execute_bundle(
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py:795: in _execute_bundle
    self._run_bundle(
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py:1034: in _run_bundle
    result, splits = bundle_manager.process_bundle(
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py:1360: in process_bundle
    result_future = self._worker_handler.control_conn.push(process_bundle_req)
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/runners/portability/fn_api_runner/worker_handlers.py:389: in push
    response = self.worker.do_instruction(request)
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/runners/worker/sdk_worker.py:662: in do_instruction
    return getattr(self, request_type)(
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/runners/worker/sdk_worker.py:693: in process_bundle
    bundle_processor = self.bundle_processor_cache.get(
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/runners/worker/sdk_worker.py:514: in get
    processor = bundle_processor.BundleProcessor(
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/runners/worker/bundle_processor.py:1135: in __init__
    op.setup(self.data_sampler)
apache_beam/runners/worker/operations.py:875: in apache_beam.runners.worker.operations.DoOperation.setup
    with self.scoped_start_state:
apache_beam/runners/worker/operations.py:925: in apache_beam.runners.worker.operations.DoOperation.setup
    self.dofn_runner.setup()
apache_beam/runners/common.py:1568: in apache_beam.runners.common.DoFnRunner.setup
    self._invoke_lifecycle_method(self.do_fn_invoker.invoke_setup)
apache_beam/runners/common.py:1564: in apache_beam.runners.common.DoFnRunner._invoke_lifecycle_method
    self._reraise_augmented(exn)
apache_beam/runners/common.py:1609: in apache_beam.runners.common.DoFnRunner._reraise_augmented
    raise new_exn
apache_beam/runners/common.py:1562: in apache_beam.runners.common.DoFnRunner._invoke_lifecycle_method
    lifecycle_method()
apache_beam/runners/common.py:602: in apache_beam.runners.common.DoFnInvoker.invoke_setup
    self.signature.setup_lifecycle_method.method_value()
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/io/requestresponse.py:340: in setup
    self._caller.__enter__()
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/ml/rag/enrichment/milvus_search.py:411: in __enter__
    self._client = MilvusClient(**connection_params)
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/milvus_client/milvus_client.py:64: in __init__
    self._using = create_connection(
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/milvus_client/_utils.py:49: in create_connection
    raise ex from ex
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/milvus_client/_utils.py:44: in create_connection
    connections.connect(
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/orm/connections.py:459: in connect
    connect_milvus(**kwargs, user=user, password=password, token=token, db_name=db_name)
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/orm/connections.py:420: in connect_milvus
    raise e from e
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/orm/connections.py:412: in connect_milvus
    gh._wait_for_channel_ready(timeout=timeout)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pymilvus.client.grpc_handler.GrpcHandler object at 0x7f85b214be90>
timeout = 10.0

    def _wait_for_channel_ready(self, timeout: Union[float] = 10):
        if self._channel is None:
            raise MilvusException(
                code=Status.CONNECT_FAILED,
                message="No channel in handler, please setup grpc channel first",
            )
    
        try:
            grpc.channel_ready_future(self._channel).result(timeout=timeout)
            self._setup_identifier_interceptor(self._user, timeout=timeout)
        except grpc.FutureTimeoutError as e:
            self.close()
>           raise MilvusException(
                code=Status.CONNECT_FAILED,
                message=f"Fail connecting to server on {self._address}, illegal connection params or server unavailable",
            ) from e
E           RuntimeError: pymilvus.exceptions.MilvusException: <MilvusException: (code=2, message=Fail connecting to server on localhost:44911, illegal connection params or server unavailable)> [while running 'Enrichment/Enrichment-RRIO/_Call/ParDo(_CallDoFn)']

target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/client/grpc_handler.py:159: RuntimeError

Check warning on line 0 in apache_beam.ml.rag.enrichment.milvus_search_it_test.TestMilvusSearchEnrichment

See this annotation in the file changed.

@github-actions github-actions / Python 3.12 Test Results (ubuntu-latest)

test_vector_search_with_euclidean_distance (apache_beam.ml.rag.enrichment.milvus_search_it_test.TestMilvusSearchEnrichment) failed

sdks/python/test-suites/tox/py312/build/srcs/sdks/python/pytest_py312-ml.xml [took 16s]
Raw output
RuntimeError: Pipeline job-001 failed in state FAILED: bundle inst003 stage-007 failed:Traceback (most recent call last):
  File "apache_beam/runners/common.py", line 1562, in apache_beam.runners.common.DoFnRunner._invoke_lifecycle_method
    lifecycle_method()
  File "apache_beam/runners/common.py", line 602, in apache_beam.runners.common.DoFnInvoker.invoke_setup
    self.signature.setup_lifecycle_method.method_value()
  File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/io/requestresponse.py", line 340, in setup
    self._caller.__enter__()
  File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/ml/rag/enrichment/milvus_search.py", line 411, in __enter__
    self._client = MilvusClient(**connection_params)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/milvus_client/milvus_client.py", line 64, in __init__
    self._using = create_connection(
                  ^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/milvus_client/_utils.py", line 49, in create_connection
    raise ex from ex
  File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/milvus_client/_utils.py", line 44, in create_connection
    connections.connect(
  File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/orm/connections.py", line 459, in connect
    connect_milvus(**kwargs, user=user, password=password, token=token, db_name=db_name)
  File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/orm/connections.py", line 420, in connect_milvus
    raise e from e
  File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/orm/connections.py", line 412, in connect_milvus
    gh._wait_for_channel_ready(timeout=timeout)
  File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/client/grpc_handler.py", line 159, in _wait_for_channel_ready
    raise MilvusException(
pymilvus.exceptions.MilvusException: <MilvusException: (code=2, message=Fail connecting to server on localhost:44911, illegal connection params or server unavailable)>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
    response = task()
               ^^^^^^
  File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/runners/worker/sdk_worker.py", line 390, in <lambda>
    lambda: self.create_worker().do_instruction(request), request)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/runners/worker/sdk_worker.py", line 662, in do_instruction
    return getattr(self, request_type)(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/runners/worker/sdk_worker.py", line 693, in process_bundle
    bundle_processor = self.bundle_processor_cache.get(
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/runners/worker/sdk_worker.py", line 514, in get
    processor = bundle_processor.BundleProcessor(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1135, in __init__
    op.setup(self.data_sampler)
  File "apache_beam/runners/worker/operations.py", line 875, in apache_beam.runners.worker.operations.DoOperation.setup
    with self.scoped_start_state:
  File "apache_beam/runners/worker/operations.py", line 925, in apache_beam.runners.worker.operations.DoOperation.setup
    self.dofn_runner.setup()
  File "apache_beam/runners/common.py", line 1568, in apache_beam.runners.common.DoFnRunner.setup
    self._invoke_lifecycle_method(self.do_fn_invoker.invoke_setup)
  File "apache_beam/runners/common.py", line 1564, in apache_beam.runners.common.DoFnRunner._invoke_lifecycle_method
    self._reraise_augmented(exn)
  File "apache_beam/runners/common.py", line 1609, in apache_beam.runners.common.DoFnRunner._reraise_augmented
    raise new_exn
  File "apache_beam/runners/common.py", line 1562, in apache_beam.runners.common.DoFnRunner._invoke_lifecycle_method
    lifecycle_method()
  File "apache_beam/runners/common.py", line 602, in apache_beam.runners.common.DoFnInvoker.invoke_setup
    self.signature.setup_lifecycle_method.method_value()
  File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/io/requestresponse.py", line 340, in setup
    self._caller.__enter__()
  File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/ml/rag/enrichment/milvus_search.py", line 411, in __enter__
    self._client = MilvusClient(**connection_params)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/milvus_client/milvus_client.py", line 64, in __init__
    self._using = create_connection(
                  ^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/milvus_client/_utils.py", line 49, in create_connection
    raise ex from ex
  File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/milvus_client/_utils.py", line 44, in create_connection
    connections.connect(
  File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/orm/connections.py", line 459, in connect
    connect_milvus(**kwargs, user=user, password=password, token=token, db_name=db_name)
  File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/orm/connections.py", line 420, in connect_milvus
    raise e from e
  File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/orm/connections.py", line 412, in connect_milvus
    gh._wait_for_channel_ready(timeout=timeout)
  File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/client/grpc_handler.py", line 159, in _wait_for_channel_ready
    raise MilvusException(
RuntimeError: pymilvus.exceptions.MilvusException: <MilvusException: (code=2, message=Fail connecting to server on localhost:44911, illegal connection params or server unavailable)> [while running 'Enrichment/Enrichment-RRIO/_Call/ParDo(_CallDoFn)']
self = <apache_beam.ml.rag.enrichment.milvus_search_it_test.TestMilvusSearchEnrichment testMethod=test_vector_search_with_euclidean_distance>

    def test_vector_search_with_euclidean_distance(self):
      test_chunks = [
          Chunk(
              id="query1",
              embedding=Embedding(dense_embedding=[0.1, 0.2, 0.3]),
              content=Content()),
          Chunk(
              id="query2",
              embedding=Embedding(dense_embedding=[0.2, 0.3, 0.4]),
              content=Content()),
          Chunk(
              id="query3",
              embedding=Embedding(dense_embedding=[0.3, 0.4, 0.5]),
              content=Content())
      ]
    
      anns_field = "dense_embedding_euclidean"
    
      addition_search_params = {
          "metric_type": VectorSearchMetrics.EUCLIDEAN_DISTANCE.value,
          "nprobe": 1
      }
    
      vector_search_parameters = VectorSearchParameters(
          anns_field=anns_field, limit=10, search_params=addition_search_params)
    
      search_parameters = MilvusSearchParameters(
          collection_name=MILVUS_IT_CONFIG["collection_name"],
          search_strategy=vector_search_parameters,
          output_fields=["id", "content", "metadata"],
          round_decimal=1)
    
      collection_load_parameters = MilvusCollectionLoadParameters()
    
      handler = MilvusSearchEnrichmentHandler(
          connection_parameters=self._connection_params,
          search_parameters=search_parameters,
          collection_load_parameters=collection_load_parameters)
    
      expected_chunks = [
          Chunk(
              id='query1',
              content=Content(),
              metadata={
                  'enrichment_data': {
                      'id': [1, 2, 3],
                      'distance': [0.0, 0.0, 0.1],
                      'fields': [{
                          'content': 'This is a test document',
                          'metadata': {
                              'language': 'en'
                          },
                          'id': 1
                      },
                                 {
                                     'content': 'Another test document',
                                     'metadata': {
                                         'language': 'en'
                                     },
                                     'id': 2
                                 },
                                 {
                                     'content': 'وثيقة اختبار',
                                     'metadata': {
                                         'language': 'ar'
                                     },
                                     'id': 3
                                 }]
                  }
              },
              embedding=Embedding(dense_embedding=[0.1, 0.2, 0.3])),
          Chunk(
              id='query2',
              content=Content(),
              metadata={
                  'enrichment_data': {
                      'id': [2, 3, 1],
                      'distance': [0.0, 0.0, 0.0],
                      'fields': [{
                          'content': 'Another test document',
                          'metadata': {
                              'language': 'en'
                          },
                          'id': 2
                      },
                                 {
                                     'content': 'وثيقة اختبار',
                                     'metadata': {
                                         'language': 'ar'
                                     },
                                     'id': 3
                                 },
                                 {
                                     'content': 'This is a test document',
                                     'metadata': {
                                         'language': 'en'
                                     },
                                     'id': 1
                                 }]
                  }
              },
              embedding=Embedding(dense_embedding=[0.2, 0.3, 0.4])),
          Chunk(
              id='query3',
              content=Content(),
              metadata={
                  'enrichment_data': {
                      'id': [3, 2, 1],
                      'distance': [0.0, 0.0, 0.1],
                      'fields': [{
                          'content': 'وثيقة اختبار',
                          'metadata': {
                              'language': 'ar'
                          },
                          'id': 3
                      },
                                 {
                                     'content': 'Another test document',
                                     'metadata': {
                                         'language': 'en'
                                     },
                                     'id': 2
                                 },
                                 {
                                     'content': 'This is a test document',
                                     'metadata': {
                                         'language': 'en'
                                     },
                                     'id': 1
                                 }]
                  }
              },
              embedding=Embedding(dense_embedding=[0.3, 0.4, 0.5]))
      ]
    
>     with TestPipeline() as p:

apache_beam/ml/rag/enrichment/milvus_search_it_test.py:951: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/pipeline.py:670: in __exit__
    self.result = self.run()
target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/testing/test_pipeline.py:122: in run
    state = result.wait_until_finish(duration=self.timeout)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <apache_beam.runners.portability.portable_runner.PipelineResult object at 0x7f85b2135b50>
duration = None

    def wait_until_finish(self, duration=None):
      """
      :param duration: The maximum time in milliseconds to wait for the result of
      the execution. If None or zero, will wait until the pipeline finishes.
      :return: The result of the pipeline, i.e. PipelineResult.
      """
      def read_messages() -> None:
        previous_state = -1
        for message in self._message_stream:
          if message.HasField('message_response'):
            logging.log(
                MESSAGE_LOG_LEVELS[message.message_response.importance],
                "%s",
                message.message_response.message_text)
          else:
            current_state = message.state_response.state
            if current_state != previous_state:
              _LOGGER.info(
                  "Job state changed to %s",
                  self.runner_api_state_to_pipeline_state(current_state))
              previous_state = current_state
          self._messages.append(message)
    
      message_thread = threading.Thread(
          target=read_messages, name='wait_until_finish_read')
      message_thread.daemon = True
      message_thread.start()
    
      if duration:
        state_thread = threading.Thread(
            target=functools.partial(self._observe_state, message_thread),
            name='wait_until_finish_state_observer')
        state_thread.daemon = True
        state_thread.start()
        start_time = time.time()
        duration_secs = duration / 1000
        while (time.time() - start_time < duration_secs and
               state_thread.is_alive()):
          time.sleep(1)
      else:
        self._observe_state(message_thread)
    
      if self._runtime_exception:
>       raise self._runtime_exception
E       RuntimeError: Pipeline job-001 failed in state FAILED: bundle inst003 stage-007 failed:Traceback (most recent call last):
E         File "apache_beam/runners/common.py", line 1562, in apache_beam.runners.common.DoFnRunner._invoke_lifecycle_method
E           lifecycle_method()
E         File "apache_beam/runners/common.py", line 602, in apache_beam.runners.common.DoFnInvoker.invoke_setup
E           self.signature.setup_lifecycle_method.method_value()
E         File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/io/requestresponse.py", line 340, in setup
E           self._caller.__enter__()
E         File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/ml/rag/enrichment/milvus_search.py", line 411, in __enter__
E           self._client = MilvusClient(**connection_params)
E                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/milvus_client/milvus_client.py", line 64, in __init__
E           self._using = create_connection(
E                         ^^^^^^^^^^^^^^^^^^
E         File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/milvus_client/_utils.py", line 49, in create_connection
E           raise ex from ex
E         File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/milvus_client/_utils.py", line 44, in create_connection
E           connections.connect(
E         File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/orm/connections.py", line 459, in connect
E           connect_milvus(**kwargs, user=user, password=password, token=token, db_name=db_name)
E         File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/orm/connections.py", line 420, in connect_milvus
E           raise e from e
E         File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/orm/connections.py", line 412, in connect_milvus
E           gh._wait_for_channel_ready(timeout=timeout)
E         File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/client/grpc_handler.py", line 159, in _wait_for_channel_ready
E           raise MilvusException(
E       pymilvus.exceptions.MilvusException: <MilvusException: (code=2, message=Fail connecting to server on localhost:44911, illegal connection params or server unavailable)>
E       
E       During handling of the above exception, another exception occurred:
E       
E       Traceback (most recent call last):
E         File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
E           response = task()
E                      ^^^^^^
E         File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/runners/worker/sdk_worker.py", line 390, in <lambda>
E           lambda: self.create_worker().do_instruction(request), request)
E                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/runners/worker/sdk_worker.py", line 662, in do_instruction
E           return getattr(self, request_type)(
E                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/runners/worker/sdk_worker.py", line 693, in process_bundle
E           bundle_processor = self.bundle_processor_cache.get(
E                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/runners/worker/sdk_worker.py", line 514, in get
E           processor = bundle_processor.BundleProcessor(
E                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1135, in __init__
E           op.setup(self.data_sampler)
E         File "apache_beam/runners/worker/operations.py", line 875, in apache_beam.runners.worker.operations.DoOperation.setup
E           with self.scoped_start_state:
E         File "apache_beam/runners/worker/operations.py", line 925, in apache_beam.runners.worker.operations.DoOperation.setup
E           self.dofn_runner.setup()
E         File "apache_beam/runners/common.py", line 1568, in apache_beam.runners.common.DoFnRunner.setup
E           self._invoke_lifecycle_method(self.do_fn_invoker.invoke_setup)
E         File "apache_beam/runners/common.py", line 1564, in apache_beam.runners.common.DoFnRunner._invoke_lifecycle_method
E           self._reraise_augmented(exn)
E         File "apache_beam/runners/common.py", line 1609, in apache_beam.runners.common.DoFnRunner._reraise_augmented
E           raise new_exn
E         File "apache_beam/runners/common.py", line 1562, in apache_beam.runners.common.DoFnRunner._invoke_lifecycle_method
E           lifecycle_method()
E         File "apache_beam/runners/common.py", line 602, in apache_beam.runners.common.DoFnInvoker.invoke_setup
E           self.signature.setup_lifecycle_method.method_value()
E         File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/io/requestresponse.py", line 340, in setup
E           self._caller.__enter__()
E         File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/ml/rag/enrichment/milvus_search.py", line 411, in __enter__
E           self._client = MilvusClient(**connection_params)
E                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/milvus_client/milvus_client.py", line 64, in __init__
E           self._using = create_connection(
E                         ^^^^^^^^^^^^^^^^^^
E         File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/milvus_client/_utils.py", line 49, in create_connection
E           raise ex from ex
E         File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/milvus_client/_utils.py", line 44, in create_connection
E           connections.connect(
E         File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/orm/connections.py", line 459, in connect
E           connect_milvus(**kwargs, user=user, password=password, token=token, db_name=db_name)
E         File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/orm/connections.py", line 420, in connect_milvus
E           raise e from e
E         File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/orm/connections.py", line 412, in connect_milvus
E           gh._wait_for_channel_ready(timeout=timeout)
E         File "/home/runner/work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/pymilvus/client/grpc_handler.py", line 159, in _wait_for_channel_ready
E           raise MilvusException(
E       RuntimeError: pymilvus.exceptions.MilvusException: <MilvusException: (code=2, message=Fail connecting to server on localhost:44911, illegal connection params or server unavailable)> [while running 'Enrichment/Enrichment-RRIO/_Call/ParDo(_CallDoFn)']

target/.tox-py312-ml/py312-ml/lib/python3.12/site-packages/apache_beam/runners/portability/portable_runner.py:568: RuntimeError

Check notice on line 0 in .github

See this annotation in the file changed.

@github-actions github-actions / Python 3.12 Test Results (ubuntu-latest)

5 skipped tests found

There are 5 skipped tests, see "Raw output" for the full list of skipped tests.
Raw output
apache_beam.ml.inference.onnx_inference_test
apache_beam.ml.inference.tensorrt_inference_test
apache_beam.ml.inference.xgboost_inference_test
apache_beam.ml.transforms.handlers_test
apache_beam.ml.transforms.tft_test

Check notice on line 0 in .github

See this annotation in the file changed.

@github-actions github-actions / Python 3.12 Test Results (ubuntu-latest)

14 tests found

There are 14 tests, see "Raw output" for the full list of tests.
Raw output
apache_beam.ml.inference.onnx_inference_test
apache_beam.ml.inference.tensorrt_inference_test
apache_beam.ml.inference.xgboost_inference_test
apache_beam.ml.rag.enrichment.milvus_search_it_test.TestMilvusSearchEnrichment ‑ test_empty_input_chunks
apache_beam.ml.rag.enrichment.milvus_search_it_test.TestMilvusSearchEnrichment ‑ test_filtered_search_with_bm25_full_text_and_batching
apache_beam.ml.rag.enrichment.milvus_search_it_test.TestMilvusSearchEnrichment ‑ test_filtered_search_with_cosine_similarity_and_batching
apache_beam.ml.rag.enrichment.milvus_search_it_test.TestMilvusSearchEnrichment ‑ test_hybrid_search
apache_beam.ml.rag.enrichment.milvus_search_it_test.TestMilvusSearchEnrichment ‑ test_invalid_query_on_non_existent_collection
apache_beam.ml.rag.enrichment.milvus_search_it_test.TestMilvusSearchEnrichment ‑ test_invalid_query_on_non_existent_field
apache_beam.ml.rag.enrichment.milvus_search_it_test.TestMilvusSearchEnrichment ‑ test_keyword_search_with_inner_product_sparse_embedding
apache_beam.ml.rag.enrichment.milvus_search_it_test.TestMilvusSearchEnrichment ‑ test_vector_search_with_euclidean_distance
apache_beam.ml.rag.enrichment.milvus_search_it_test.TestMilvusSearchEnrichment ‑ test_vector_search_with_inner_product_similarity
apache_beam.ml.transforms.handlers_test
apache_beam.ml.transforms.tft_test