3 fail, 262 skipped, 3 939 pass in 1h 17m 38s
4 files 4 suites 1h 17m 38s ⏱️
4 204 tests 3 939 ✅ 262 💤 3 ❌
8 368 runs 7 449 ✅ 916 💤 3 ❌
Results for commit bb0ae61.
Annotations
Check warning on line 0 in apache_beam.io.parquetio_test.TestParquet
github-actions / Test Results
1 out of 2 runs failed: test_sink_transform_compressed_2 (apache_beam.io.parquetio_test.TestParquet)
sdks/python/test-suites/tox/py313/build/srcs/sdks/python/pytest_py313.xml [took 3s]
Raw output
RuntimeError: Pipeline job-035 failed in state FAILED: bundle inst005 stage-009 failed:Traceback (most recent call last):
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/io/filesystems.py", line 133, in get_filesystem
path_scheme = FileSystems.get_scheme(path)
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/io/filesystems.py", line 121, in get_scheme
match_result = FileSystems.URI_SCHEMA_PATTERN.match(path.strip())
^^^^^^^^^^
AttributeError: 'EmptySideInput' object has no attribute 'strip'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "apache_beam/runners/common.py", line 1498, in apache_beam.runners.common.DoFnRunner.process
return self.do_fn_invoker.invoke_process(windowed_value)
File "apache_beam/runners/common.py", line 912, in apache_beam.runners.common.PerWindowInvoker.invoke_process
self._invoke_process_per_window(
File "apache_beam/runners/common.py", line 1057, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
self.process_method(*args_for_process, **kwargs_for_process),
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/io/iobase.py", line 1431, in process
writer = self.sink.open_writer(init_result, str(uuid.uuid4()))
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/options/value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/io/filebasedsink.py", line 211, in open_writer
writer_path = FileSystems.join(init_result, uid) + suffix
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/io/filesystems.py", line 169, in join
filesystem = FileSystems.get_filesystem(basepath)
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/io/filesystems.py", line 155, in get_filesystem
raise BeamIOError('Unable to get the Filesystem', {path: e})
apache_beam.io.filesystem.BeamIOError: Unable to get the Filesystem with exceptions {<apache_beam.pvalue.EmptySideInput object at 0x7ac9872e6e00>: AttributeError("'EmptySideInput' object has no attribute 'strip'")}
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313/py313/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/py313/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/py313/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 666, 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/py313/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 704, in process_bundle
bundle_processor.process_bundle(instruction_id))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1274, in process_bundle
input_op_by_transform_id[element.transform_id].process_encoded(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
element.data)
^^^^^^^^^^^^^
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 237, in process_encoded
self.output(decoded_value)
~~~~~~~~~~~^^^^^^^^^^^^^^^
File "apache_beam/runners/worker/operations.py", line 568, in apache_beam.runners.worker.operations.Operation.output
def output(self, windowed_value, output_index=0):
File "apache_beam/runners/worker/operations.py", line 570, in apache_beam.runners.worker.operations.Operation.output
_cast_to_receiver(self.receivers[output_index]).receive(windowed_value)
File "apache_beam/runners/worker/operations.py", line 260, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
def receive(self, windowed_value):
File "apache_beam/runners/worker/operations.py", line 263, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
self.consumer.process(windowed_value)
File "apache_beam/runners/worker/operations.py", line 951, in apache_beam.runners.worker.operations.DoOperation.process
with self.scoped_process_state:
File "apache_beam/runners/worker/operations.py", line 952, in apache_beam.runners.worker.operations.DoOperation.process
delayed_applications = self.dofn_runner.process(o)
File "apache_beam/runners/common.py", line 1500, in apache_beam.runners.common.DoFnRunner.process
self._reraise_augmented(exn, windowed_value)
File "apache_beam/runners/common.py", line 1609, in apache_beam.runners.common.DoFnRunner._reraise_augmented
raise new_exn
File "apache_beam/runners/common.py", line 1498, in apache_beam.runners.common.DoFnRunner.process
return self.do_fn_invoker.invoke_process(windowed_value)
File "apache_beam/runners/common.py", line 912, in apache_beam.runners.common.PerWindowInvoker.invoke_process
self._invoke_process_per_window(
File "apache_beam/runners/common.py", line 1057, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
self.process_method(*args_for_process, **kwargs_for_process),
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/io/iobase.py", line 1431, in process
writer = self.sink.open_writer(init_result, str(uuid.uuid4()))
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/options/value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/io/filebasedsink.py", line 211, in open_writer
writer_path = FileSystems.join(init_result, uid) + suffix
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/io/filesystems.py", line 169, in join
filesystem = FileSystems.get_filesystem(basepath)
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/io/filesystems.py", line 155, in get_filesystem
raise BeamIOError('Unable to get the Filesystem', {path: e})
apache_beam.io.filesystem.BeamIOError: Unable to get the Filesystem with exceptions {<apache_beam.pvalue.EmptySideInput object at 0x7ac9872e6e00>: AttributeError("'EmptySideInput' object has no attribute 'strip'")} [while running 'WriteToParquet/Write/WriteImpl/WriteBundles'] with exceptions None
a = (<apache_beam.io.parquetio_test.TestParquet testMethod=test_sink_transform_compressed_2>,)
kw = {}
@wraps(func)
def standalone_func(*a, **kw):
> return func(*(a + p.args), **p.kwargs, **kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
target/.tox-py313/py313/lib/python3.13/site-packages/parameterized/parameterized.py:620:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
apache_beam/io/parquetio_test.py:523: in test_sink_transform_compressed
with TestPipeline() as p:
^^^^^^^^^^^^^^
target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/pipeline.py:670: in __exit__
self.result = self.run()
^^^^^^^^^^
target/.tox-py313/py313/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 0x7ac984107bb0>
duration = None
def wait_until_finish(self, duration=None):
"""
:param duration: The maximum time in milliseconds to wait for the result of
the execution. If None or zero, will wait until the pipeline finishes.
:return: The result of the pipeline, i.e. PipelineResult.
"""
def read_messages() -> None:
previous_state = -1
for message in self._message_stream:
if message.HasField('message_response'):
logging.log(
MESSAGE_LOG_LEVELS[message.message_response.importance],
"%s",
message.message_response.message_text)
else:
current_state = message.state_response.state
if current_state != previous_state:
_LOGGER.info(
"Job state changed to %s",
self.runner_api_state_to_pipeline_state(current_state))
previous_state = current_state
self._messages.append(message)
message_thread = threading.Thread(
target=read_messages, name='wait_until_finish_read')
message_thread.daemon = True
message_thread.start()
if duration:
state_thread = threading.Thread(
target=functools.partial(self._observe_state, message_thread),
name='wait_until_finish_state_observer')
state_thread.daemon = True
state_thread.start()
start_time = time.time()
duration_secs = duration / 1000
while (time.time() - start_time < duration_secs and
state_thread.is_alive()):
time.sleep(1)
else:
self._observe_state(message_thread)
if self._runtime_exception:
> raise self._runtime_exception
E RuntimeError: Pipeline job-035 failed in state FAILED: bundle inst005 stage-009 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/py313/lib/python3.13/site-packages/apache_beam/io/filesystems.py", line 133, in get_filesystem
E path_scheme = FileSystems.get_scheme(path)
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/io/filesystems.py", line 121, in get_scheme
E match_result = FileSystems.URI_SCHEMA_PATTERN.match(path.strip())
E ^^^^^^^^^^
E AttributeError: 'EmptySideInput' object has no attribute 'strip'
E
E During handling of the above exception, another exception occurred:
E
E Traceback (most recent call last):
E File "apache_beam/runners/common.py", line 1498, in apache_beam.runners.common.DoFnRunner.process
E return self.do_fn_invoker.invoke_process(windowed_value)
E File "apache_beam/runners/common.py", line 912, in apache_beam.runners.common.PerWindowInvoker.invoke_process
E self._invoke_process_per_window(
E File "apache_beam/runners/common.py", line 1057, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
E self.process_method(*args_for_process, **kwargs_for_process),
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/io/iobase.py", line 1431, in process
E writer = self.sink.open_writer(init_result, str(uuid.uuid4()))
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/options/value_provider.py", line 193, in _f
E return fnc(self, *args, **kwargs)
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/io/filebasedsink.py", line 211, in open_writer
E writer_path = FileSystems.join(init_result, uid) + suffix
E ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/io/filesystems.py", line 169, in join
E filesystem = FileSystems.get_filesystem(basepath)
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/io/filesystems.py", line 155, in get_filesystem
E raise BeamIOError('Unable to get the Filesystem', {path: e})
E apache_beam.io.filesystem.BeamIOError: Unable to get the Filesystem with exceptions {<apache_beam.pvalue.EmptySideInput object at 0x7ac9872e6e00>: AttributeError("'EmptySideInput' object has no attribute 'strip'")}
E
E During handling of the above exception, another exception occurred:
E
E Traceback (most recent call last):
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313/py313/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/py313/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/py313/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 666, 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/py313/lib/python3.13/site-packages/apache_beam/runners/worker/sdk_worker.py", line 704, in process_bundle
E bundle_processor.process_bundle(instruction_id))
E ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 1274, in process_bundle
E input_op_by_transform_id[element.transform_id].process_encoded(
E ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E element.data)
E ^^^^^^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/runners/worker/bundle_processor.py", line 237, in process_encoded
E self.output(decoded_value)
E ~~~~~~~~~~~^^^^^^^^^^^^^^^
E File "apache_beam/runners/worker/operations.py", line 568, in apache_beam.runners.worker.operations.Operation.output
E def output(self, windowed_value, output_index=0):
E File "apache_beam/runners/worker/operations.py", line 570, in apache_beam.runners.worker.operations.Operation.output
E _cast_to_receiver(self.receivers[output_index]).receive(windowed_value)
E File "apache_beam/runners/worker/operations.py", line 260, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
E def receive(self, windowed_value):
E File "apache_beam/runners/worker/operations.py", line 263, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
E self.consumer.process(windowed_value)
E File "apache_beam/runners/worker/operations.py", line 951, in apache_beam.runners.worker.operations.DoOperation.process
E with self.scoped_process_state:
E File "apache_beam/runners/worker/operations.py", line 952, in apache_beam.runners.worker.operations.DoOperation.process
E delayed_applications = self.dofn_runner.process(o)
E File "apache_beam/runners/common.py", line 1500, in apache_beam.runners.common.DoFnRunner.process
E self._reraise_augmented(exn, windowed_value)
E File "apache_beam/runners/common.py", line 1609, in apache_beam.runners.common.DoFnRunner._reraise_augmented
E raise new_exn
E File "apache_beam/runners/common.py", line 1498, in apache_beam.runners.common.DoFnRunner.process
E return self.do_fn_invoker.invoke_process(windowed_value)
E File "apache_beam/runners/common.py", line 912, in apache_beam.runners.common.PerWindowInvoker.invoke_process
E self._invoke_process_per_window(
E File "apache_beam/runners/common.py", line 1057, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
E self.process_method(*args_for_process, **kwargs_for_process),
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/io/iobase.py", line 1431, in process
E writer = self.sink.open_writer(init_result, str(uuid.uuid4()))
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/options/value_provider.py", line 193, in _f
E return fnc(self, *args, **kwargs)
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/io/filebasedsink.py", line 211, in open_writer
E writer_path = FileSystems.join(init_result, uid) + suffix
E ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/io/filesystems.py", line 169, in join
E filesystem = FileSystems.get_filesystem(basepath)
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/io/filesystems.py", line 155, in get_filesystem
E raise BeamIOError('Unable to get the Filesystem', {path: e})
E apache_beam.io.filesystem.BeamIOError: Unable to get the Filesystem with exceptions {<apache_beam.pvalue.EmptySideInput object at 0x7ac9872e6e00>: AttributeError("'EmptySideInput' object has no attribute 'strip'")} [while running 'WriteToParquet/Write/WriteImpl/WriteBundles'] with exceptions None
target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/runners/portability/portable_runner.py:568: RuntimeError
Check warning on line 0 in apache_beam.yaml.examples.testing.examples_test.ElementWiseTest
github-actions / Test Results
1 out of 2 runs failed: test_map_to_fields_with_deps_yaml (apache_beam.yaml.examples.testing.examples_test.ElementWiseTest)
sdks/python/test-suites/tox/py313/build/srcs/sdks/python/pytest_py313_no_xdist.xml [took 5m 10s]
Raw output
ValueError: Error applying transform "ToRoman" at line 30: Traceback (most recent call last):
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/runners/portability/expansion_service.py", line 101, in Expand
result = pipeline.apply(
transform, inputs, request.transform.unique_name)
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/pipeline.py", line 746, in apply
return self.apply(transform, pvalueish)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/pipeline.py", line 826, in apply
pvalueish_result = self.runner.apply(transform, pvalueish, self._options)
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/runners/runner.py", line 191, in apply
return self.apply_PTransform(transform, input, options)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/runners/runner.py", line 195, in apply_PTransform
return transform.expand(input)
~~~~~~~~~~~~~~~~^^^^^^^
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/transforms/fully_qualified_named_transform.py", line 78, in expand
return pinput | transform
~~~~~~~^~~~~~~~~~~
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/pvalue.py", line 139, in __or__
return self.pipeline.apply(ptransform, self)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/pipeline.py", line 826, in apply
pvalueish_result = self.runner.apply(transform, pvalueish, self._options)
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/runners/runner.py", line 191, in apply
return self.apply_PTransform(transform, input, options)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/runners/runner.py", line 195, in apply_PTransform
return transform.expand(input)
~~~~~~~~~~~~~~~~^^^^^^^
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/transforms/ptransform.py", line 1032, in expand
return self._fn(pcoll, *args, **kwargs)
~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/yaml/yaml_errors.py", line 75, in expand
return transform_fn(wrapped_pcoll, **kwargs).as_result(
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/yaml/yaml_mapping.py", line 719, in _PyJsMapToFields
name: _as_callable(
~~~~~~~~~~~~^
original_fields, expr, name, language, input_schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/yaml/yaml_mapping.py", line 396, in _as_callable
func = _expand_python_mapping_func(original_fields, **expr)
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/yaml/yaml_mapping.py", line 311, in _expand_python_mapping_func
return python_callable.PythonCallableWithSource(source)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/utils/python_callable.py", line 48, in __init__
self._callable = self.load_from_source(source)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/utils/python_callable.py", line 60, in load_from_source
return cls.load_from_script(source)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/utils/python_callable.py", line 106, in load_from_script
exec('\n'.join(lines), exec_globals)
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'roman'
spec = {'__line__': 30, '__uuid__': 'cbab155f-af3e-4f2e-8d65-c7985ba4c5c7', 'config': {'__line__': 33, '__uuid__': 'e063b2df-...rt(row):\n return roman.toRoman(row.year)\n'}}, ...}, 'input': {'input': 'e45513eb-c853-4108-9372-ace1fdbddb8f'}, ...}
scope = <apache_beam.yaml.yaml_transform.Scope object at 0x7b7e17488190>
def expand_leaf_transform(spec, scope):
spec = spec.copy()
# Check for optional output_schema to verify on.
# The idea is to pass this output_schema config to the ValidateWithSchema
# transform.
output_schema_spec = {}
if 'output_schema' in spec.get('config', {}):
output_schema_spec = spec.get('config').pop('output_schema')
spec = normalize_inputs_outputs(spec)
inputs_dict = {
key: scope.get_pcollection(value)
for (key, value) in empty_if_explicitly_empty(spec['input']).items()
}
input_type = spec.get('input_type', 'default')
if input_type == 'list':
inputs = tuple(inputs_dict.values())
elif input_type == 'map':
inputs = inputs_dict
else:
if len(inputs_dict) == 0:
inputs = scope.root
elif len(inputs_dict) == 1:
inputs = next(iter(inputs_dict.values()))
else:
inputs = inputs_dict
_LOGGER.info("Expanding %s ", identify_object(spec))
ptransform = scope.create_ptransform(spec, inputs_dict.values())
try:
# TODO: Move validation to construction?
with FullyQualifiedNamedTransform.with_filter('*'):
> outputs = inputs | scope.unique_name(spec, ptransform) >> ptransform
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
apache_beam/yaml/yaml_transform.py:519:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/pvalue.py:139: in __or__
return self.pipeline.apply(ptransform, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/pipeline.py:731: in apply
return self.apply(
target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/pipeline.py:746: in apply
return self.apply(transform, pvalueish)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/pipeline.py:826: in apply
pvalueish_result = self.runner.apply(transform, pvalueish, self._options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/runners/runner.py:191: in apply
return self.apply_PTransform(transform, input, options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/runners/runner.py:195: in apply_PTransform
return transform.expand(input)
^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <ExternalTransform(PTransform) label=[ExternalTransform(beam:transforms:python:fully_qualified_named)] at 0x7b7e145cdbe0>
pvalueish = <PCollection[Create/Map(decode).None] at 0x7b7e147e39b0>
def expand(self, pvalueish: pvalue.PCollection) -> pvalue.PCollection:
if isinstance(pvalueish, pvalue.PBegin):
self._inputs = {}
elif isinstance(pvalueish, (list, tuple)):
self._inputs = {str(ix): pvalue for ix, pvalue in enumerate(pvalueish)}
elif isinstance(pvalueish, dict):
self._inputs = pvalueish
else:
self._inputs = {'input': pvalueish}
pipeline = (
next(iter(self._inputs.values())).pipeline
if self._inputs else pvalueish.pipeline)
context = pipeline_context.PipelineContext(
component_id_map=pipeline.component_id_map)
transform_proto = beam_runner_api_pb2.PTransform(
unique_name=pipeline._current_transform().full_label,
spec=beam_runner_api_pb2.FunctionSpec(
urn=self._urn, payload=self._payload))
for tag, pcoll in self._inputs.items():
transform_proto.inputs[tag] = context.pcollections.get_id(pcoll)
# Conversion to/from proto assumes producers.
# TODO: Possibly loosen this.
context.transforms.put_proto(
'%s_%s' % (self._IMPULSE_PREFIX, tag),
beam_runner_api_pb2.PTransform(
unique_name='%s_%s' % (self._IMPULSE_PREFIX, tag),
spec=beam_runner_api_pb2.FunctionSpec(
urn=common_urns.primitives.IMPULSE.urn),
outputs={'out': transform_proto.inputs[tag]}))
output_coders = None
if self._type_hints.output_types:
if self._type_hints.output_types[0]:
output_coders = dict(
(str(k), context.coder_id_from_element_type(v))
for (k, v) in enumerate(self._type_hints.output_types[0]))
elif self._type_hints.output_types[1]:
output_coders = {
k: context.coder_id_from_element_type(v)
for (k, v) in self._type_hints.output_types[1].items()
}
components = context.to_runner_api()
request = beam_expansion_api_pb2.ExpansionRequest(
components=components,
namespace=self._external_namespace, # type: ignore[arg-type]
transform=transform_proto,
output_coder_requests=output_coders,
pipeline_options=pipeline._options.to_runner_api())
expansion_service = _maybe_use_transform_service(
self._expansion_service, pipeline.options)
with ExternalTransform.service(expansion_service) as service:
response = service.Expand(request)
if response.error:
> raise RuntimeError(_sanitize_java_traceback(response.error))
E RuntimeError: Traceback (most recent call last):
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/runners/portability/expansion_service.py", line 101, in Expand
E result = pipeline.apply(
E transform, inputs, request.transform.unique_name)
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/pipeline.py", line 746, in apply
E return self.apply(transform, pvalueish)
E ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/pipeline.py", line 826, in apply
E pvalueish_result = self.runner.apply(transform, pvalueish, self._options)
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/runners/runner.py", line 191, in apply
E return self.apply_PTransform(transform, input, options)
E ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/runners/runner.py", line 195, in apply_PTransform
E return transform.expand(input)
E ~~~~~~~~~~~~~~~~^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/transforms/fully_qualified_named_transform.py", line 78, in expand
E return pinput | transform
E ~~~~~~~^~~~~~~~~~~
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/pvalue.py", line 139, in __or__
E return self.pipeline.apply(ptransform, self)
E ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/pipeline.py", line 826, in apply
E pvalueish_result = self.runner.apply(transform, pvalueish, self._options)
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/runners/runner.py", line 191, in apply
E return self.apply_PTransform(transform, input, options)
E ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/runners/runner.py", line 195, in apply_PTransform
E return transform.expand(input)
E ~~~~~~~~~~~~~~~~^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/transforms/ptransform.py", line 1032, in expand
E return self._fn(pcoll, *args, **kwargs)
E ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/yaml/yaml_errors.py", line 75, in expand
E return transform_fn(wrapped_pcoll, **kwargs).as_result(
E ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/yaml/yaml_mapping.py", line 719, in _PyJsMapToFields
E name: _as_callable(
E ~~~~~~~~~~~~^
E original_fields, expr, name, language, input_schema)
E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/yaml/yaml_mapping.py", line 396, in _as_callable
E func = _expand_python_mapping_func(original_fields, **expr)
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/yaml/yaml_mapping.py", line 311, in _expand_python_mapping_func
E return python_callable.PythonCallableWithSource(source)
E ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/utils/python_callable.py", line 48, in __init__
E self._callable = self.load_from_source(source)
E ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/utils/python_callable.py", line 60, in load_from_source
E return cls.load_from_script(source)
E ~~~~~~~~~~~~~~~~~~~~^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/utils/python_callable.py", line 106, in load_from_script
E exec('\n'.join(lines), exec_globals)
E ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "<string>", line 1, in <module>
E ModuleNotFoundError: No module named 'roman'
target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/transforms/external.py:832: RuntimeError
The above exception was the direct cause of the following exception:
self = <apache_beam.yaml.examples.testing.examples_test.ElementwiseExamplesTest testMethod=test_map_to_fields_with_deps_yaml>
@mock.patch('apache_beam.Pipeline', TestPipeline)
def test_yaml_example(self):
with open(pipeline_spec_file, encoding="utf-8") as f:
lines = f.readlines()
expected_key = '# Expected:\n'
if expected_key in lines:
expected = lines[lines.index('# Expected:\n') + 1:]
else:
raise ValueError(
f"Missing '# Expected:' tag in example file '{pipeline_spec_file}'")
for i, line in enumerate(expected):
expected[i] = line.replace('# ', '').replace('\n', '')
expected = [line for line in expected if line]
raw_spec_string = ''.join(lines)
# Filter for any jinja preprocessor - this has to be done before other
# preprocessors.
jinja_preprocessor = [
preprocessor for preprocessor in custom_preprocessors
if 'jinja_preprocessor' in preprocessor.__name__
]
if jinja_preprocessor:
jinja_preprocessor = jinja_preprocessor[0]
raw_spec_string = jinja_preprocessor(
raw_spec_string, self._testMethodName)
custom_preprocessors.remove(jinja_preprocessor)
pipeline_spec = yaml.load(
raw_spec_string, Loader=yaml_transform.SafeLineLoader)
with TestEnvironment() as env:
for fn in custom_preprocessors:
pipeline_spec = fn(pipeline_spec, expected, env)
with beam.Pipeline(options=PipelineOptions(
pickle_library='cloudpickle',
**yaml_transform.SafeLineLoader.strip_metadata(pipeline_spec.get(
'options', {})))) as p:
actual = [
> yaml_transform.expand_pipeline(
p,
pipeline_spec,
[
yaml_provider.InlineProvider(
TEST_PROVIDERS, INPUT_TRANSFORM_TEST_PROVIDERS)
])
]
apache_beam/yaml/examples/testing/examples_test.py:371:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
apache_beam/yaml/yaml_transform.py:1408: in expand_pipeline
providers or {})).expand(root)
^^^^^^^^^^^^
apache_beam/yaml/yaml_transform.py:1369: in expand
result = expand_transform(
apache_beam/yaml/yaml_transform.py:482: in expand_transform
return expand_composite_transform(spec, scope)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
apache_beam/yaml/yaml_transform.py:832: in expand_composite_transform
return transform.expand(None)
^^^^^^^^^^^^^^^^^^^^^^
apache_beam/yaml/yaml_transform.py:815: in expand
inner_scope.compute_all()
apache_beam/yaml/yaml_transform.py:209: in compute_all
self.compute_outputs(transform_id)
apache_beam/yaml/yaml_transform.py:107: in wrapper
self._cache[key] = func(self, *args)
^^^^^^^^^^^^^^^^^
apache_beam/yaml/yaml_transform.py:245: in compute_outputs
return expand_transform(self._transforms_by_uuid[transform_id], self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
apache_beam/yaml/yaml_transform.py:484: in expand_transform
return expand_leaf_transform(spec, scope)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
spec = {'__line__': 30, '__uuid__': 'cbab155f-af3e-4f2e-8d65-c7985ba4c5c7', 'config': {'__line__': 33, '__uuid__': 'e063b2df-...rt(row):\n return roman.toRoman(row.year)\n'}}, ...}, 'input': {'input': 'e45513eb-c853-4108-9372-ace1fdbddb8f'}, ...}
scope = <apache_beam.yaml.yaml_transform.Scope object at 0x7b7e17488190>
def expand_leaf_transform(spec, scope):
spec = spec.copy()
# Check for optional output_schema to verify on.
# The idea is to pass this output_schema config to the ValidateWithSchema
# transform.
output_schema_spec = {}
if 'output_schema' in spec.get('config', {}):
output_schema_spec = spec.get('config').pop('output_schema')
spec = normalize_inputs_outputs(spec)
inputs_dict = {
key: scope.get_pcollection(value)
for (key, value) in empty_if_explicitly_empty(spec['input']).items()
}
input_type = spec.get('input_type', 'default')
if input_type == 'list':
inputs = tuple(inputs_dict.values())
elif input_type == 'map':
inputs = inputs_dict
else:
if len(inputs_dict) == 0:
inputs = scope.root
elif len(inputs_dict) == 1:
inputs = next(iter(inputs_dict.values()))
else:
inputs = inputs_dict
_LOGGER.info("Expanding %s ", identify_object(spec))
ptransform = scope.create_ptransform(spec, inputs_dict.values())
try:
# TODO: Move validation to construction?
with FullyQualifiedNamedTransform.with_filter('*'):
outputs = inputs | scope.unique_name(spec, ptransform) >> ptransform
except Exception as exn:
> raise ValueError(
f"Error applying transform {identify_object(spec)}: {exn}") from exn
E ValueError: Error applying transform "ToRoman" at line 30: Traceback (most recent call last):
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/runners/portability/expansion_service.py", line 101, in Expand
E result = pipeline.apply(
E transform, inputs, request.transform.unique_name)
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/pipeline.py", line 746, in apply
E return self.apply(transform, pvalueish)
E ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/pipeline.py", line 826, in apply
E pvalueish_result = self.runner.apply(transform, pvalueish, self._options)
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/runners/runner.py", line 191, in apply
E return self.apply_PTransform(transform, input, options)
E ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/runners/runner.py", line 195, in apply_PTransform
E return transform.expand(input)
E ~~~~~~~~~~~~~~~~^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/transforms/fully_qualified_named_transform.py", line 78, in expand
E return pinput | transform
E ~~~~~~~^~~~~~~~~~~
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/pvalue.py", line 139, in __or__
E return self.pipeline.apply(ptransform, self)
E ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/pipeline.py", line 826, in apply
E pvalueish_result = self.runner.apply(transform, pvalueish, self._options)
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/runners/runner.py", line 191, in apply
E return self.apply_PTransform(transform, input, options)
E ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/runners/runner.py", line 195, in apply_PTransform
E return transform.expand(input)
E ~~~~~~~~~~~~~~~~^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/transforms/ptransform.py", line 1032, in expand
E return self._fn(pcoll, *args, **kwargs)
E ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/yaml/yaml_errors.py", line 75, in expand
E return transform_fn(wrapped_pcoll, **kwargs).as_result(
E ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/yaml/yaml_mapping.py", line 719, in _PyJsMapToFields
E name: _as_callable(
E ~~~~~~~~~~~~^
E original_fields, expr, name, language, input_schema)
E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/yaml/yaml_mapping.py", line 396, in _as_callable
E func = _expand_python_mapping_func(original_fields, **expr)
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/yaml/yaml_mapping.py", line 311, in _expand_python_mapping_func
E return python_callable.PythonCallableWithSource(source)
E ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/utils/python_callable.py", line 48, in __init__
E self._callable = self.load_from_source(source)
E ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/utils/python_callable.py", line 60, in load_from_source
E return cls.load_from_script(source)
E ~~~~~~~~~~~~~~~~~~~~^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/utils/python_callable.py", line 106, in load_from_script
E exec('\n'.join(lines), exec_globals)
E ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "<string>", line 1, in <module>
E ModuleNotFoundError: No module named 'roman'
apache_beam/yaml/yaml_transform.py:521: ValueError
Check warning on line 0 in apache_beam.yaml.examples.testing.examples_test.MLTest
github-actions / Test Results
1 out of 2 runs failed: test_streaming_sentiment_analysis_yaml (apache_beam.yaml.examples.testing.examples_test.MLTest)
sdks/python/test-suites/tox/py313/build/srcs/sdks/python/pytest_py313_no_xdist.xml [took 1m 38s]
Raw output
ValueError: Error applying transform "Truncating" at line 145: Traceback (most recent call last):
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/runners/portability/expansion_service.py", line 101, in Expand
result = pipeline.apply(
transform, inputs, request.transform.unique_name)
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/pipeline.py", line 746, in apply
return self.apply(transform, pvalueish)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/pipeline.py", line 826, in apply
pvalueish_result = self.runner.apply(transform, pvalueish, self._options)
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/runners/runner.py", line 191, in apply
return self.apply_PTransform(transform, input, options)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/runners/runner.py", line 195, in apply_PTransform
return transform.expand(input)
~~~~~~~~~~~~~~~~^^^^^^^
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/transforms/fully_qualified_named_transform.py", line 78, in expand
return pinput | transform
~~~~~~~^~~~~~~~~~~
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/pvalue.py", line 139, in __or__
return self.pipeline.apply(ptransform, self)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/pipeline.py", line 826, in apply
pvalueish_result = self.runner.apply(transform, pvalueish, self._options)
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/runners/runner.py", line 191, in apply
return self.apply_PTransform(transform, input, options)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/runners/runner.py", line 195, in apply_PTransform
return transform.expand(input)
~~~~~~~~~~~~~~~~^^^^^^^
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/transforms/ptransform.py", line 1032, in expand
return self._fn(pcoll, *args, **kwargs)
~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/yaml/yaml_errors.py", line 75, in expand
return transform_fn(wrapped_pcoll, **kwargs).as_result(
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/yaml/yaml_mapping.py", line 719, in _PyJsMapToFields
name: _as_callable(
~~~~~~~~~~~~^
original_fields, expr, name, language, input_schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/yaml/yaml_mapping.py", line 396, in _as_callable
func = _expand_python_mapping_func(original_fields, **expr)
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/yaml/yaml_mapping.py", line 311, in _expand_python_mapping_func
return python_callable.PythonCallableWithSource(source)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/utils/python_callable.py", line 48, in __init__
self._callable = self.load_from_source(source)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/utils/python_callable.py", line 60, in load_from_source
return cls.load_from_script(source)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/utils/python_callable.py", line 106, in load_from_script
exec('\n'.join(lines), exec_globals)
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'transformers'
spec = {'__line__': 145, '__uuid__': '52b17e3e-5169-4d50-8545-eaf2f264e671', 'config': {'__line__': 149, '__uuid__': '8c1601d...uncated_sentence\n'}, 'likes': {'expression': 'likes'}, ...}, ...}, 'input': {'input': 'FilterForProperComments'}, ...}
scope = <apache_beam.yaml.yaml_transform.Scope object at 0x7b7e174970b0>
def expand_leaf_transform(spec, scope):
spec = spec.copy()
# Check for optional output_schema to verify on.
# The idea is to pass this output_schema config to the ValidateWithSchema
# transform.
output_schema_spec = {}
if 'output_schema' in spec.get('config', {}):
output_schema_spec = spec.get('config').pop('output_schema')
spec = normalize_inputs_outputs(spec)
inputs_dict = {
key: scope.get_pcollection(value)
for (key, value) in empty_if_explicitly_empty(spec['input']).items()
}
input_type = spec.get('input_type', 'default')
if input_type == 'list':
inputs = tuple(inputs_dict.values())
elif input_type == 'map':
inputs = inputs_dict
else:
if len(inputs_dict) == 0:
inputs = scope.root
elif len(inputs_dict) == 1:
inputs = next(iter(inputs_dict.values()))
else:
inputs = inputs_dict
_LOGGER.info("Expanding %s ", identify_object(spec))
ptransform = scope.create_ptransform(spec, inputs_dict.values())
try:
# TODO: Move validation to construction?
with FullyQualifiedNamedTransform.with_filter('*'):
> outputs = inputs | scope.unique_name(spec, ptransform) >> ptransform
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
apache_beam/yaml/yaml_transform.py:519:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/pvalue.py:139: in __or__
return self.pipeline.apply(ptransform, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/pipeline.py:731: in apply
return self.apply(
target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/pipeline.py:746: in apply
return self.apply(transform, pvalueish)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/pipeline.py:826: in apply
pvalueish_result = self.runner.apply(transform, pvalueish, self._options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/runners/runner.py:191: in apply
return self.apply_PTransform(transform, input, options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/runners/runner.py:195: in apply_PTransform
return transform.expand(input)
^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <ExternalTransform(PTransform) label=[ExternalTransform(beam:transforms:python:fully_qualified_named)] at 0x7b7e1472c7d0>
pvalueish = <PCollection[FilterForProperComments/Filter(filter).None] at 0x7b7e13939fd0>
def expand(self, pvalueish: pvalue.PCollection) -> pvalue.PCollection:
if isinstance(pvalueish, pvalue.PBegin):
self._inputs = {}
elif isinstance(pvalueish, (list, tuple)):
self._inputs = {str(ix): pvalue for ix, pvalue in enumerate(pvalueish)}
elif isinstance(pvalueish, dict):
self._inputs = pvalueish
else:
self._inputs = {'input': pvalueish}
pipeline = (
next(iter(self._inputs.values())).pipeline
if self._inputs else pvalueish.pipeline)
context = pipeline_context.PipelineContext(
component_id_map=pipeline.component_id_map)
transform_proto = beam_runner_api_pb2.PTransform(
unique_name=pipeline._current_transform().full_label,
spec=beam_runner_api_pb2.FunctionSpec(
urn=self._urn, payload=self._payload))
for tag, pcoll in self._inputs.items():
transform_proto.inputs[tag] = context.pcollections.get_id(pcoll)
# Conversion to/from proto assumes producers.
# TODO: Possibly loosen this.
context.transforms.put_proto(
'%s_%s' % (self._IMPULSE_PREFIX, tag),
beam_runner_api_pb2.PTransform(
unique_name='%s_%s' % (self._IMPULSE_PREFIX, tag),
spec=beam_runner_api_pb2.FunctionSpec(
urn=common_urns.primitives.IMPULSE.urn),
outputs={'out': transform_proto.inputs[tag]}))
output_coders = None
if self._type_hints.output_types:
if self._type_hints.output_types[0]:
output_coders = dict(
(str(k), context.coder_id_from_element_type(v))
for (k, v) in enumerate(self._type_hints.output_types[0]))
elif self._type_hints.output_types[1]:
output_coders = {
k: context.coder_id_from_element_type(v)
for (k, v) in self._type_hints.output_types[1].items()
}
components = context.to_runner_api()
request = beam_expansion_api_pb2.ExpansionRequest(
components=components,
namespace=self._external_namespace, # type: ignore[arg-type]
transform=transform_proto,
output_coder_requests=output_coders,
pipeline_options=pipeline._options.to_runner_api())
expansion_service = _maybe_use_transform_service(
self._expansion_service, pipeline.options)
with ExternalTransform.service(expansion_service) as service:
response = service.Expand(request)
if response.error:
> raise RuntimeError(_sanitize_java_traceback(response.error))
E RuntimeError: Traceback (most recent call last):
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/runners/portability/expansion_service.py", line 101, in Expand
E result = pipeline.apply(
E transform, inputs, request.transform.unique_name)
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/pipeline.py", line 746, in apply
E return self.apply(transform, pvalueish)
E ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/pipeline.py", line 826, in apply
E pvalueish_result = self.runner.apply(transform, pvalueish, self._options)
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/runners/runner.py", line 191, in apply
E return self.apply_PTransform(transform, input, options)
E ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/runners/runner.py", line 195, in apply_PTransform
E return transform.expand(input)
E ~~~~~~~~~~~~~~~~^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/transforms/fully_qualified_named_transform.py", line 78, in expand
E return pinput | transform
E ~~~~~~~^~~~~~~~~~~
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/pvalue.py", line 139, in __or__
E return self.pipeline.apply(ptransform, self)
E ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/pipeline.py", line 826, in apply
E pvalueish_result = self.runner.apply(transform, pvalueish, self._options)
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/runners/runner.py", line 191, in apply
E return self.apply_PTransform(transform, input, options)
E ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/runners/runner.py", line 195, in apply_PTransform
E return transform.expand(input)
E ~~~~~~~~~~~~~~~~^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/transforms/ptransform.py", line 1032, in expand
E return self._fn(pcoll, *args, **kwargs)
E ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/yaml/yaml_errors.py", line 75, in expand
E return transform_fn(wrapped_pcoll, **kwargs).as_result(
E ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/yaml/yaml_mapping.py", line 719, in _PyJsMapToFields
E name: _as_callable(
E ~~~~~~~~~~~~^
E original_fields, expr, name, language, input_schema)
E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/yaml/yaml_mapping.py", line 396, in _as_callable
E func = _expand_python_mapping_func(original_fields, **expr)
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/yaml/yaml_mapping.py", line 311, in _expand_python_mapping_func
E return python_callable.PythonCallableWithSource(source)
E ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/utils/python_callable.py", line 48, in __init__
E self._callable = self.load_from_source(source)
E ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/utils/python_callable.py", line 60, in load_from_source
E return cls.load_from_script(source)
E ~~~~~~~~~~~~~~~~~~~~^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/utils/python_callable.py", line 106, in load_from_script
E exec('\n'.join(lines), exec_globals)
E ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "<string>", line 1, in <module>
E ModuleNotFoundError: No module named 'transformers'
target/.tox-py313/py313/lib/python3.13/site-packages/apache_beam/transforms/external.py:832: RuntimeError
The above exception was the direct cause of the following exception:
self = <apache_beam.yaml.examples.testing.examples_test.MLExamplesTest testMethod=test_streaming_sentiment_analysis_yaml>
@mock.patch('apache_beam.Pipeline', TestPipeline)
def test_yaml_example(self):
with open(pipeline_spec_file, encoding="utf-8") as f:
lines = f.readlines()
expected_key = '# Expected:\n'
if expected_key in lines:
expected = lines[lines.index('# Expected:\n') + 1:]
else:
raise ValueError(
f"Missing '# Expected:' tag in example file '{pipeline_spec_file}'")
for i, line in enumerate(expected):
expected[i] = line.replace('# ', '').replace('\n', '')
expected = [line for line in expected if line]
raw_spec_string = ''.join(lines)
# Filter for any jinja preprocessor - this has to be done before other
# preprocessors.
jinja_preprocessor = [
preprocessor for preprocessor in custom_preprocessors
if 'jinja_preprocessor' in preprocessor.__name__
]
if jinja_preprocessor:
jinja_preprocessor = jinja_preprocessor[0]
raw_spec_string = jinja_preprocessor(
raw_spec_string, self._testMethodName)
custom_preprocessors.remove(jinja_preprocessor)
pipeline_spec = yaml.load(
raw_spec_string, Loader=yaml_transform.SafeLineLoader)
with TestEnvironment() as env:
for fn in custom_preprocessors:
pipeline_spec = fn(pipeline_spec, expected, env)
with beam.Pipeline(options=PipelineOptions(
pickle_library='cloudpickle',
**yaml_transform.SafeLineLoader.strip_metadata(pipeline_spec.get(
'options', {})))) as p:
actual = [
> yaml_transform.expand_pipeline(
p,
pipeline_spec,
[
yaml_provider.InlineProvider(
TEST_PROVIDERS, INPUT_TRANSFORM_TEST_PROVIDERS)
])
]
apache_beam/yaml/examples/testing/examples_test.py:371:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
apache_beam/yaml/yaml_transform.py:1408: in expand_pipeline
providers or {})).expand(root)
^^^^^^^^^^^^
apache_beam/yaml/yaml_transform.py:1369: in expand
result = expand_transform(
apache_beam/yaml/yaml_transform.py:482: in expand_transform
return expand_composite_transform(spec, scope)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
apache_beam/yaml/yaml_transform.py:832: in expand_composite_transform
return transform.expand(None)
^^^^^^^^^^^^^^^^^^^^^^
apache_beam/yaml/yaml_transform.py:815: in expand
inner_scope.compute_all()
apache_beam/yaml/yaml_transform.py:209: in compute_all
self.compute_outputs(transform_id)
apache_beam/yaml/yaml_transform.py:107: in wrapper
self._cache[key] = func(self, *args)
^^^^^^^^^^^^^^^^^
apache_beam/yaml/yaml_transform.py:245: in compute_outputs
return expand_transform(self._transforms_by_uuid[transform_id], self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
apache_beam/yaml/yaml_transform.py:484: in expand_transform
return expand_leaf_transform(spec, scope)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
spec = {'__line__': 145, '__uuid__': '52b17e3e-5169-4d50-8545-eaf2f264e671', 'config': {'__line__': 149, '__uuid__': '8c1601d...uncated_sentence\n'}, 'likes': {'expression': 'likes'}, ...}, ...}, 'input': {'input': 'FilterForProperComments'}, ...}
scope = <apache_beam.yaml.yaml_transform.Scope object at 0x7b7e174970b0>
def expand_leaf_transform(spec, scope):
spec = spec.copy()
# Check for optional output_schema to verify on.
# The idea is to pass this output_schema config to the ValidateWithSchema
# transform.
output_schema_spec = {}
if 'output_schema' in spec.get('config', {}):
output_schema_spec = spec.get('config').pop('output_schema')
spec = normalize_inputs_outputs(spec)
inputs_dict = {
key: scope.get_pcollection(value)
for (key, value) in empty_if_explicitly_empty(spec['input']).items()
}
input_type = spec.get('input_type', 'default')
if input_type == 'list':
inputs = tuple(inputs_dict.values())
elif input_type == 'map':
inputs = inputs_dict
else:
if len(inputs_dict) == 0:
inputs = scope.root
elif len(inputs_dict) == 1:
inputs = next(iter(inputs_dict.values()))
else:
inputs = inputs_dict
_LOGGER.info("Expanding %s ", identify_object(spec))
ptransform = scope.create_ptransform(spec, inputs_dict.values())
try:
# TODO: Move validation to construction?
with FullyQualifiedNamedTransform.with_filter('*'):
outputs = inputs | scope.unique_name(spec, ptransform) >> ptransform
except Exception as exn:
> raise ValueError(
f"Error applying transform {identify_object(spec)}: {exn}") from exn
E ValueError: Error applying transform "Truncating" at line 145: Traceback (most recent call last):
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/runners/portability/expansion_service.py", line 101, in Expand
E result = pipeline.apply(
E transform, inputs, request.transform.unique_name)
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/pipeline.py", line 746, in apply
E return self.apply(transform, pvalueish)
E ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/pipeline.py", line 826, in apply
E pvalueish_result = self.runner.apply(transform, pvalueish, self._options)
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/runners/runner.py", line 191, in apply
E return self.apply_PTransform(transform, input, options)
E ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/runners/runner.py", line 195, in apply_PTransform
E return transform.expand(input)
E ~~~~~~~~~~~~~~~~^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/transforms/fully_qualified_named_transform.py", line 78, in expand
E return pinput | transform
E ~~~~~~~^~~~~~~~~~~
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/pvalue.py", line 139, in __or__
E return self.pipeline.apply(ptransform, self)
E ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/pipeline.py", line 826, in apply
E pvalueish_result = self.runner.apply(transform, pvalueish, self._options)
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/runners/runner.py", line 191, in apply
E return self.apply_PTransform(transform, input, options)
E ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/runners/runner.py", line 195, in apply_PTransform
E return transform.expand(input)
E ~~~~~~~~~~~~~~~~^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/transforms/ptransform.py", line 1032, in expand
E return self._fn(pcoll, *args, **kwargs)
E ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/yaml/yaml_errors.py", line 75, in expand
E return transform_fn(wrapped_pcoll, **kwargs).as_result(
E ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/yaml/yaml_mapping.py", line 719, in _PyJsMapToFields
E name: _as_callable(
E ~~~~~~~~~~~~^
E original_fields, expr, name, language, input_schema)
E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/yaml/yaml_mapping.py", line 396, in _as_callable
E func = _expand_python_mapping_func(original_fields, **expr)
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/yaml/yaml_mapping.py", line 311, in _expand_python_mapping_func
E return python_callable.PythonCallableWithSource(source)
E ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/utils/python_callable.py", line 48, in __init__
E self._callable = self.load_from_source(source)
E ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/utils/python_callable.py", line 60, in load_from_source
E return cls.load_from_script(source)
E ~~~~~~~~~~~~~~~~~~~~^^^^^^^^
E File "/runner/_work/beam/beam/sdks/python/test-suites/tox/py313/build/srcs/sdks/python/apache_beam/utils/python_callable.py", line 106, in load_from_script
E exec('\n'.join(lines), exec_globals)
E ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "<string>", line 1, in <module>
E ModuleNotFoundError: No module named 'transformers'
apache_beam/yaml/yaml_transform.py:521: ValueError