Skip to content

[Failing Test]: Python PostCommit is continuously failing for tf_inference_it_test #1649

[Failing Test]: Python PostCommit is continuously failing for tf_inference_it_test

[Failing Test]: Python PostCommit is continuously failing for tf_inference_it_test #1649

GitHub Actions / Test Results failed Mar 13, 2024 in 0s

2 fail, 26 skipped, 21 pass in 3m 45s

49 tests   21 ✅  3m 45s ⏱️
 1 suites  26 💤
 1 files     2 ❌

Results for commit 289bbc4.

Annotations

Check warning on line 0 in apache_beam.examples.complete.distribopt_test.DistribOptimizationTest

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_basics (apache_beam.examples.complete.distribopt_test.DistribOptimizationTest) failed

sdks/python/pytest_postCommitExamples-direct-py311.xml [took 7s]
Raw output
google.resumable_media.common.InvalidResponse: (502, 'Expected one of', <HTTPStatus.OK: 200>, <HTTPStatus.CREATED: 201>)
self = <apache_beam.runners.common.DoFnRunner object at 0x7c7744c6b4d0>
bundle_method = <bound method DoFnInvoker.invoke_finish_bundle of <apache_beam.runners.common.PerWindowInvoker object at 0x7c7744dc5ad0>>

    def _invoke_bundle_method(self, bundle_method):
      try:
        self.context.set_element(None)
>       bundle_method()

apache_beam/runners/common.py:1493: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
apache_beam/runners/common.py:579: in invoke_finish_bundle
    self.output_handler.finish_bundle_outputs(
apache_beam/runners/common.py:1770: in finish_bundle_outputs
    for result in results:
apache_beam/io/iobase.py:1206: in finish_bundle
    self.writer.close(),
apache_beam/io/filebasedsink.py:434: in close
    self.sink.close(self.temp_handle)
apache_beam/io/textio.py:525: in close
    super().close(file_handle)
apache_beam/io/filebasedsink.py:167: in close
    file_handle.close()
../../build/gradleenv/417525524/lib/python3.11/site-packages/google/cloud/storage/fileio.py:437: in close
    self._upload_chunks_from_buffer(1)
../../build/gradleenv/417525524/lib/python3.11/site-packages/google/cloud/storage/fileio.py:405: in _upload_chunks_from_buffer
    self._initiate_upload()
../../build/gradleenv/417525524/lib/python3.11/site-packages/google/cloud/storage/fileio.py:389: in _initiate_upload
    self._upload_and_transport = self._blob._initiate_resumable_upload(
../../build/gradleenv/417525524/lib/python3.11/site-packages/google/cloud/storage/blob.py:2142: in _initiate_resumable_upload
    upload.initiate(
../../build/gradleenv/417525524/lib/python3.11/site-packages/google/resumable_media/requests/upload.py:420: in initiate
    return _request_helpers.wait_and_retry(
../../build/gradleenv/417525524/lib/python3.11/site-packages/google/resumable_media/requests/_request_helpers.py:178: in wait_and_retry
    raise error
../../build/gradleenv/417525524/lib/python3.11/site-packages/google/resumable_media/requests/_request_helpers.py:155: in wait_and_retry
    response = func()
../../build/gradleenv/417525524/lib/python3.11/site-packages/google/resumable_media/requests/upload.py:416: in retriable_request
    self._process_initiate_response(result)
../../build/gradleenv/417525524/lib/python3.11/site-packages/google/resumable_media/_upload.py:518: in _process_initiate_response
    _helpers.require_status_code(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

response = <Response [502]>
status_codes = (<HTTPStatus.OK: 200>, <HTTPStatus.CREATED: 201>)
get_status_code = <function RequestsMixin._get_status_code at 0x7c777acfa5c0>
callback = <bound method ResumableUpload._make_invalid of <google.resumable_media.requests.upload.ResumableUpload object at 0x7c7744c75b90>>

    def require_status_code(response, status_codes, get_status_code, callback=do_nothing):
        """Require a response has a status code among a list.
    
        Args:
            response (object): The HTTP response object.
            status_codes (tuple): The acceptable status codes.
            get_status_code (Callable[Any, int]): Helper to get a status code
                from a response.
            callback (Optional[Callable]): A callback that takes no arguments,
                to be executed when an exception is being raised.
    
        Returns:
            int: The status code.
    
        Raises:
            ~google.resumable_media.common.InvalidResponse: If the status code
                is not one of the values in ``status_codes``.
        """
        status_code = get_status_code(response)
        if status_code not in status_codes:
            if status_code not in common.RETRYABLE:
                callback()
>           raise common.InvalidResponse(
                response,
                "Request failed with status code",
                status_code,
                "Expected one of",
                *status_codes
            )
E           google.resumable_media.common.InvalidResponse: ('Request failed with status code', 502, 'Expected one of', <HTTPStatus.OK: 200>, <HTTPStatus.CREATED: 201>)

../../build/gradleenv/417525524/lib/python3.11/site-packages/google/resumable_media/_helpers.py:108: InvalidResponse

During handling of the above exception, another exception occurred:

self = <apache_beam.examples.complete.distribopt_test.DistribOptimizationTest testMethod=test_basics>

    @pytest.mark.sickbay_dataflow
    @pytest.mark.examples_postcommit
    def test_basics(self):
      test_pipeline = TestPipeline(is_integration_test=True)
    
      # Setup the files with expected content.
      temp_location = test_pipeline.get_option('temp_location')
      input = '/'.join([temp_location, str(uuid.uuid4()), 'input.txt'])
      output = '/'.join([temp_location, str(uuid.uuid4()), 'result'])
      create_file(input, FILE_CONTENTS)
      extra_opts = {'input': input, 'output': output}
    
      # Run pipeline
      # Avoid dependency on SciPy
      scipy_mock = MagicMock()
      result_mock = MagicMock(x=np.ones(3))
      scipy_mock.optimize.minimize = MagicMock(return_value=result_mock)
      modules = {'scipy': scipy_mock, 'scipy.optimize': scipy_mock.optimize}
    
      with patch.dict('sys.modules', modules):
        from apache_beam.examples.complete import distribopt
>       distribopt.run(
            test_pipeline.get_full_options_as_args(**extra_opts),
            save_main_session=False)

apache_beam/examples/complete/distribopt_test.py:70: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
apache_beam/examples/complete/distribopt.py:316: in run
    with beam.Pipeline(options=pipeline_options) as p:
apache_beam/pipeline.py:612: in __exit__
    self.result = self.run()
apache_beam/pipeline.py:562: in run
    self._options).run(False)
apache_beam/pipeline.py:586: in run
    return self.runner.run_pipeline(self, self._options)
apache_beam/runners/direct/test_direct_runner.py:42: in run_pipeline
    self.result = super().run_pipeline(pipeline, options)
apache_beam/runners/direct/direct_runner.py:128: in run_pipeline
    return runner.run_pipeline(pipeline, options)
apache_beam/runners/portability/fn_api_runner/fn_runner.py:203: in run_pipeline
    self._latest_run_result = self.run_via_runner_api(
apache_beam/runners/portability/fn_api_runner/fn_runner.py:226: in run_via_runner_api
    return self.run_stages(stage_context, stages)
apache_beam/runners/portability/fn_api_runner/fn_runner.py:481: in run_stages
    bundle_results = self._execute_bundle(
apache_beam/runners/portability/fn_api_runner/fn_runner.py:809: in _execute_bundle
    self._run_bundle(
apache_beam/runners/portability/fn_api_runner/fn_runner.py:1046: in _run_bundle
    result, splits = bundle_manager.process_bundle(
apache_beam/runners/portability/fn_api_runner/fn_runner.py:1382: in process_bundle
    result_future = self._worker_handler.control_conn.push(process_bundle_req)
apache_beam/runners/portability/fn_api_runner/worker_handlers.py:384: in push
    response = self.worker.do_instruction(request)
apache_beam/runners/worker/sdk_worker.py:650: in do_instruction
    return getattr(self, request_type)(
apache_beam/runners/worker/sdk_worker.py:688: in process_bundle
    bundle_processor.process_bundle(instruction_id))
apache_beam/runners/worker/bundle_processor.py:1119: in process_bundle
    op.finish()
apache_beam/runners/worker/operations.py:989: in finish
    self.dofn_runner.finish()
apache_beam/runners/common.py:1514: in finish
    self._invoke_bundle_method(self.do_fn_invoker.invoke_finish_bundle)
apache_beam/runners/common.py:1495: in _invoke_bundle_method
    self._reraise_augmented(exn)
apache_beam/runners/common.py:1547: in _reraise_augmented
    raise new_exn
apache_beam/runners/common.py:1493: in _invoke_bundle_method
    bundle_method()
apache_beam/runners/common.py:579: in invoke_finish_bundle
    self.output_handler.finish_bundle_outputs(
apache_beam/runners/common.py:1770: in finish_bundle_outputs
    for result in results:
apache_beam/io/iobase.py:1206: in finish_bundle
    self.writer.close(),
apache_beam/io/filebasedsink.py:434: in close
    self.sink.close(self.temp_handle)
apache_beam/io/textio.py:525: in close
    super().close(file_handle)
apache_beam/io/filebasedsink.py:167: in close
    file_handle.close()
../../build/gradleenv/417525524/lib/python3.11/site-packages/google/cloud/storage/fileio.py:437: in close
    self._upload_chunks_from_buffer(1)
../../build/gradleenv/417525524/lib/python3.11/site-packages/google/cloud/storage/fileio.py:405: in _upload_chunks_from_buffer
    self._initiate_upload()
../../build/gradleenv/417525524/lib/python3.11/site-packages/google/cloud/storage/fileio.py:389: in _initiate_upload
    self._upload_and_transport = self._blob._initiate_resumable_upload(
../../build/gradleenv/417525524/lib/python3.11/site-packages/google/cloud/storage/blob.py:2142: in _initiate_resumable_upload
    upload.initiate(
../../build/gradleenv/417525524/lib/python3.11/site-packages/google/resumable_media/requests/upload.py:420: in initiate
    return _request_helpers.wait_and_retry(
../../build/gradleenv/417525524/lib/python3.11/site-packages/google/resumable_media/requests/_request_helpers.py:178: in wait_and_retry
    raise error
../../build/gradleenv/417525524/lib/python3.11/site-packages/google/resumable_media/requests/_request_helpers.py:155: in wait_and_retry
    response = func()
../../build/gradleenv/417525524/lib/python3.11/site-packages/google/resumable_media/requests/upload.py:416: in retriable_request
    self._process_initiate_response(result)
../../build/gradleenv/417525524/lib/python3.11/site-packages/google/resumable_media/_upload.py:518: in _process_initiate_response
    _helpers.require_status_code(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

response = <Response [502]>
status_codes = (<HTTPStatus.OK: 200>, <HTTPStatus.CREATED: 201>)
get_status_code = <function RequestsMixin._get_status_code at 0x7c777acfa5c0>
callback = <bound method ResumableUpload._make_invalid of <google.resumable_media.requests.upload.ResumableUpload object at 0x7c7744c75b90>>

    def require_status_code(response, status_codes, get_status_code, callback=do_nothing):
        """Require a response has a status code among a list.
    
        Args:
            response (object): The HTTP response object.
            status_codes (tuple): The acceptable status codes.
            get_status_code (Callable[Any, int]): Helper to get a status code
                from a response.
            callback (Optional[Callable]): A callback that takes no arguments,
                to be executed when an exception is being raised.
    
        Returns:
            int: The status code.
    
        Raises:
            ~google.resumable_media.common.InvalidResponse: If the status code
                is not one of the values in ``status_codes``.
        """
        status_code = get_status_code(response)
        if status_code not in status_codes:
            if status_code not in common.RETRYABLE:
                callback()
>           raise common.InvalidResponse(
                response,
                "Request failed with status code",
                status_code,
                "Expected one of",
                *status_codes
            )
E           google.resumable_media.common.InvalidResponse: (502, 'Expected one of', <HTTPStatus.OK: 200>, <HTTPStatus.CREATED: 201>)

../../build/gradleenv/417525524/lib/python3.11/site-packages/google/resumable_media/_helpers.py:108: InvalidResponse

Check warning on line 0 in apache_beam.examples.complete.tfidf_it_test.TfIdfIT

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_basics (apache_beam.examples.complete.tfidf_it_test.TfIdfIT) failed

sdks/python/pytest_postCommitExamples-direct-py311.xml [took 9s]
Raw output
google.resumable_media.common.InvalidResponse: ('Request failed with status code', 502, 'Expected one of', <HTTPStatus.OK: 200>, <HTTPStatus.PERMANENT_REDIRECT: 308>)
self = <apache_beam.examples.complete.tfidf_it_test.TfIdfIT testMethod=test_basics>

    @pytest.mark.examples_postcommit
    @pytest.mark.sickbay_flink
    def test_basics(self):
      test_pipeline = TestPipeline(is_integration_test=True)
    
      # Setup the files with expected content.
      temp_location = test_pipeline.get_option('temp_location')
      input_folder = '/'.join([temp_location, str(uuid.uuid4())])
      create_file('/'.join([input_folder, '1.txt']), 'abc def ghi')
>     create_file('/'.join([input_folder, '2.txt']), 'abc def')

apache_beam/examples/complete/tfidf_it_test.py:53: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
apache_beam/testing/test_utils.py:216: in create_file
    with FileSystems.create(path) as f:
../../build/gradleenv/417525524/lib/python3.11/site-packages/google/cloud/storage/fileio.py:437: in close
    self._upload_chunks_from_buffer(1)
../../build/gradleenv/417525524/lib/python3.11/site-packages/google/cloud/storage/fileio.py:417: in _upload_chunks_from_buffer
    upload.transmit_next_chunk(transport, **kwargs)
../../build/gradleenv/417525524/lib/python3.11/site-packages/google/resumable_media/requests/upload.py:515: in transmit_next_chunk
    return _request_helpers.wait_and_retry(
../../build/gradleenv/417525524/lib/python3.11/site-packages/google/resumable_media/requests/_request_helpers.py:178: in wait_and_retry
    raise error
../../build/gradleenv/417525524/lib/python3.11/site-packages/google/resumable_media/requests/_request_helpers.py:155: in wait_and_retry
    response = func()
../../build/gradleenv/417525524/lib/python3.11/site-packages/google/resumable_media/requests/upload.py:511: in retriable_request
    self._process_resumable_response(result, len(payload))
../../build/gradleenv/417525524/lib/python3.11/site-packages/google/resumable_media/_upload.py:690: in _process_resumable_response
    status_code = _helpers.require_status_code(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

response = <Response [502]>
status_codes = (<HTTPStatus.OK: 200>, <HTTPStatus.PERMANENT_REDIRECT: 308>)
get_status_code = <function RequestsMixin._get_status_code at 0x7c777acfa5c0>
callback = <bound method ResumableUpload._make_invalid of <google.resumable_media.requests.upload.ResumableUpload object at 0x7c7744007e10>>

    def require_status_code(response, status_codes, get_status_code, callback=do_nothing):
        """Require a response has a status code among a list.
    
        Args:
            response (object): The HTTP response object.
            status_codes (tuple): The acceptable status codes.
            get_status_code (Callable[Any, int]): Helper to get a status code
                from a response.
            callback (Optional[Callable]): A callback that takes no arguments,
                to be executed when an exception is being raised.
    
        Returns:
            int: The status code.
    
        Raises:
            ~google.resumable_media.common.InvalidResponse: If the status code
                is not one of the values in ``status_codes``.
        """
        status_code = get_status_code(response)
        if status_code not in status_codes:
            if status_code not in common.RETRYABLE:
                callback()
>           raise common.InvalidResponse(
                response,
                "Request failed with status code",
                status_code,
                "Expected one of",
                *status_codes
            )
E           google.resumable_media.common.InvalidResponse: ('Request failed with status code', 502, 'Expected one of', <HTTPStatus.OK: 200>, <HTTPStatus.PERMANENT_REDIRECT: 308>)

../../build/gradleenv/417525524/lib/python3.11/site-packages/google/resumable_media/_helpers.py:108: InvalidResponse

Check notice on line 0 in .github

See this annotation in the file changed.

@github-actions github-actions / Test Results

26 skipped tests found

There are 26 skipped tests, see "Raw output" for the full list of skipped tests.
Raw output
apache_beam.examples.complete.juliaset.juliaset.juliaset_test.JuliaSetTest ‑ test_generate_fractal_image
apache_beam.examples.ml_transform.ml_transform_it_test
apache_beam.examples.snippets.transforms.elementwise.enrichment_test
apache_beam.examples.snippets.transforms.elementwise.mltransform_test
apache_beam.examples.snippets.transforms.elementwise.runinference_test
apache_beam.io.requestresponse_it_test
apache_beam.io.requestresponse_test
apache_beam.ml.inference.huggingface_inference_it_test
apache_beam.ml.inference.huggingface_inference_test
apache_beam.ml.inference.onnx_inference_test
apache_beam.ml.inference.pytorch_inference_test
apache_beam.ml.inference.tensorflow_inference_test
apache_beam.ml.inference.tensorrt_inference_test
apache_beam.ml.inference.vertex_ai_inference_it_test
apache_beam.ml.inference.xgboost_inference_test
apache_beam.ml.transforms.handlers_test
apache_beam.ml.transforms.tft_test
apache_beam.runners.dask.dask_runner_test
apache_beam.testing.analyzers.perf_analysis_test
apache_beam.testing.benchmarks.cloudml.cloudml_benchmark_test
apache_beam.transforms.enrichment_handlers.bigtable_it_test
apache_beam.transforms.enrichment_handlers.vertex_ai_feature_store_it_test
apache_beam.transforms.enrichment_handlers.vertex_ai_feature_store_test
apache_beam.transforms.enrichment_it_test
apache_beam.transforms.enrichment_test
apache_beam.typehints.pytorch_type_compatibility_test

Check notice on line 0 in .github

See this annotation in the file changed.

@github-actions github-actions / Test Results

49 tests found

There are 49 tests, see "Raw output" for the full list of tests.
Raw output
apache_beam.examples.avro_nyc_trips_it_test.AvroNycTripsIT ‑ test_avro_nyc_trips_output_files_on_small_input
apache_beam.examples.complete.autocomplete_it_test.AutocompleteIT ‑ test_autocomplete_output_files_on_small_input
apache_beam.examples.complete.distribopt_test.DistribOptimizationTest ‑ test_basics
apache_beam.examples.complete.estimate_pi_it_test.EstimatePiIT ‑ test_estimate_pi_output_file
apache_beam.examples.complete.game.hourly_team_score_it_test.HourlyTeamScoreIT ‑ test_hourly_team_score_output_checksum_on_small_input
apache_beam.examples.complete.game.user_score_it_test.UserScoreIT ‑ test_userscore_output_checksum_on_small_input
apache_beam.examples.complete.juliaset.juliaset.juliaset_test.JuliaSetTest ‑ test_generate_fractal_image
apache_beam.examples.complete.juliaset.juliaset.juliaset_test.JuliaSetTest ‑ test_output_file_format
apache_beam.examples.complete.tfidf_it_test.TfIdfIT ‑ test_basics
apache_beam.examples.complete.top_wikipedia_sessions_it_test.ComputeTopSessionsIT ‑ test_top_wikipedia_sessions_output_files_on_small_input
apache_beam.examples.cookbook.bigquery_side_input_it_test.BigQuerySideInputIT ‑ test_bigquery_side_input_it
apache_beam.examples.cookbook.bigquery_tornadoes_it_test.BigqueryTornadoesIT ‑ test_bigquery_tornadoes_it
apache_beam.examples.cookbook.coders_it_test.CodersIT ‑ test_coders_output_files_on_small_input
apache_beam.examples.cookbook.custom_ptransform_it_test.CustomPTransformIT ‑ test_custom_ptransform_output_files_on_small_input
apache_beam.examples.cookbook.filters_test.FiltersTest ‑ test_filters_output_bigquery_matcher
apache_beam.examples.cookbook.group_with_coder_test.GroupWithCoderTest ‑ test_basics_with_type_check
apache_beam.examples.cookbook.group_with_coder_test.GroupWithCoderTest ‑ test_basics_without_type_check
apache_beam.examples.cookbook.mergecontacts_test.MergeContactsTest ‑ test_mergecontacts
apache_beam.examples.cookbook.multiple_output_pardo_test.MultipleOutputParDo ‑ test_multiple_output_pardo
apache_beam.examples.dataframe.flight_delays_it_test.FlightDelaysTest ‑ test_flight_delays
apache_beam.examples.dataframe.wordcount_test.WordCountTest ‑ test_basics
apache_beam.examples.ml_transform.ml_transform_it_test
apache_beam.examples.snippets.transforms.elementwise.enrichment_test
apache_beam.examples.snippets.transforms.elementwise.mltransform_test
apache_beam.examples.snippets.transforms.elementwise.runinference_test
apache_beam.examples.wordcount_debugging_test.WordCountDebuggingTest ‑ test_basics
apache_beam.examples.wordcount_minimal_test.WordCountMinimalTest ‑ test_basics
apache_beam.examples.wordcount_test.WordCountTest ‑ test_basics
apache_beam.io.requestresponse_it_test
apache_beam.io.requestresponse_test
apache_beam.ml.inference.huggingface_inference_it_test
apache_beam.ml.inference.huggingface_inference_test
apache_beam.ml.inference.onnx_inference_test
apache_beam.ml.inference.pytorch_inference_test
apache_beam.ml.inference.tensorflow_inference_test
apache_beam.ml.inference.tensorrt_inference_test
apache_beam.ml.inference.vertex_ai_inference_it_test
apache_beam.ml.inference.xgboost_inference_test
apache_beam.ml.transforms.handlers_test
apache_beam.ml.transforms.tft_test
apache_beam.runners.dask.dask_runner_test
apache_beam.testing.analyzers.perf_analysis_test
apache_beam.testing.benchmarks.cloudml.cloudml_benchmark_test
apache_beam.transforms.enrichment_handlers.bigtable_it_test
apache_beam.transforms.enrichment_handlers.vertex_ai_feature_store_it_test
apache_beam.transforms.enrichment_handlers.vertex_ai_feature_store_test
apache_beam.transforms.enrichment_it_test
apache_beam.transforms.enrichment_test
apache_beam.typehints.pytorch_type_compatibility_test