generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
Description
Expected Behaviour
I just wanted to try the RembgImageProcessor as shown in the documentation but it fails.
Current Behaviour
The RembgProcessor fails
Code snippet
I copy/paste the code as in the example from this repo: https://github.com/awslabs/project-lakechain/blob/main/examples/simple-pipelines/image-processing-pipelines/image-background-removal/stack.ts
Steps to Reproduce
- Drop a file into the source bucket
Possible Solution
No response
Project Lakechain version
latest
Execution logs
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.2 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.
Traceback (most recent call last): File "/var/runtime/bootstrap.py", line 60, in <module>
main()
File "/var/runtime/bootstrap.py", line 57, in main
awslambdaricmain.main([os.environ["LAMBDA_TASK_ROOT"], os.environ["_HANDLER"]])
File "/var/runtime/awslambdaric/__main__.py", line 21, in main
bootstrap.run(app_root, handler, lambda_runtime_api_addr)
File "/var/runtime/awslambdaric/bootstrap.py", line 497, in run
request_handler = _get_handler(handler)
File "/var/runtime/awslambdaric/bootstrap.py", line 53, in _get_handler
m = importlib.import_module(modname.replace("/", "."))
File "/var/lang/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/var/task/index.py", line 24, in <module>
from rembg import remove
File "/var/lang/lib/python3.10/site-packages/rembg/__init__.py", line 5, in <module>
from .bg import remove
File "/var/lang/lib/python3.10/site-packages/rembg/bg.py", line 6, in <module>
import onnxruntime as ort
File "/var/lang/lib/python3.10/site-packages/onnxruntime/__init__.py", line 23, in <module>
from onnxruntime.capi._pybind_state import ExecutionMode # noqa: F401
File "/var/lang/lib/python3.10/site-packages/onnxruntime/capi/_pybind_state.py", line 32, in <module>
from .onnxruntime_pybind11_state import * # noqa
AttributeError: _ARRAY_API not found
ImportError: numpy.core.multiarray failed to import
The above exception was the direct cause of the following exception:
SystemError: <built-in function __import__> returned a result with an exception set
/var/lang/lib/python3.10/site-packages/numba/np/ufunc/parallel.py:324: NumbaSystemWarning: Could not obtain multiprocessing lock due to OS level error: [Errno 38] Function not implemented
A likely cause of this problem is '/dev/shm' is missing or read-only such that necessary semaphores cannot be written.
*** The responsibility of ensuring multiprocessing safe access to this initialization sequence/module import is deferred to the user! ***
warnings.warn(msg % str(e), errors.NumbaSystemWarning)
INIT_REPORT Init Duration: 10016.89 ms Phase: init Status: timeoutMauroCert