Skip to content

Clean up debug test files

7280297
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Draft

Tdigestdistribution #37109

Clean up debug test files
7280297
Select commit
Loading
Failed to load commit list.
GitHub Actions / Python 3.13 Test Results (self-hosted, ubuntu-20.04, main) failed Dec 15, 2025 in 0s

147 fail, 139 skipped, 200 pass in 6m 49s

  2 files    2 suites   6m 49s ⏱️
486 tests 200 ✅ 139 💤 147 ❌
494 runs  200 ✅ 147 💤 147 ❌

Results for commit 7280297.

Annotations

Check warning on line 0 in apache_beam.ml.anomaly.transforms_test.TestOfflineDetector

See this annotation in the file changed.

@github-actions github-actions / Python 3.13 Test Results (self-hosted, ubuntu-20.04, main)

test_default_inference_fn_0 (apache_beam.ml.anomaly.transforms_test.TestOfflineDetector) failed

sdks/python/test-suites/tox/py313/build/srcs/sdks/python/pytest_py313-ml.xml [took 1m 0s]
Raw output
RuntimeError: Pipeline job-001 failed in state FAILED: bundle inst002 stage-006 failed:Traceback (most recent call last):
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
    response = task()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 390, in <lambda>
    lambda: self.create_worker().do_instruction(request), request)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
    return getattr(self, request_type)(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        getattr(request, request_type), request.instruction_id)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
    monitoring_infos = bundle_processor.monitoring_infos()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
    op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
    all_monitoring_infos = super().monitoring_infos(
        transform_id, tag_to_pcollection_id)
  File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    def monitoring_infos(self, transform_id, tag_to_pcollection_id):
  File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
  File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
    DistributionData(sum, count, min, max),
  File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
    self.tdigest = tdigest
AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes
a = (<apache_beam.ml.anomaly.transforms_test.TestOfflineDetector testMethod=test_default_inference_fn_0>,)
kw = {}

    @wraps(func)
    def standalone_func(*a, **kw):
>       return func(*(a + p.args), **p.kwargs, **kw)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/parameterized/parameterized.py:620: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
apache_beam/ml/anomaly/transforms_test.py:415: in test_default_inference_fn
    with TestPipeline() as p:
         ^^^^^^^^^^^^^^
target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/pipeline.py:671: in __exit__
    self.result = self.run()
                  ^^^^^^^^^^
target/.tox-py313-ml/py313-ml/lib/python3.13/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 0x7bf18ae74c20>
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.
      """
      last_error_text = None
    
      def read_messages() -> None:
        nonlocal last_error_text
        previous_state = -1
        for message in self._message_stream:
          if message.HasField('message_response'):
            mr = message.message_response
            logging.log(MESSAGE_LOG_LEVELS[mr.importance], "%s", mr.message_text)
            if mr.importance == beam_job_api_pb2.JobMessage.JOB_MESSAGE_ERROR:
              last_error_text = mr.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 inst002 stage-006 failed:Traceback (most recent call last):
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
E           response = task()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/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 "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
E           return getattr(self, request_type)(
E                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E               getattr(request, request_type), request.instruction_id)
E               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
E           monitoring_infos = bundle_processor.monitoring_infos()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
E           op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
E           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
E           all_monitoring_infos = super().monitoring_infos(
E               transform_id, tag_to_pcollection_id)
E         File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           def monitoring_infos(self, transform_id, tag_to_pcollection_id):
E         File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
E         File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
E           DistributionData(sum, count, min, max),
E         File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
E           self.tdigest = tdigest
E       AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes

target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/portability/portable_runner.py:571: RuntimeError

Check warning on line 0 in apache_beam.ml.anomaly.detectors.pyod_adapter_test.PyODIForestTest

See this annotation in the file changed.

@github-actions github-actions / Python 3.13 Test Results (self-hosted, ubuntu-20.04, main)

test_scoring_with_unmatched_features (apache_beam.ml.anomaly.detectors.pyod_adapter_test.PyODIForestTest) failed

sdks/python/test-suites/tox/py313/build/srcs/sdks/python/pytest_py313-ml.xml [took 1m 0s]
Raw output
AssertionError: "is expecting 2 features" does not match "Pipeline job-001 failed in state FAILED: bundle inst001 stage-004 failed:Traceback (most recent call last):
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
    response = task()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 390, in <lambda>
    lambda: self.create_worker().do_instruction(request), request)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
    return getattr(self, request_type)(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        getattr(request, request_type), request.instruction_id)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
    monitoring_infos = bundle_processor.monitoring_infos()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
    op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
    all_monitoring_infos = super().monitoring_infos(
        transform_id, tag_to_pcollection_id)
  File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    def monitoring_infos(self, transform_id, tag_to_pcollection_id):
  File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
  File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
    DistributionData(sum, count, min, max),
  File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
    self.tdigest = tdigest
AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes
"
RuntimeError: Pipeline job-001 failed in state FAILED: bundle inst001 stage-004 failed:Traceback (most recent call last):
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
    response = task()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 390, in <lambda>
    lambda: self.create_worker().do_instruction(request), request)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
    return getattr(self, request_type)(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        getattr(request, request_type), request.instruction_id)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
    monitoring_infos = bundle_processor.monitoring_infos()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
    op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
    all_monitoring_infos = super().monitoring_infos(
        transform_id, tag_to_pcollection_id)
  File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    def monitoring_infos(self, transform_id, tag_to_pcollection_id):
  File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
  File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
    DistributionData(sum, count, min, max),
  File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
    self.tdigest = tdigest
AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes


During handling of the above exception, another exception occurred:

self = <apache_beam.ml.anomaly.detectors.pyod_adapter_test.PyODIForestTest testMethod=test_scoring_with_unmatched_features>

    def test_scoring_with_unmatched_features(self):
      # The model is trained with two features: a, b, but the input features of
      # scoring has one more feature (target).
      # In this case, we should either get rid of the extra feature(s) from
      # the scoring input or set `features` when creating the offline detector
      # (see the `test_scoring_with_matched_features`)
      detector = PyODFactory.create_detector(self.pickled_model_uri)
      options = PipelineOptions([])
      # This should raise a ValueError with message
      # "X has 3 features, but IsolationForest is expecting 2 features as input."
>     with self.assertRaisesRegex(Exception, "is expecting 2 features"):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E     AssertionError: "is expecting 2 features" does not match "Pipeline job-001 failed in state FAILED: bundle inst001 stage-004 failed:Traceback (most recent call last):
E       File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
E         response = task()
E       File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/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 "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
E         return getattr(self, request_type)(
E                ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E             getattr(request, request_type), request.instruction_id)
E             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E       File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
E         monitoring_infos = bundle_processor.monitoring_infos()
E       File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
E         op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
E         ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E       File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
E         all_monitoring_infos = super().monitoring_infos(
E             transform_id, tag_to_pcollection_id)
E       File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E         def monitoring_infos(self, transform_id, tag_to_pcollection_id):
E       File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E         self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
E       File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
E         DistributionData(sum, count, min, max),
E       File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
E         self.tdigest = tdigest
E     AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes
E     "

apache_beam/ml/anomaly/detectors/pyod_adapter_test.py:148: AssertionError

Check warning on line 0 in apache_beam.ml.gcp.cloud_dlp_test.TestDeidentifyFn

See this annotation in the file changed.

@github-actions github-actions / Python 3.13 Test Results (self-hosted, ubuntu-20.04, main)

test_deidentify_called (apache_beam.ml.gcp.cloud_dlp_test.TestDeidentifyFn) failed

sdks/python/test-suites/tox/py313/build/srcs/sdks/python/pytest_py313-ml.xml [took 3s]
Raw output
AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes
self = <apache_beam.ml.gcp.cloud_dlp_test.TestDeidentifyFn testMethod=test_deidentify_called>

    def test_deidentify_called(self):
      class ClientMock(object):
        def deidentify_content(self, *args, **kwargs):
          # Check that we can marshal a valid request.
          dlp.DeidentifyContentRequest(kwargs['request'])
    
          called = Metrics.counter('test_deidentify_text', 'called')
          called.inc()
          operation = mock.Mock()
          item = mock.Mock()
          item.value = [None]
          operation.item = item
          return operation
    
        def common_project_path(self, *args):
          return 'test'
    
      with mock.patch('google.cloud.dlp_v2.DlpServiceClient', ClientMock):
        # TODO(https://github.com/apache/beam/issues/34549): This test relies on
        # metrics filtering which doesn't work on Prism yet because Prism renames
        # steps (e.g. "Do" becomes "ref_AppliedPTransform_Do_7").
        # https://github.com/apache/beam/blob/5f9cd73b7c9a2f37f83971ace3a399d633201dd1/sdks/python/apache_beam/runners/portability/fn_api_runner/fn_runner.py#L1590
        p = TestPipeline('FnApiRunner')
        config = {
            "deidentify_config": {
                "info_type_transformations": {
                    "transformations": [{
                        "primitive_transformation": {
                            "character_mask_config": {
                                "masking_character": '#'
                            }
                        }
                    }]
                }
            }
        }
        # pylint: disable=expression-not-assigned
        (
            p
            | beam.Create(['mary.sue@example.com', 'john.doe@example.com'])
            | beam.ParDo(_DeidentifyFn(config=config)))
>       result = p.run()
                 ^^^^^^^

apache_beam/ml/gcp/cloud_dlp_test.py:99: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/testing/test_pipeline.py:118: in run
    result = super().run(
target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/pipeline.py:621: in run
    self._options).run(False)
                   ^^^^^^^^^^
target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/pipeline.py:645: in run
    return self.runner.run_pipeline(self, self._options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
target/.tox-py313-ml/py313-ml/lib/python3.13/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-py313-ml/py313-ml/lib/python3.13/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-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py:470: in run_stages
    bundle_results = self._execute_bundle(
target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py:795: in _execute_bundle
    self._run_bundle(
target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py:1034: in _run_bundle
    result, splits = bundle_manager.process_bundle(
target/.tox-py313-ml/py313-ml/lib/python3.13/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-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/portability/fn_api_runner/worker_handlers.py:391: in push
    response = self.worker.do_instruction(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py:669: in do_instruction
    return getattr(self, request_type)(
target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py:708: in process_bundle
    monitoring_infos = bundle_processor.monitoring_infos()
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py:1431: in monitoring_infos
    op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py:245: in monitoring_infos
    all_monitoring_infos = super().monitoring_infos(
apache_beam/runners/worker/operations.py:578: in apache_beam.runners.worker.operations.Operation.monitoring_infos
    def monitoring_infos(self, transform_id, tag_to_pcollection_id):
apache_beam/runners/worker/operations.py:584: in apache_beam.runners.worker.operations.Operation.monitoring_infos
    self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
apache_beam/runners/worker/operations.py:613: in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
    DistributionData(sum, count, min, max),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   self.tdigest = tdigest
E   AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes

apache_beam/metrics/cells.py:584: AttributeError

Check warning on line 0 in apache_beam.ml.gcp.cloud_dlp_test.TestInspectFn

See this annotation in the file changed.

@github-actions github-actions / Python 3.13 Test Results (self-hosted, ubuntu-20.04, main)

test_inspect_called (apache_beam.ml.gcp.cloud_dlp_test.TestInspectFn) failed

sdks/python/test-suites/tox/py313/build/srcs/sdks/python/pytest_py313-ml.xml [took 5s]
Raw output
AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes
self = <apache_beam.ml.gcp.cloud_dlp_test.TestInspectFn testMethod=test_inspect_called>

    def test_inspect_called(self):
      class ClientMock(object):
        def inspect_content(self, *args, **kwargs):
          # Check that we can marshal a valid request.
          dlp.InspectContentRequest(kwargs['request'])
    
          called = Metrics.counter('test_inspect_text', 'called')
          called.inc()
          operation = mock.Mock()
          operation.result = mock.Mock()
          operation.result.findings = [None]
          return operation
    
        def common_project_path(self, *args):
          return 'test'
    
      with mock.patch('google.cloud.dlp_v2.DlpServiceClient', ClientMock):
        # TODO(https://github.com/apache/beam/issues/34549): This test relies on
        # metrics filtering which doesn't work on Prism yet because Prism renames
        # steps (e.g. "Do" becomes "ref_AppliedPTransform_Do_7").
        # https://github.com/apache/beam/blob/5f9cd73b7c9a2f37f83971ace3a399d633201dd1/sdks/python/apache_beam/runners/portability/fn_api_runner/fn_runner.py#L1590
        p = TestPipeline('FnApiRunner')
        config = {"inspect_config": {"info_types": [{"name": "EMAIL_ADDRESS"}]}}
        # pylint: disable=expression-not-assigned
        (
            p
            | beam.Create(['mary.sue@example.com', 'john.doe@example.com'])
            | beam.ParDo(_InspectFn(config=config)))
>       result = p.run()
                 ^^^^^^^

apache_beam/ml/gcp/cloud_dlp_test.py:144: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/testing/test_pipeline.py:118: in run
    result = super().run(
target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/pipeline.py:621: in run
    self._options).run(False)
                   ^^^^^^^^^^
target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/pipeline.py:645: in run
    return self.runner.run_pipeline(self, self._options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
target/.tox-py313-ml/py313-ml/lib/python3.13/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-py313-ml/py313-ml/lib/python3.13/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-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py:470: in run_stages
    bundle_results = self._execute_bundle(
target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py:795: in _execute_bundle
    self._run_bundle(
target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py:1034: in _run_bundle
    result, splits = bundle_manager.process_bundle(
target/.tox-py313-ml/py313-ml/lib/python3.13/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-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/portability/fn_api_runner/worker_handlers.py:391: in push
    response = self.worker.do_instruction(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py:669: in do_instruction
    return getattr(self, request_type)(
target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py:708: in process_bundle
    monitoring_infos = bundle_processor.monitoring_infos()
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py:1431: in monitoring_infos
    op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py:245: in monitoring_infos
    all_monitoring_infos = super().monitoring_infos(
apache_beam/runners/worker/operations.py:578: in apache_beam.runners.worker.operations.Operation.monitoring_infos
    def monitoring_infos(self, transform_id, tag_to_pcollection_id):
apache_beam/runners/worker/operations.py:584: in apache_beam.runners.worker.operations.Operation.monitoring_infos
    self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
apache_beam/runners/worker/operations.py:613: in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
    DistributionData(sum, count, min, max),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   self.tdigest = tdigest
E   AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes

apache_beam/metrics/cells.py:584: AttributeError

Check warning on line 0 in apache_beam.ml.gcp.recommendations_ai_test.RecommendationsAICatalogItemTest

See this annotation in the file changed.

@github-actions github-actions / Python 3.13 Test Results (self-hosted, ubuntu-20.04, main)

test_CreateCatalogItem (apache_beam.ml.gcp.recommendations_ai_test.RecommendationsAICatalogItemTest) failed

sdks/python/test-suites/tox/py313/build/srcs/sdks/python/pytest_py313-ml.xml [took 24s]
Raw output
RuntimeError: Pipeline job-001 failed in state FAILED: bundle inst001 stage-001 failed:Traceback (most recent call last):
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
    response = task()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 390, in <lambda>
    lambda: self.create_worker().do_instruction(request), request)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
    return getattr(self, request_type)(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        getattr(request, request_type), request.instruction_id)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
    monitoring_infos = bundle_processor.monitoring_infos()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
    op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
    all_monitoring_infos = super().monitoring_infos(
        transform_id, tag_to_pcollection_id)
  File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    def monitoring_infos(self, transform_id, tag_to_pcollection_id):
  File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
  File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
    DistributionData(sum, count, min, max),
  File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
    self.tdigest = tdigest
AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes
self = <apache_beam.ml.gcp.recommendations_ai_test.RecommendationsAICatalogItemTest testMethod=test_CreateCatalogItem>

    def test_CreateCatalogItem(self):
      expected_counter = 1
      with mock.patch.object(recommendations_ai,
                             'get_recommendation_catalog_client',
                             return_value=self._mock_client):
        p = beam.Pipeline()
    
        _ = (
            p | "Create data" >> beam.Create([self._catalog_item])
            | "Create CatalogItem" >>
            recommendations_ai.CreateCatalogItem(project="test"))
    
        result = p.run()
>       result.wait_until_finish()

apache_beam/ml/gcp/recommendations_ai_test.py:74: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <apache_beam.runners.portability.portable_runner.PipelineResult object at 0x7d80509c1a90>
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.
      """
      last_error_text = None
    
      def read_messages() -> None:
        nonlocal last_error_text
        previous_state = -1
        for message in self._message_stream:
          if message.HasField('message_response'):
            mr = message.message_response
            logging.log(MESSAGE_LOG_LEVELS[mr.importance], "%s", mr.message_text)
            if mr.importance == beam_job_api_pb2.JobMessage.JOB_MESSAGE_ERROR:
              last_error_text = mr.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 inst001 stage-001 failed:Traceback (most recent call last):
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
E           response = task()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/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 "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
E           return getattr(self, request_type)(
E                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E               getattr(request, request_type), request.instruction_id)
E               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
E           monitoring_infos = bundle_processor.monitoring_infos()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
E           op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
E           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
E           all_monitoring_infos = super().monitoring_infos(
E               transform_id, tag_to_pcollection_id)
E         File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           def monitoring_infos(self, transform_id, tag_to_pcollection_id):
E         File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
E         File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
E           DistributionData(sum, count, min, max),
E         File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
E           self.tdigest = tdigest
E       AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes

target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/portability/portable_runner.py:571: RuntimeError

Check warning on line 0 in apache_beam.ml.anomaly.transforms_test.TestAnomalyDetection

See this annotation in the file changed.

@github-actions github-actions / Python 3.13 Test Results (self-hosted, ubuntu-20.04, main)

test_multiple_detectors_without_aggregation_0 (apache_beam.ml.anomaly.transforms_test.TestAnomalyDetection) failed

sdks/python/test-suites/tox/py313/build/srcs/sdks/python/pytest_py313-ml.xml [took 7s]
Raw output
RuntimeError: Pipeline job-001 failed in state FAILED: bundle inst002 stage-006 failed:Traceback (most recent call last):
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
    response = task()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 390, in <lambda>
    lambda: self.create_worker().do_instruction(request), request)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
    return getattr(self, request_type)(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        getattr(request, request_type), request.instruction_id)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
    monitoring_infos = bundle_processor.monitoring_infos()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
    op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
    all_monitoring_infos = super().monitoring_infos(
        transform_id, tag_to_pcollection_id)
  File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    def monitoring_infos(self, transform_id, tag_to_pcollection_id):
  File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
  File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
    DistributionData(sum, count, min, max),
  File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
    self.tdigest = tdigest
AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes
a = (<apache_beam.ml.anomaly.transforms_test.TestAnomalyDetection testMethod=test_multiple_detectors_without_aggregation_0>,)
kw = {}

    @wraps(func)
    def standalone_func(*a, **kw):
>       return func(*(a + p.args), **p.kwargs, **kw)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/parameterized/parameterized.py:620: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
apache_beam/ml/anomaly/transforms_test.py:254: in test_multiple_detectors_without_aggregation
    with beam.Pipeline() as p:
         ^^^^^^^^^^^^^^^
target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/pipeline.py:673: in __exit__
    self.result.wait_until_finish()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <apache_beam.runners.portability.portable_runner.PipelineResult object at 0x7f392fa0f230>
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.
      """
      last_error_text = None
    
      def read_messages() -> None:
        nonlocal last_error_text
        previous_state = -1
        for message in self._message_stream:
          if message.HasField('message_response'):
            mr = message.message_response
            logging.log(MESSAGE_LOG_LEVELS[mr.importance], "%s", mr.message_text)
            if mr.importance == beam_job_api_pb2.JobMessage.JOB_MESSAGE_ERROR:
              last_error_text = mr.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 inst002 stage-006 failed:Traceback (most recent call last):
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
E           response = task()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/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 "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
E           return getattr(self, request_type)(
E                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E               getattr(request, request_type), request.instruction_id)
E               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
E           monitoring_infos = bundle_processor.monitoring_infos()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
E           op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
E           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
E           all_monitoring_infos = super().monitoring_infos(
E               transform_id, tag_to_pcollection_id)
E         File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           def monitoring_infos(self, transform_id, tag_to_pcollection_id):
E         File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
E         File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
E           DistributionData(sum, count, min, max),
E         File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
E           self.tdigest = tdigest
E       AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes

target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/portability/portable_runner.py:571: RuntimeError

Check warning on line 0 in apache_beam.ml.anomaly.transforms_test.TestOfflineDetector

See this annotation in the file changed.

@github-actions github-actions / Python 3.13 Test Results (self-hosted, ubuntu-20.04, main)

test_default_inference_fn_1 (apache_beam.ml.anomaly.transforms_test.TestOfflineDetector) failed

sdks/python/test-suites/tox/py313/build/srcs/sdks/python/pytest_py313-ml.xml [took 3s]
Raw output
RuntimeError: Pipeline job-002 failed in state FAILED: bundle inst002 stage-006 failed:Traceback (most recent call last):
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
    response = task()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 390, in <lambda>
    lambda: self.create_worker().do_instruction(request), request)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
    return getattr(self, request_type)(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        getattr(request, request_type), request.instruction_id)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
    monitoring_infos = bundle_processor.monitoring_infos()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
    op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
    all_monitoring_infos = super().monitoring_infos(
        transform_id, tag_to_pcollection_id)
  File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    def monitoring_infos(self, transform_id, tag_to_pcollection_id):
  File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
  File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
    DistributionData(sum, count, min, max),
  File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
    self.tdigest = tdigest
AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes
a = (<apache_beam.ml.anomaly.transforms_test.TestOfflineDetector testMethod=test_default_inference_fn_1>,)
kw = {}

    @wraps(func)
    def standalone_func(*a, **kw):
>       return func(*(a + p.args), **p.kwargs, **kw)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/parameterized/parameterized.py:620: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
apache_beam/ml/anomaly/transforms_test.py:415: in test_default_inference_fn
    with TestPipeline() as p:
         ^^^^^^^^^^^^^^
target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/pipeline.py:671: in __exit__
    self.result = self.run()
                  ^^^^^^^^^^
target/.tox-py313-ml/py313-ml/lib/python3.13/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 0x7bf1881de5d0>
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.
      """
      last_error_text = None
    
      def read_messages() -> None:
        nonlocal last_error_text
        previous_state = -1
        for message in self._message_stream:
          if message.HasField('message_response'):
            mr = message.message_response
            logging.log(MESSAGE_LOG_LEVELS[mr.importance], "%s", mr.message_text)
            if mr.importance == beam_job_api_pb2.JobMessage.JOB_MESSAGE_ERROR:
              last_error_text = mr.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-002 failed in state FAILED: bundle inst002 stage-006 failed:Traceback (most recent call last):
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
E           response = task()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/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 "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
E           return getattr(self, request_type)(
E                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E               getattr(request, request_type), request.instruction_id)
E               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
E           monitoring_infos = bundle_processor.monitoring_infos()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
E           op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
E           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
E           all_monitoring_infos = super().monitoring_infos(
E               transform_id, tag_to_pcollection_id)
E         File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           def monitoring_infos(self, transform_id, tag_to_pcollection_id):
E         File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
E         File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
E           DistributionData(sum, count, min, max),
E         File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
E           self.tdigest = tdigest
E       AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes

target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/portability/portable_runner.py:571: RuntimeError

Check warning on line 0 in apache_beam.ml.anomaly.detectors.pyod_adapter_test.PyODIForestTest

See this annotation in the file changed.

@github-actions github-actions / Python 3.13 Test Results (self-hosted, ubuntu-20.04, main)

test_scoring_with_matched_features_0 (apache_beam.ml.anomaly.detectors.pyod_adapter_test.PyODIForestTest) failed

sdks/python/test-suites/tox/py313/build/srcs/sdks/python/pytest_py313-ml.xml [took 4s]
Raw output
RuntimeError: Pipeline job-001 failed in state FAILED: bundle inst001 stage-006 failed:Traceback (most recent call last):
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
    response = task()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 390, in <lambda>
    lambda: self.create_worker().do_instruction(request), request)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
    return getattr(self, request_type)(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        getattr(request, request_type), request.instruction_id)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
    monitoring_infos = bundle_processor.monitoring_infos()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
    op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
    all_monitoring_infos = super().monitoring_infos(
        transform_id, tag_to_pcollection_id)
  File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    def monitoring_infos(self, transform_id, tag_to_pcollection_id):
  File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
  File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
    DistributionData(sum, count, min, max),
  File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
    self.tdigest = tdigest
AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes
a = (<apache_beam.ml.anomaly.detectors.pyod_adapter_test.PyODIForestTest testMethod=test_scoring_with_matched_features_0>,)
kw = {}

    @wraps(func)
    def standalone_func(*a, **kw):
>       return func(*(a + p.args), **p.kwargs, **kw)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/parameterized/parameterized.py:620: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
apache_beam/ml/anomaly/detectors/pyod_adapter_test.py:130: in test_scoring_with_matched_features
    with beam.Pipeline(options=options) as p:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/pipeline.py:673: in __exit__
    self.result.wait_until_finish()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <apache_beam.runners.portability.portable_runner.PipelineResult object at 0x79b57929de80>
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.
      """
      last_error_text = None
    
      def read_messages() -> None:
        nonlocal last_error_text
        previous_state = -1
        for message in self._message_stream:
          if message.HasField('message_response'):
            mr = message.message_response
            logging.log(MESSAGE_LOG_LEVELS[mr.importance], "%s", mr.message_text)
            if mr.importance == beam_job_api_pb2.JobMessage.JOB_MESSAGE_ERROR:
              last_error_text = mr.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 inst001 stage-006 failed:Traceback (most recent call last):
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
E           response = task()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/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 "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
E           return getattr(self, request_type)(
E                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E               getattr(request, request_type), request.instruction_id)
E               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
E           monitoring_infos = bundle_processor.monitoring_infos()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
E           op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
E           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
E           all_monitoring_infos = super().monitoring_infos(
E               transform_id, tag_to_pcollection_id)
E         File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           def monitoring_infos(self, transform_id, tag_to_pcollection_id):
E         File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
E         File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
E           DistributionData(sum, count, min, max),
E         File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
E           self.tdigest = tdigest
E       AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes

target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/portability/portable_runner.py:571: RuntimeError

Check warning on line 0 in apache_beam.ml.anomaly.transforms_test.TestAnomalyDetection

See this annotation in the file changed.

@github-actions github-actions / Python 3.13 Test Results (self-hosted, ubuntu-20.04, main)

test_multiple_detectors_without_aggregation_1 (apache_beam.ml.anomaly.transforms_test.TestAnomalyDetection) failed

sdks/python/test-suites/tox/py313/build/srcs/sdks/python/pytest_py313-ml.xml [took 3s]
Raw output
RuntimeError: Pipeline job-002 failed in state FAILED: bundle inst001 stage-006 failed:Traceback (most recent call last):
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
    response = task()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 390, in <lambda>
    lambda: self.create_worker().do_instruction(request), request)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
    return getattr(self, request_type)(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        getattr(request, request_type), request.instruction_id)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
    monitoring_infos = bundle_processor.monitoring_infos()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
    op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
    all_monitoring_infos = super().monitoring_infos(
        transform_id, tag_to_pcollection_id)
  File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    def monitoring_infos(self, transform_id, tag_to_pcollection_id):
  File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
  File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
    DistributionData(sum, count, min, max),
  File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
    self.tdigest = tdigest
AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes
a = (<apache_beam.ml.anomaly.transforms_test.TestAnomalyDetection testMethod=test_multiple_detectors_without_aggregation_1>,)
kw = {}

    @wraps(func)
    def standalone_func(*a, **kw):
>       return func(*(a + p.args), **p.kwargs, **kw)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/parameterized/parameterized.py:620: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
apache_beam/ml/anomaly/transforms_test.py:254: in test_multiple_detectors_without_aggregation
    with beam.Pipeline() as p:
         ^^^^^^^^^^^^^^^
target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/pipeline.py:673: in __exit__
    self.result.wait_until_finish()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <apache_beam.runners.portability.portable_runner.PipelineResult object at 0x7f39144f5bd0>
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.
      """
      last_error_text = None
    
      def read_messages() -> None:
        nonlocal last_error_text
        previous_state = -1
        for message in self._message_stream:
          if message.HasField('message_response'):
            mr = message.message_response
            logging.log(MESSAGE_LOG_LEVELS[mr.importance], "%s", mr.message_text)
            if mr.importance == beam_job_api_pb2.JobMessage.JOB_MESSAGE_ERROR:
              last_error_text = mr.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-002 failed in state FAILED: bundle inst001 stage-006 failed:Traceback (most recent call last):
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
E           response = task()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/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 "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
E           return getattr(self, request_type)(
E                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E               getattr(request, request_type), request.instruction_id)
E               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
E           monitoring_infos = bundle_processor.monitoring_infos()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
E           op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
E           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
E           all_monitoring_infos = super().monitoring_infos(
E               transform_id, tag_to_pcollection_id)
E         File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           def monitoring_infos(self, transform_id, tag_to_pcollection_id):
E         File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
E         File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
E           DistributionData(sum, count, min, max),
E         File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
E           self.tdigest = tdigest
E       AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes

target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/portability/portable_runner.py:571: RuntimeError

Check warning on line 0 in apache_beam.ml.gcp.recommendations_ai_test.RecommendationsAIUserEventTest

See this annotation in the file changed.

@github-actions github-actions / Python 3.13 Test Results (self-hosted, ubuntu-20.04, main)

test_CreateUserEvent (apache_beam.ml.gcp.recommendations_ai_test.RecommendationsAIUserEventTest) failed

sdks/python/test-suites/tox/py313/build/srcs/sdks/python/pytest_py313-ml.xml [took 2s]
Raw output
RuntimeError: Pipeline job-002 failed in state FAILED: bundle inst001 stage-001 failed:Traceback (most recent call last):
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
    response = task()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 390, in <lambda>
    lambda: self.create_worker().do_instruction(request), request)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
    return getattr(self, request_type)(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        getattr(request, request_type), request.instruction_id)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
    monitoring_infos = bundle_processor.monitoring_infos()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
    op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
    all_monitoring_infos = super().monitoring_infos(
        transform_id, tag_to_pcollection_id)
  File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    def monitoring_infos(self, transform_id, tag_to_pcollection_id):
  File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
  File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
    DistributionData(sum, count, min, max),
  File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
    self.tdigest = tdigest
AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes
self = <apache_beam.ml.gcp.recommendations_ai_test.RecommendationsAIUserEventTest testMethod=test_CreateUserEvent>

    def test_CreateUserEvent(self):
      expected_counter = 1
      with mock.patch.object(recommendations_ai,
                             'get_recommendation_user_event_client',
                             return_value=self._mock_client):
        p = beam.Pipeline()
    
        _ = (
            p | "Create data" >> beam.Create([self._user_event])
            | "Create UserEvent" >>
            recommendations_ai.WriteUserEvent(project="test"))
    
        result = p.run()
>       result.wait_until_finish()

apache_beam/ml/gcp/recommendations_ai_test.py:137: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <apache_beam.runners.portability.portable_runner.PipelineResult object at 0x7d8050a53250>
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.
      """
      last_error_text = None
    
      def read_messages() -> None:
        nonlocal last_error_text
        previous_state = -1
        for message in self._message_stream:
          if message.HasField('message_response'):
            mr = message.message_response
            logging.log(MESSAGE_LOG_LEVELS[mr.importance], "%s", mr.message_text)
            if mr.importance == beam_job_api_pb2.JobMessage.JOB_MESSAGE_ERROR:
              last_error_text = mr.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-002 failed in state FAILED: bundle inst001 stage-001 failed:Traceback (most recent call last):
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
E           response = task()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/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 "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
E           return getattr(self, request_type)(
E                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E               getattr(request, request_type), request.instruction_id)
E               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
E           monitoring_infos = bundle_processor.monitoring_infos()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
E           op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
E           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
E           all_monitoring_infos = super().monitoring_infos(
E               transform_id, tag_to_pcollection_id)
E         File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           def monitoring_infos(self, transform_id, tag_to_pcollection_id):
E         File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
E         File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
E           DistributionData(sum, count, min, max),
E         File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
E           self.tdigest = tdigest
E       AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes

target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/portability/portable_runner.py:571: RuntimeError

Check warning on line 0 in apache_beam.ml.anomaly.transforms_test.TestAnomalyDetection

See this annotation in the file changed.

@github-actions github-actions / Python 3.13 Test Results (self-hosted, ubuntu-20.04, main)

test_multiple_sub_detectors_with_aggregation_0 (apache_beam.ml.anomaly.transforms_test.TestAnomalyDetection) failed

sdks/python/test-suites/tox/py313/build/srcs/sdks/python/pytest_py313-ml.xml [took 2s]
Raw output
RuntimeError: Pipeline job-003 failed in state FAILED: bundle inst002 stage-006 failed:Traceback (most recent call last):
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
    response = task()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 390, in <lambda>
    lambda: self.create_worker().do_instruction(request), request)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
    return getattr(self, request_type)(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        getattr(request, request_type), request.instruction_id)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
    monitoring_infos = bundle_processor.monitoring_infos()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
    op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
    all_monitoring_infos = super().monitoring_infos(
        transform_id, tag_to_pcollection_id)
  File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    def monitoring_infos(self, transform_id, tag_to_pcollection_id):
  File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
  File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
    DistributionData(sum, count, min, max),
  File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
    self.tdigest = tdigest
AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes
a = (<apache_beam.ml.anomaly.transforms_test.TestAnomalyDetection testMethod=test_multiple_sub_detectors_with_aggregation_0>,)
kw = {}

    @wraps(func)
    def standalone_func(*a, **kw):
>       return func(*(a + p.args), **p.kwargs, **kw)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/parameterized/parameterized.py:620: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
apache_beam/ml/anomaly/transforms_test.py:277: in test_multiple_sub_detectors_with_aggregation
    with beam.Pipeline() as p:
         ^^^^^^^^^^^^^^^
target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/pipeline.py:673: in __exit__
    self.result.wait_until_finish()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <apache_beam.runners.portability.portable_runner.PipelineResult object at 0x7f392c1ad810>
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.
      """
      last_error_text = None
    
      def read_messages() -> None:
        nonlocal last_error_text
        previous_state = -1
        for message in self._message_stream:
          if message.HasField('message_response'):
            mr = message.message_response
            logging.log(MESSAGE_LOG_LEVELS[mr.importance], "%s", mr.message_text)
            if mr.importance == beam_job_api_pb2.JobMessage.JOB_MESSAGE_ERROR:
              last_error_text = mr.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-003 failed in state FAILED: bundle inst002 stage-006 failed:Traceback (most recent call last):
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
E           response = task()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/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 "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
E           return getattr(self, request_type)(
E                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E               getattr(request, request_type), request.instruction_id)
E               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
E           monitoring_infos = bundle_processor.monitoring_infos()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
E           op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
E           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
E           all_monitoring_infos = super().monitoring_infos(
E               transform_id, tag_to_pcollection_id)
E         File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           def monitoring_infos(self, transform_id, tag_to_pcollection_id):
E         File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
E         File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
E           DistributionData(sum, count, min, max),
E         File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
E           self.tdigest = tdigest
E       AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes

target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/portability/portable_runner.py:571: RuntimeError

Check warning on line 0 in apache_beam.ml.anomaly.detectors.pyod_adapter_test.PyODIForestTest

See this annotation in the file changed.

@github-actions github-actions / Python 3.13 Test Results (self-hosted, ubuntu-20.04, main)

test_scoring_with_matched_features_1 (apache_beam.ml.anomaly.detectors.pyod_adapter_test.PyODIForestTest) failed

sdks/python/test-suites/tox/py313/build/srcs/sdks/python/pytest_py313-ml.xml [took 3s]
Raw output
RuntimeError: Pipeline job-002 failed in state FAILED: bundle inst002 stage-006 failed:Traceback (most recent call last):
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
    response = task()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 390, in <lambda>
    lambda: self.create_worker().do_instruction(request), request)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
    return getattr(self, request_type)(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        getattr(request, request_type), request.instruction_id)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
    monitoring_infos = bundle_processor.monitoring_infos()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
    op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
    all_monitoring_infos = super().monitoring_infos(
        transform_id, tag_to_pcollection_id)
  File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    def monitoring_infos(self, transform_id, tag_to_pcollection_id):
  File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
  File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
    DistributionData(sum, count, min, max),
  File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
    self.tdigest = tdigest
AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes
a = (<apache_beam.ml.anomaly.detectors.pyod_adapter_test.PyODIForestTest testMethod=test_scoring_with_matched_features_1>,)
kw = {}

    @wraps(func)
    def standalone_func(*a, **kw):
>       return func(*(a + p.args), **p.kwargs, **kw)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/parameterized/parameterized.py:620: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
apache_beam/ml/anomaly/detectors/pyod_adapter_test.py:130: in test_scoring_with_matched_features
    with beam.Pipeline(options=options) as p:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/pipeline.py:673: in __exit__
    self.result.wait_until_finish()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <apache_beam.runners.portability.portable_runner.PipelineResult object at 0x79b579303d90>
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.
      """
      last_error_text = None
    
      def read_messages() -> None:
        nonlocal last_error_text
        previous_state = -1
        for message in self._message_stream:
          if message.HasField('message_response'):
            mr = message.message_response
            logging.log(MESSAGE_LOG_LEVELS[mr.importance], "%s", mr.message_text)
            if mr.importance == beam_job_api_pb2.JobMessage.JOB_MESSAGE_ERROR:
              last_error_text = mr.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-002 failed in state FAILED: bundle inst002 stage-006 failed:Traceback (most recent call last):
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
E           response = task()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/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 "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
E           return getattr(self, request_type)(
E                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E               getattr(request, request_type), request.instruction_id)
E               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
E           monitoring_infos = bundle_processor.monitoring_infos()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
E           op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
E           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
E           all_monitoring_infos = super().monitoring_infos(
E               transform_id, tag_to_pcollection_id)
E         File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           def monitoring_infos(self, transform_id, tag_to_pcollection_id):
E         File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
E         File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
E           DistributionData(sum, count, min, max),
E         File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
E           self.tdigest = tdigest
E       AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes

target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/portability/portable_runner.py:571: RuntimeError

Check warning on line 0 in apache_beam.ml.anomaly.transforms_test.TestStatelessThresholdDoFn

See this annotation in the file changed.

@github-actions github-actions / Python 3.13 Test Results (self-hosted, ubuntu-20.04, main)

test_dofn_on_multiple_predictions (apache_beam.ml.anomaly.transforms_test.TestStatelessThresholdDoFn) failed

sdks/python/test-suites/tox/py313/build/srcs/sdks/python/pytest_py313-ml.xml [took 3s]
Raw output
RuntimeError: Pipeline job-003 failed in state FAILED: bundle inst001 stage-006 failed:Traceback (most recent call last):
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
    response = task()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 390, in <lambda>
    lambda: self.create_worker().do_instruction(request), request)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
    return getattr(self, request_type)(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        getattr(request, request_type), request.instruction_id)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
    monitoring_infos = bundle_processor.monitoring_infos()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
    op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
    all_monitoring_infos = super().monitoring_infos(
        transform_id, tag_to_pcollection_id)
  File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    def monitoring_infos(self, transform_id, tag_to_pcollection_id):
  File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
  File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
    DistributionData(sum, count, min, max),
  File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
    self.tdigest = tdigest
AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes
self = <apache_beam.ml.anomaly.transforms_test.TestStatelessThresholdDoFn testMethod=test_dofn_on_multiple_predictions>

    def test_dofn_on_multiple_predictions(self):
      input = [
          (
              1,
              (
                  2,
                  AnomalyResult(
                      R,
                      [AnomalyPrediction(score=1), AnomalyPrediction(score=4)]))),
          (
              1,
              (
                  3,
                  AnomalyResult(
                      R,
                      [AnomalyPrediction(score=2), AnomalyPrediction(score=0.5)
                       ]))),
      ]
      expected = [
          (
              1,
              (
                  2,
                  AnomalyResult(
                      R,
                      [
                          AnomalyPrediction(score=1, label=0, threshold=2),
                          AnomalyPrediction(score=4, label=1, threshold=2)
                      ]))),
          (
              1,
              (
                  3,
                  AnomalyResult(
                      R,
                      [
                          AnomalyPrediction(score=2, label=1, threshold=2),
                          AnomalyPrediction(score=0.5, label=0, threshold=2)
                      ]))),
      ]
>     with TestPipeline() as p:
           ^^^^^^^^^^^^^^

apache_beam/ml/anomaly/transforms_test.py:537: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/pipeline.py:671: in __exit__
    self.result = self.run()
                  ^^^^^^^^^^
target/.tox-py313-ml/py313-ml/lib/python3.13/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 0x7bf1881dc2d0>
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.
      """
      last_error_text = None
    
      def read_messages() -> None:
        nonlocal last_error_text
        previous_state = -1
        for message in self._message_stream:
          if message.HasField('message_response'):
            mr = message.message_response
            logging.log(MESSAGE_LOG_LEVELS[mr.importance], "%s", mr.message_text)
            if mr.importance == beam_job_api_pb2.JobMessage.JOB_MESSAGE_ERROR:
              last_error_text = mr.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-003 failed in state FAILED: bundle inst001 stage-006 failed:Traceback (most recent call last):
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
E           response = task()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/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 "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
E           return getattr(self, request_type)(
E                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E               getattr(request, request_type), request.instruction_id)
E               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
E           monitoring_infos = bundle_processor.monitoring_infos()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
E           op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
E           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
E           all_monitoring_infos = super().monitoring_infos(
E               transform_id, tag_to_pcollection_id)
E         File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           def monitoring_infos(self, transform_id, tag_to_pcollection_id):
E         File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
E         File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
E           DistributionData(sum, count, min, max),
E         File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
E           self.tdigest = tdigest
E       AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes

target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/portability/portable_runner.py:571: RuntimeError

Check warning on line 0 in apache_beam.ml.gcp.recommendations_ai_test.RecommendationsAIPredictTest

See this annotation in the file changed.

@github-actions github-actions / Python 3.13 Test Results (self-hosted, ubuntu-20.04, main)

test_Predict (apache_beam.ml.gcp.recommendations_ai_test.RecommendationsAIPredictTest) failed

sdks/python/test-suites/tox/py313/build/srcs/sdks/python/pytest_py313-ml.xml [took 2s]
Raw output
RuntimeError: Pipeline job-003 failed in state FAILED: bundle inst001 stage-001 failed:Traceback (most recent call last):
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
    response = task()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 390, in <lambda>
    lambda: self.create_worker().do_instruction(request), request)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
    return getattr(self, request_type)(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        getattr(request, request_type), request.instruction_id)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
    monitoring_infos = bundle_processor.monitoring_infos()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
    op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
    all_monitoring_infos = super().monitoring_infos(
        transform_id, tag_to_pcollection_id)
  File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    def monitoring_infos(self, transform_id, tag_to_pcollection_id):
  File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
  File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
    DistributionData(sum, count, min, max),
  File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
    self.tdigest = tdigest
AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes
self = <apache_beam.ml.gcp.recommendations_ai_test.RecommendationsAIPredictTest testMethod=test_Predict>

    def test_Predict(self):
      expected_counter = 1
      with mock.patch.object(recommendations_ai,
                             'get_recommendation_prediction_client',
                             return_value=self._mock_client):
        p = beam.Pipeline()
    
        _ = (
            p | "Create data" >> beam.Create([self._user_event])
            | "Prediction UserEvents" >> recommendations_ai.PredictUserEvent(
                project="test", placement_id="recently_viewed_default"))
    
        result = p.run()
>       result.wait_until_finish()

apache_beam/ml/gcp/recommendations_ai_test.py:198: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <apache_beam.runners.portability.portable_runner.PipelineResult object at 0x7d8050928550>
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.
      """
      last_error_text = None
    
      def read_messages() -> None:
        nonlocal last_error_text
        previous_state = -1
        for message in self._message_stream:
          if message.HasField('message_response'):
            mr = message.message_response
            logging.log(MESSAGE_LOG_LEVELS[mr.importance], "%s", mr.message_text)
            if mr.importance == beam_job_api_pb2.JobMessage.JOB_MESSAGE_ERROR:
              last_error_text = mr.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-003 failed in state FAILED: bundle inst001 stage-001 failed:Traceback (most recent call last):
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
E           response = task()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/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 "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
E           return getattr(self, request_type)(
E                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E               getattr(request, request_type), request.instruction_id)
E               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
E           monitoring_infos = bundle_processor.monitoring_infos()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
E           op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
E           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
E           all_monitoring_infos = super().monitoring_infos(
E               transform_id, tag_to_pcollection_id)
E         File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           def monitoring_infos(self, transform_id, tag_to_pcollection_id):
E         File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
E         File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
E           DistributionData(sum, count, min, max),
E         File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
E           self.tdigest = tdigest
E       AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes

target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/portability/portable_runner.py:571: RuntimeError

Check warning on line 0 in apache_beam.ml.anomaly.transforms_test.TestAnomalyDetection

See this annotation in the file changed.

@github-actions github-actions / Python 3.13 Test Results (self-hosted, ubuntu-20.04, main)

test_multiple_sub_detectors_with_aggregation_1 (apache_beam.ml.anomaly.transforms_test.TestAnomalyDetection) failed

sdks/python/test-suites/tox/py313/build/srcs/sdks/python/pytest_py313-ml.xml [took 3s]
Raw output
RuntimeError: Pipeline job-004 failed in state FAILED: bundle inst002 stage-006 failed:Traceback (most recent call last):
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
    response = task()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 390, in <lambda>
    lambda: self.create_worker().do_instruction(request), request)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
    return getattr(self, request_type)(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        getattr(request, request_type), request.instruction_id)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
    monitoring_infos = bundle_processor.monitoring_infos()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
    op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
    all_monitoring_infos = super().monitoring_infos(
        transform_id, tag_to_pcollection_id)
  File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    def monitoring_infos(self, transform_id, tag_to_pcollection_id):
  File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
  File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
    DistributionData(sum, count, min, max),
  File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
    self.tdigest = tdigest
AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes
a = (<apache_beam.ml.anomaly.transforms_test.TestAnomalyDetection testMethod=test_multiple_sub_detectors_with_aggregation_1>,)
kw = {}

    @wraps(func)
    def standalone_func(*a, **kw):
>       return func(*(a + p.args), **p.kwargs, **kw)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/parameterized/parameterized.py:620: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
apache_beam/ml/anomaly/transforms_test.py:277: in test_multiple_sub_detectors_with_aggregation
    with beam.Pipeline() as p:
         ^^^^^^^^^^^^^^^
target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/pipeline.py:673: in __exit__
    self.result.wait_until_finish()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <apache_beam.runners.portability.portable_runner.PipelineResult object at 0x7f391467cb00>
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.
      """
      last_error_text = None
    
      def read_messages() -> None:
        nonlocal last_error_text
        previous_state = -1
        for message in self._message_stream:
          if message.HasField('message_response'):
            mr = message.message_response
            logging.log(MESSAGE_LOG_LEVELS[mr.importance], "%s", mr.message_text)
            if mr.importance == beam_job_api_pb2.JobMessage.JOB_MESSAGE_ERROR:
              last_error_text = mr.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-004 failed in state FAILED: bundle inst002 stage-006 failed:Traceback (most recent call last):
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
E           response = task()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/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 "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
E           return getattr(self, request_type)(
E                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E               getattr(request, request_type), request.instruction_id)
E               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
E           monitoring_infos = bundle_processor.monitoring_infos()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
E           op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
E           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
E           all_monitoring_infos = super().monitoring_infos(
E               transform_id, tag_to_pcollection_id)
E         File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           def monitoring_infos(self, transform_id, tag_to_pcollection_id):
E         File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
E         File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
E           DistributionData(sum, count, min, max),
E         File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
E           self.tdigest = tdigest
E       AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes

target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/portability/portable_runner.py:571: RuntimeError

Check warning on line 0 in apache_beam.ml.gcp.videointelligenceml_test.VideoIntelligenceTest

See this annotation in the file changed.

@github-actions github-actions / Python 3.13 Test Results (self-hosted, ubuntu-20.04, main)

test_AnnotateVideo_URIs (apache_beam.ml.gcp.videointelligenceml_test.VideoIntelligenceTest) failed

sdks/python/test-suites/tox/py313/build/srcs/sdks/python/pytest_py313-ml.xml [took 2s]
Raw output
RuntimeError: Pipeline job-003 failed in state FAILED: bundle inst001 stage-004 failed:Traceback (most recent call last):
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
    response = task()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 390, in <lambda>
    lambda: self.create_worker().do_instruction(request), request)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
    return getattr(self, request_type)(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        getattr(request, request_type), request.instruction_id)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
    monitoring_infos = bundle_processor.monitoring_infos()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
    op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
    all_monitoring_infos = super().monitoring_infos(
        transform_id, tag_to_pcollection_id)
  File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    def monitoring_infos(self, transform_id, tag_to_pcollection_id):
  File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
  File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
    DistributionData(sum, count, min, max),
  File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
    self.tdigest = tdigest
AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes
self = <apache_beam.ml.gcp.videointelligenceml_test.VideoIntelligenceTest testMethod=test_AnnotateVideo_URIs>

    def test_AnnotateVideo_URIs(self):
      videos_to_annotate = [
          'gs://cloud-samples-data/video/cat.mp4',
          'gs://cloud-samples-data/video/cat.mp4'
      ]
      expected_counter = len(videos_to_annotate)
      with mock.patch.object(videointelligenceml,
                             'get_videointelligence_client',
                             return_value=self._mock_client):
        p = beam.Pipeline()
        _ = (
            p
            | "Create data" >> beam.Create(videos_to_annotate)
            |
            "Annotate video" >> videointelligenceml.AnnotateVideo(self.features))
        result = p.run()
>       result.wait_until_finish()

apache_beam/ml/gcp/videointelligenceml_test.py:107: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <apache_beam.runners.portability.portable_runner.PipelineResult object at 0x79b5781f1450>
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.
      """
      last_error_text = None
    
      def read_messages() -> None:
        nonlocal last_error_text
        previous_state = -1
        for message in self._message_stream:
          if message.HasField('message_response'):
            mr = message.message_response
            logging.log(MESSAGE_LOG_LEVELS[mr.importance], "%s", mr.message_text)
            if mr.importance == beam_job_api_pb2.JobMessage.JOB_MESSAGE_ERROR:
              last_error_text = mr.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-003 failed in state FAILED: bundle inst001 stage-004 failed:Traceback (most recent call last):
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
E           response = task()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/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 "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
E           return getattr(self, request_type)(
E                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E               getattr(request, request_type), request.instruction_id)
E               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
E           monitoring_infos = bundle_processor.monitoring_infos()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
E           op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
E           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
E           all_monitoring_infos = super().monitoring_infos(
E               transform_id, tag_to_pcollection_id)
E         File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           def monitoring_infos(self, transform_id, tag_to_pcollection_id):
E         File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
E         File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
E           DistributionData(sum, count, min, max),
E         File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
E           self.tdigest = tdigest
E       AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes

target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/portability/portable_runner.py:571: RuntimeError

Check warning on line 0 in apache_beam.ml.anomaly.transforms_test.TestStatelessThresholdDoFn

See this annotation in the file changed.

@github-actions github-actions / Python 3.13 Test Results (self-hosted, ubuntu-20.04, main)

test_dofn_on_single_prediction (apache_beam.ml.anomaly.transforms_test.TestStatelessThresholdDoFn) failed

sdks/python/test-suites/tox/py313/build/srcs/sdks/python/pytest_py313-ml.xml [took 3s]
Raw output
RuntimeError: Pipeline job-004 failed in state FAILED: bundle inst002 stage-006 failed:Traceback (most recent call last):
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
    response = task()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 390, in <lambda>
    lambda: self.create_worker().do_instruction(request), request)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
    return getattr(self, request_type)(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        getattr(request, request_type), request.instruction_id)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
    monitoring_infos = bundle_processor.monitoring_infos()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
    op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
    all_monitoring_infos = super().monitoring_infos(
        transform_id, tag_to_pcollection_id)
  File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    def monitoring_infos(self, transform_id, tag_to_pcollection_id):
  File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
  File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
    DistributionData(sum, count, min, max),
  File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
    self.tdigest = tdigest
AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes
self = <apache_beam.ml.anomaly.transforms_test.TestStatelessThresholdDoFn testMethod=test_dofn_on_single_prediction>

    def test_dofn_on_single_prediction(self):
      input = [
          (1, (2, AnomalyResult(R, [AnomalyPrediction(score=1)]))),
          (1, (3, AnomalyResult(R, [AnomalyPrediction(score=2)]))),
          (1, (4, AnomalyResult(R, [AnomalyPrediction(score=3)]))),
      ]
      expected = [
          (
              1,
              (
                  2,
                  AnomalyResult(
                      R, [AnomalyPrediction(score=1, label=0, threshold=2)]))),
          (
              1,
              (
                  3,
                  AnomalyResult(
                      R, [AnomalyPrediction(score=2, label=1, threshold=2)]))),
          (
              1,
              (
                  4,
                  AnomalyResult(
                      R, [AnomalyPrediction(score=3, label=1, threshold=2)]))),
      ]
>     with TestPipeline() as p:
           ^^^^^^^^^^^^^^

apache_beam/ml/anomaly/transforms_test.py:487: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/pipeline.py:671: in __exit__
    self.result = self.run()
                  ^^^^^^^^^^
target/.tox-py313-ml/py313-ml/lib/python3.13/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 0x7bf1885bc510>
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.
      """
      last_error_text = None
    
      def read_messages() -> None:
        nonlocal last_error_text
        previous_state = -1
        for message in self._message_stream:
          if message.HasField('message_response'):
            mr = message.message_response
            logging.log(MESSAGE_LOG_LEVELS[mr.importance], "%s", mr.message_text)
            if mr.importance == beam_job_api_pb2.JobMessage.JOB_MESSAGE_ERROR:
              last_error_text = mr.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-004 failed in state FAILED: bundle inst002 stage-006 failed:Traceback (most recent call last):
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
E           response = task()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/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 "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
E           return getattr(self, request_type)(
E                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E               getattr(request, request_type), request.instruction_id)
E               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
E           monitoring_infos = bundle_processor.monitoring_infos()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
E           op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
E           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
E           all_monitoring_infos = super().monitoring_infos(
E               transform_id, tag_to_pcollection_id)
E         File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           def monitoring_infos(self, transform_id, tag_to_pcollection_id):
E         File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
E         File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
E           DistributionData(sum, count, min, max),
E         File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
E           self.tdigest = tdigest
E       AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes

target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/portability/portable_runner.py:571: RuntimeError

Check warning on line 0 in apache_beam.ml.anomaly.transforms_test.TestAnomalyDetection

See this annotation in the file changed.

@github-actions github-actions / Python 3.13 Test Results (self-hosted, ubuntu-20.04, main)

test_one_detector_0 (apache_beam.ml.anomaly.transforms_test.TestAnomalyDetection) failed

sdks/python/test-suites/tox/py313/build/srcs/sdks/python/pytest_py313-ml.xml [took 3s]
Raw output
RuntimeError: Pipeline job-005 failed in state FAILED: bundle inst002 stage-006 failed:Traceback (most recent call last):
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
    response = task()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 390, in <lambda>
    lambda: self.create_worker().do_instruction(request), request)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
    return getattr(self, request_type)(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        getattr(request, request_type), request.instruction_id)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
    monitoring_infos = bundle_processor.monitoring_infos()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
    op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
    all_monitoring_infos = super().monitoring_infos(
        transform_id, tag_to_pcollection_id)
  File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    def monitoring_infos(self, transform_id, tag_to_pcollection_id):
  File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
  File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
    DistributionData(sum, count, min, max),
  File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
    self.tdigest = tdigest
AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes
a = (<apache_beam.ml.anomaly.transforms_test.TestAnomalyDetection testMethod=test_one_detector_0>,)
kw = {}

    @wraps(func)
    def standalone_func(*a, **kw):
>       return func(*(a + p.args), **p.kwargs, **kw)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/parameterized/parameterized.py:620: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
apache_beam/ml/anomaly/transforms_test.py:233: in test_one_detector
    with TestPipeline() as p:
         ^^^^^^^^^^^^^^
target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/pipeline.py:671: in __exit__
    self.result = self.run()
                  ^^^^^^^^^^
target/.tox-py313-ml/py313-ml/lib/python3.13/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 0x7f391467da70>
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.
      """
      last_error_text = None
    
      def read_messages() -> None:
        nonlocal last_error_text
        previous_state = -1
        for message in self._message_stream:
          if message.HasField('message_response'):
            mr = message.message_response
            logging.log(MESSAGE_LOG_LEVELS[mr.importance], "%s", mr.message_text)
            if mr.importance == beam_job_api_pb2.JobMessage.JOB_MESSAGE_ERROR:
              last_error_text = mr.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-005 failed in state FAILED: bundle inst002 stage-006 failed:Traceback (most recent call last):
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
E           response = task()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/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 "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
E           return getattr(self, request_type)(
E                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E               getattr(request, request_type), request.instruction_id)
E               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
E           monitoring_infos = bundle_processor.monitoring_infos()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
E           op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
E           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
E           all_monitoring_infos = super().monitoring_infos(
E               transform_id, tag_to_pcollection_id)
E         File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           def monitoring_infos(self, transform_id, tag_to_pcollection_id):
E         File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
E         File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
E           DistributionData(sum, count, min, max),
E         File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
E           self.tdigest = tdigest
E       AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes

target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/portability/portable_runner.py:571: RuntimeError

Check warning on line 0 in apache_beam.ml.gcp.videointelligenceml_test.VideoIntelligenceTest

See this annotation in the file changed.

@github-actions github-actions / Python 3.13 Test Results (self-hosted, ubuntu-20.04, main)

test_AnnotateVideo_b64_content (apache_beam.ml.gcp.videointelligenceml_test.VideoIntelligenceTest) failed

sdks/python/test-suites/tox/py313/build/srcs/sdks/python/pytest_py313-ml.xml [took 2s]
Raw output
RuntimeError: Pipeline job-004 failed in state FAILED: bundle inst001 stage-004 failed:Traceback (most recent call last):
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
    response = task()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 390, in <lambda>
    lambda: self.create_worker().do_instruction(request), request)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
    return getattr(self, request_type)(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        getattr(request, request_type), request.instruction_id)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
    monitoring_infos = bundle_processor.monitoring_infos()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
    op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
    all_monitoring_infos = super().monitoring_infos(
        transform_id, tag_to_pcollection_id)
  File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    def monitoring_infos(self, transform_id, tag_to_pcollection_id):
  File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
  File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
    DistributionData(sum, count, min, max),
  File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
    self.tdigest = tdigest
AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes
self = <apache_beam.ml.gcp.videointelligenceml_test.VideoIntelligenceTest testMethod=test_AnnotateVideo_b64_content>

    def test_AnnotateVideo_b64_content(self):
      base_64_encoded_video = \
        b'YmVnaW4gNjQ0IGNhdC12aWRlby5tcDRNICAgICgmOVQ+NyFNPCMwUi4uZmFrZV92aWRlb'
      videos_to_annotate = [
          base_64_encoded_video,
          base_64_encoded_video,
          base_64_encoded_video,
      ]
      expected_counter = len(videos_to_annotate)
      with mock.patch.object(videointelligenceml,
                             'get_videointelligence_client',
                             return_value=self._mock_client):
        p = beam.Pipeline()
        _ = (
            p
            | "Create data" >> beam.Create(videos_to_annotate)
            |
            "Annotate video" >> videointelligenceml.AnnotateVideo(self.features))
        result = p.run()
>       result.wait_until_finish()

apache_beam/ml/gcp/videointelligenceml_test.py:161: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <apache_beam.runners.portability.portable_runner.PipelineResult object at 0x79b5792d69e0>
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.
      """
      last_error_text = None
    
      def read_messages() -> None:
        nonlocal last_error_text
        previous_state = -1
        for message in self._message_stream:
          if message.HasField('message_response'):
            mr = message.message_response
            logging.log(MESSAGE_LOG_LEVELS[mr.importance], "%s", mr.message_text)
            if mr.importance == beam_job_api_pb2.JobMessage.JOB_MESSAGE_ERROR:
              last_error_text = mr.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-004 failed in state FAILED: bundle inst001 stage-004 failed:Traceback (most recent call last):
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
E           response = task()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/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 "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
E           return getattr(self, request_type)(
E                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E               getattr(request, request_type), request.instruction_id)
E               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
E           monitoring_infos = bundle_processor.monitoring_infos()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
E           op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
E           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
E           all_monitoring_infos = super().monitoring_infos(
E               transform_id, tag_to_pcollection_id)
E         File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           def monitoring_infos(self, transform_id, tag_to_pcollection_id):
E         File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
E         File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
E           DistributionData(sum, count, min, max),
E         File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
E           self.tdigest = tdigest
E       AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes

target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/portability/portable_runner.py:571: RuntimeError

Check warning on line 0 in apache_beam.ml.anomaly.transforms_test.TestStatefulThresholdDoFn

See this annotation in the file changed.

@github-actions github-actions / Python 3.13 Test Results (self-hosted, ubuntu-20.04, main)

test_dofn_on_single_prediction (apache_beam.ml.anomaly.transforms_test.TestStatefulThresholdDoFn) failed

sdks/python/test-suites/tox/py313/build/srcs/sdks/python/pytest_py313-ml.xml [took 2s]
Raw output
RuntimeError: Pipeline job-005 failed in state FAILED: bundle inst002 stage-006 failed:Traceback (most recent call last):
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
    response = task()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 390, in <lambda>
    lambda: self.create_worker().do_instruction(request), request)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
    return getattr(self, request_type)(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        getattr(request, request_type), request.instruction_id)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
    monitoring_infos = bundle_processor.monitoring_infos()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
    op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
    all_monitoring_infos = super().monitoring_infos(
        transform_id, tag_to_pcollection_id)
  File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    def monitoring_infos(self, transform_id, tag_to_pcollection_id):
  File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
  File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
    DistributionData(sum, count, min, max),
  File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
    self.tdigest = tdigest
AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes
self = <apache_beam.ml.anomaly.transforms_test.TestStatefulThresholdDoFn testMethod=test_dofn_on_single_prediction>

    def test_dofn_on_single_prediction(self):
      # use the input data with two keys to test stateful threshold function
      input = [
          (1, (2, AnomalyResult(R, [AnomalyPrediction(score=1)]))),
          (1, (3, AnomalyResult(R, [AnomalyPrediction(score=2)]))),
          (1, (4, AnomalyResult(R, [AnomalyPrediction(score=3)]))),
          (2, (2, AnomalyResult(R, [AnomalyPrediction(score=10)]))),
          (2, (3, AnomalyResult(R, [AnomalyPrediction(score=20)]))),
          (2, (4, AnomalyResult(R, [AnomalyPrediction(score=30)]))),
      ]
      expected = [
          (
              1,
              (
                  2,
                  AnomalyResult(
                      R, [AnomalyPrediction(score=1, label=1, threshold=1)]))),
          (
              1,
              (
                  3,
                  AnomalyResult(
                      R, [AnomalyPrediction(score=2, label=1, threshold=1.5)]))),
          (
              2,
              (
                  2,
                  AnomalyResult(
                      R, [AnomalyPrediction(score=10, label=1, threshold=10)]))),
          (
              2,
              (
                  3,
                  AnomalyResult(
                      R, [AnomalyPrediction(score=20, label=1, threshold=15)]))),
          (
              1,
              (
                  4,
                  AnomalyResult(
                      R, [AnomalyPrediction(score=3, label=1, threshold=2)]))),
          (
              2,
              (
                  4,
                  AnomalyResult(
                      R, [AnomalyPrediction(score=30, label=1, threshold=20)]))),
      ]
>     with TestPipeline() as p:
           ^^^^^^^^^^^^^^

apache_beam/ml/anomaly/transforms_test.py:598: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/pipeline.py:671: in __exit__
    self.result = self.run()
                  ^^^^^^^^^^
target/.tox-py313-ml/py313-ml/lib/python3.13/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 0x7bf1885bc640>
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.
      """
      last_error_text = None
    
      def read_messages() -> None:
        nonlocal last_error_text
        previous_state = -1
        for message in self._message_stream:
          if message.HasField('message_response'):
            mr = message.message_response
            logging.log(MESSAGE_LOG_LEVELS[mr.importance], "%s", mr.message_text)
            if mr.importance == beam_job_api_pb2.JobMessage.JOB_MESSAGE_ERROR:
              last_error_text = mr.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-005 failed in state FAILED: bundle inst002 stage-006 failed:Traceback (most recent call last):
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
E           response = task()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/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 "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
E           return getattr(self, request_type)(
E                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E               getattr(request, request_type), request.instruction_id)
E               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
E           monitoring_infos = bundle_processor.monitoring_infos()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
E           op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
E           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
E           all_monitoring_infos = super().monitoring_infos(
E               transform_id, tag_to_pcollection_id)
E         File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           def monitoring_infos(self, transform_id, tag_to_pcollection_id):
E         File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
E         File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
E           DistributionData(sum, count, min, max),
E         File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
E           self.tdigest = tdigest
E       AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes

target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/portability/portable_runner.py:571: RuntimeError

Check warning on line 0 in apache_beam.ml.anomaly.transforms_test.TestAnomalyDetection

See this annotation in the file changed.

@github-actions github-actions / Python 3.13 Test Results (self-hosted, ubuntu-20.04, main)

test_one_detector_1 (apache_beam.ml.anomaly.transforms_test.TestAnomalyDetection) failed

sdks/python/test-suites/tox/py313/build/srcs/sdks/python/pytest_py313-ml.xml [took 3s]
Raw output
RuntimeError: Pipeline job-006 failed in state FAILED: bundle inst001 stage-006 failed:Traceback (most recent call last):
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
    response = task()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 390, in <lambda>
    lambda: self.create_worker().do_instruction(request), request)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
    return getattr(self, request_type)(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        getattr(request, request_type), request.instruction_id)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
    monitoring_infos = bundle_processor.monitoring_infos()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
    op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
    all_monitoring_infos = super().monitoring_infos(
        transform_id, tag_to_pcollection_id)
  File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    def monitoring_infos(self, transform_id, tag_to_pcollection_id):
  File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
  File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
    DistributionData(sum, count, min, max),
  File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
    self.tdigest = tdigest
AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes
a = (<apache_beam.ml.anomaly.transforms_test.TestAnomalyDetection testMethod=test_one_detector_1>,)
kw = {}

    @wraps(func)
    def standalone_func(*a, **kw):
>       return func(*(a + p.args), **p.kwargs, **kw)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/parameterized/parameterized.py:620: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
apache_beam/ml/anomaly/transforms_test.py:233: in test_one_detector
    with TestPipeline() as p:
         ^^^^^^^^^^^^^^
target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/pipeline.py:671: in __exit__
    self.result = self.run()
                  ^^^^^^^^^^
target/.tox-py313-ml/py313-ml/lib/python3.13/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 0x7f3914349eb0>
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.
      """
      last_error_text = None
    
      def read_messages() -> None:
        nonlocal last_error_text
        previous_state = -1
        for message in self._message_stream:
          if message.HasField('message_response'):
            mr = message.message_response
            logging.log(MESSAGE_LOG_LEVELS[mr.importance], "%s", mr.message_text)
            if mr.importance == beam_job_api_pb2.JobMessage.JOB_MESSAGE_ERROR:
              last_error_text = mr.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-006 failed in state FAILED: bundle inst001 stage-006 failed:Traceback (most recent call last):
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
E           response = task()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/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 "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
E           return getattr(self, request_type)(
E                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E               getattr(request, request_type), request.instruction_id)
E               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
E           monitoring_infos = bundle_processor.monitoring_infos()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
E           op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
E           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
E           all_monitoring_infos = super().monitoring_infos(
E               transform_id, tag_to_pcollection_id)
E         File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           def monitoring_infos(self, transform_id, tag_to_pcollection_id):
E         File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
E         File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
E           DistributionData(sum, count, min, max),
E         File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
E           self.tdigest = tdigest
E       AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes

target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/portability/portable_runner.py:571: RuntimeError

Check warning on line 0 in apache_beam.ml.gcp.videointelligenceml_test.VideoIntelligenceTest

See this annotation in the file changed.

@github-actions github-actions / Python 3.13 Test Results (self-hosted, ubuntu-20.04, main)

test_AnnotateVideo_with_side_input_context (apache_beam.ml.gcp.videointelligenceml_test.VideoIntelligenceTest) failed

sdks/python/test-suites/tox/py313/build/srcs/sdks/python/pytest_py313-ml.xml [took 2s]
Raw output
RuntimeError: Pipeline job-005 failed in state FAILED: bundle inst002 stage-010 failed:Traceback (most recent call last):
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
    response = task()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 390, in <lambda>
    lambda: self.create_worker().do_instruction(request), request)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
    return getattr(self, request_type)(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        getattr(request, request_type), request.instruction_id)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
    monitoring_infos = bundle_processor.monitoring_infos()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
    op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
    all_monitoring_infos = super().monitoring_infos(
        transform_id, tag_to_pcollection_id)
  File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    def monitoring_infos(self, transform_id, tag_to_pcollection_id):
  File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
  File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
    DistributionData(sum, count, min, max),
  File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
    self.tdigest = tdigest
AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes
self = <apache_beam.ml.gcp.videointelligenceml_test.VideoIntelligenceTest testMethod=test_AnnotateVideo_with_side_input_context>

    def test_AnnotateVideo_with_side_input_context(self):
      videos_to_annotate = [
          'gs://cloud-samples-data/video/cat.mp4',
          'gs://some-other-video/sample.mp4',
          'gs://some-other-video/sample_2.mp4'
      ]
      video_contexts = [
          ('gs://cloud-samples-data/video/cat.mp4', self.video_ctx),
          ('gs://some-other-video/sample.mp4', self.video_ctx),
      ]
    
      expected_counter = len(videos_to_annotate)
      with mock.patch.object(videointelligenceml,
                             'get_videointelligence_client',
                             return_value=self._mock_client):
        p = beam.Pipeline()
        context_side_input = (p | "Video contexts" >> beam.Create(video_contexts))
    
        _ = (
            p
            | "Create data" >> beam.Create(videos_to_annotate)
            | "Annotate video" >> videointelligenceml.AnnotateVideo(
                self.features,
                context_side_input=beam.pvalue.AsDict(context_side_input)))
        result = p.run()
>       result.wait_until_finish()

apache_beam/ml/gcp/videointelligenceml_test.py:83: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <apache_beam.runners.portability.portable_runner.PipelineResult object at 0x79b5792d62c0>
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.
      """
      last_error_text = None
    
      def read_messages() -> None:
        nonlocal last_error_text
        previous_state = -1
        for message in self._message_stream:
          if message.HasField('message_response'):
            mr = message.message_response
            logging.log(MESSAGE_LOG_LEVELS[mr.importance], "%s", mr.message_text)
            if mr.importance == beam_job_api_pb2.JobMessage.JOB_MESSAGE_ERROR:
              last_error_text = mr.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-005 failed in state FAILED: bundle inst002 stage-010 failed:Traceback (most recent call last):
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
E           response = task()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/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 "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
E           return getattr(self, request_type)(
E                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E               getattr(request, request_type), request.instruction_id)
E               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
E           monitoring_infos = bundle_processor.monitoring_infos()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
E           op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
E           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
E           all_monitoring_infos = super().monitoring_infos(
E               transform_id, tag_to_pcollection_id)
E         File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           def monitoring_infos(self, transform_id, tag_to_pcollection_id):
E         File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
E         File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
E           DistributionData(sum, count, min, max),
E         File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
E           self.tdigest = tdigest
E       AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes

target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/portability/portable_runner.py:571: RuntimeError

Check warning on line 0 in apache_beam.ml.gcp.videointelligenceml_test.VideoIntelligenceTest

See this annotation in the file changed.

@github-actions github-actions / Python 3.13 Test Results (self-hosted, ubuntu-20.04, main)

test_AnnotateVideoWithContext_b64_content (apache_beam.ml.gcp.videointelligenceml_test.VideoIntelligenceTest) failed

sdks/python/test-suites/tox/py313/build/srcs/sdks/python/pytest_py313-ml.xml [took 2s]
Raw output
RuntimeError: Pipeline job-004 failed in state FAILED: bundle inst001 stage-004 failed:Traceback (most recent call last):
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
    response = task()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 390, in <lambda>
    lambda: self.create_worker().do_instruction(request), request)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
    return getattr(self, request_type)(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        getattr(request, request_type), request.instruction_id)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
    monitoring_infos = bundle_processor.monitoring_infos()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
    op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
    all_monitoring_infos = super().monitoring_infos(
        transform_id, tag_to_pcollection_id)
  File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    def monitoring_infos(self, transform_id, tag_to_pcollection_id):
  File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
  File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
    DistributionData(sum, count, min, max),
  File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
    self.tdigest = tdigest
AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes
self = <apache_beam.ml.gcp.videointelligenceml_test.VideoIntelligenceTest testMethod=test_AnnotateVideoWithContext_b64_content>

    def test_AnnotateVideoWithContext_b64_content(self):
      base_64_encoded_video = \
        b'YmVnaW4gNjQ0IGNhdC12aWRlby5tcDRNICAgICgmOVQ+NyFNPCMwUi4uZmFrZV92aWRlb'
      videos_to_annotate = [
          (base_64_encoded_video, self.video_ctx),
          (base_64_encoded_video, None),
          (base_64_encoded_video, self.video_ctx),
      ]
      expected_counter = len(videos_to_annotate)
      with mock.patch.object(videointelligenceml,
                             'get_videointelligence_client',
                             return_value=self._mock_client):
        p = beam.Pipeline()
        _ = (
            p
            | "Create data" >> beam.Create(videos_to_annotate)
            | "Annotate video" >> videointelligenceml.AnnotateVideoWithContext(
                self.features))
        result = p.run()
>       result.wait_until_finish()

apache_beam/ml/gcp/videointelligenceml_test.py:134: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <apache_beam.runners.portability.portable_runner.PipelineResult object at 0x7d804bde1ba0>
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.
      """
      last_error_text = None
    
      def read_messages() -> None:
        nonlocal last_error_text
        previous_state = -1
        for message in self._message_stream:
          if message.HasField('message_response'):
            mr = message.message_response
            logging.log(MESSAGE_LOG_LEVELS[mr.importance], "%s", mr.message_text)
            if mr.importance == beam_job_api_pb2.JobMessage.JOB_MESSAGE_ERROR:
              last_error_text = mr.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-004 failed in state FAILED: bundle inst001 stage-004 failed:Traceback (most recent call last):
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
E           response = task()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/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 "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
E           return getattr(self, request_type)(
E                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E               getattr(request, request_type), request.instruction_id)
E               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
E           monitoring_infos = bundle_processor.monitoring_infos()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
E           op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
E           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
E           all_monitoring_infos = super().monitoring_infos(
E               transform_id, tag_to_pcollection_id)
E         File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           def monitoring_infos(self, transform_id, tag_to_pcollection_id):
E         File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
E         File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
E           DistributionData(sum, count, min, max),
E         File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
E           self.tdigest = tdigest
E       AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes

target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/portability/portable_runner.py:571: RuntimeError

Check warning on line 0 in apache_beam.ml.inference.base_test.RunInferenceBaseTest

See this annotation in the file changed.

@github-actions github-actions / Python 3.13 Test Results (self-hosted, ubuntu-20.04, main)

test_run_inference_empty_side_input (apache_beam.ml.inference.base_test.RunInferenceBaseTest) failed

sdks/python/test-suites/tox/py313/build/srcs/sdks/python/pytest_py313-ml.xml [took 2s]
Raw output
RuntimeError: Pipeline job-007 failed in state FAILED: bundle inst003 stage-008 failed:Traceback (most recent call last):
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
    response = task()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 390, in <lambda>
    lambda: self.create_worker().do_instruction(request), request)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
    return getattr(self, request_type)(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        getattr(request, request_type), request.instruction_id)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
    monitoring_infos = bundle_processor.monitoring_infos()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
    op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
    all_monitoring_infos = super().monitoring_infos(
        transform_id, tag_to_pcollection_id)
  File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    def monitoring_infos(self, transform_id, tag_to_pcollection_id):
  File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
  File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
    DistributionData(sum, count, min, max),
  File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
    self.tdigest = tdigest
AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes
self = <apache_beam.ml.inference.base_test.RunInferenceBaseTest testMethod=test_run_inference_empty_side_input>

    def test_run_inference_empty_side_input(self):
      model_handler = FakeModelHandlerReturnsPredictionResult()
      main_input_elements = [1, 2]
>     with TestPipeline(is_integration_test=False) as pipeline:
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

apache_beam/ml/inference/base_test.py:1185: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/pipeline.py:671: in __exit__
    self.result = self.run()
                  ^^^^^^^^^^
target/.tox-py313-ml/py313-ml/lib/python3.13/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 0x7f39145bebe0>
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.
      """
      last_error_text = None
    
      def read_messages() -> None:
        nonlocal last_error_text
        previous_state = -1
        for message in self._message_stream:
          if message.HasField('message_response'):
            mr = message.message_response
            logging.log(MESSAGE_LOG_LEVELS[mr.importance], "%s", mr.message_text)
            if mr.importance == beam_job_api_pb2.JobMessage.JOB_MESSAGE_ERROR:
              last_error_text = mr.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-007 failed in state FAILED: bundle inst003 stage-008 failed:Traceback (most recent call last):
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
E           response = task()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/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 "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
E           return getattr(self, request_type)(
E                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E               getattr(request, request_type), request.instruction_id)
E               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
E           monitoring_infos = bundle_processor.monitoring_infos()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
E           op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
E           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
E           all_monitoring_infos = super().monitoring_infos(
E               transform_id, tag_to_pcollection_id)
E         File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           def monitoring_infos(self, transform_id, tag_to_pcollection_id):
E         File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
E         File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
E           DistributionData(sum, count, min, max),
E         File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
E           self.tdigest = tdigest
E       AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes

target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/portability/portable_runner.py:571: RuntimeError

Check warning on line 0 in apache_beam.ml.gcp.visionml_test.VisionTest

See this annotation in the file changed.

@github-actions github-actions / Python 3.13 Test Results (self-hosted, ubuntu-20.04, main)

test_AnnotateImageWithContext_URIs (apache_beam.ml.gcp.visionml_test.VisionTest) failed

sdks/python/test-suites/tox/py313/build/srcs/sdks/python/pytest_py313-ml.xml [took 2s]
Raw output
RuntimeError: Pipeline job-006 failed in state FAILED: bundle inst001 stage-004 failed:Traceback (most recent call last):
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
    response = task()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 390, in <lambda>
    lambda: self.create_worker().do_instruction(request), request)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
    return getattr(self, request_type)(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        getattr(request, request_type), request.instruction_id)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
    monitoring_infos = bundle_processor.monitoring_infos()
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
    op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
    all_monitoring_infos = super().monitoring_infos(
        transform_id, tag_to_pcollection_id)
  File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    def monitoring_infos(self, transform_id, tag_to_pcollection_id):
  File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
    self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
  File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
    DistributionData(sum, count, min, max),
  File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
    self.tdigest = tdigest
AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes
self = <apache_beam.ml.gcp.visionml_test.VisionTest testMethod=test_AnnotateImageWithContext_URIs>

    def test_AnnotateImageWithContext_URIs(self):
      images_to_annotate = [
          ('gs://cloud-samples-data/vision/ocr/sign.jpg', self.img_ctx),
          ('gs://cloud-samples-data/vision/ocr/sign.jpg', None),
          ('gs://cloud-samples-data/vision/ocr/sign.jpg', self.img_ctx),
      ]
      batch_size = 5
      expected_counter = 1  # All images should fit in the same batch
      with mock.patch.object(visionml,
                             'get_vision_client',
                             return_value=self._mock_client):
        p = beam.Pipeline()
        _ = (
            p
            | "Create data" >> beam.Create(images_to_annotate)
            | "Annotate image" >> visionml.AnnotateImageWithContext(
                self.features,
                min_batch_size=batch_size,
                max_batch_size=batch_size))
        result = p.run()
>       result.wait_until_finish()

apache_beam/ml/gcp/visionml_test.py:169: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <apache_beam.runners.portability.portable_runner.PipelineResult object at 0x79b570500830>
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.
      """
      last_error_text = None
    
      def read_messages() -> None:
        nonlocal last_error_text
        previous_state = -1
        for message in self._message_stream:
          if message.HasField('message_response'):
            mr = message.message_response
            logging.log(MESSAGE_LOG_LEVELS[mr.importance], "%s", mr.message_text)
            if mr.importance == beam_job_api_pb2.JobMessage.JOB_MESSAGE_ERROR:
              last_error_text = mr.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-006 failed in state FAILED: bundle inst001 stage-004 failed:Traceback (most recent call last):
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 316, in _execute
E           response = task()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/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 "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 669, in do_instruction
E           return getattr(self, request_type)(
E                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E               getattr(request, request_type), request.instruction_id)
E               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 708, in process_bundle
E           monitoring_infos = bundle_processor.monitoring_infos()
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1431, in monitoring_infos
E           op.monitoring_infos(transform_id, dict(tag_to_pcollection_id)))
E           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E         File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 245, in monitoring_infos
E           all_monitoring_infos = super().monitoring_infos(
E               transform_id, tag_to_pcollection_id)
E         File "apache_beam/runners/worker/operations.py", line 578, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           def monitoring_infos(self, transform_id, tag_to_pcollection_id):
E         File "apache_beam/runners/worker/operations.py", line 584, in apache_beam.runners.worker.operations.Operation.monitoring_infos
E           self.pcollection_count_monitoring_infos(tag_to_pcollection_id))
E         File "apache_beam/runners/worker/operations.py", line 613, in apache_beam.runners.worker.operations.Operation.pcollection_count_monitoring_infos
E           DistributionData(sum, count, min, max),
E         File "apache_beam/metrics/cells.py", line 584, in apache_beam.metrics.cells.DistributionData.__init__
E           self.tdigest = tdigest
E       AttributeError: 'apache_beam.metrics.cells.DistributionData' object has no attribute 'tdigest' and no __dict__ for setting new attributes

target/.tox-py313-ml/py313-ml/lib/python3.13/site-packages/apache_beam/runners/portability/portable_runner.py:571: RuntimeError