You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue: Error while running example of creating embeddings
Description
I encountered an error when attempting to run the example of creating embeddings on the official repository. The output and stack trace are provided below.
Error Output
Traceback (most recent call last):
File "/run/media/zoz/New Volume/repos/testColbert/.venv/lib64/python3.12/site-packages/torch/utils/cpp_extension.py", line 2105, in _run_ninja_build
subprocess.run(
File "/usr/lib64/python3.12/subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/run/media/zoz/New Volume/repos/testColbert/test.py", line 26, in <module>
main()
File "/run/media/zoz/New Volume/repos/testColbert/test.py", line 16, in main
RAG = RAGPretrainedModel.from_pretrained("colbert-ir/colbertv2.0")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/run/media/zoz/New Volume/repos/testColbert/.venv/lib64/python3.12/site-packages/ragatouille/RAGPretrainedModel.py", line 71, in from_pretrained
instance.model = ColBERT(
^^^^^^^^
File "/run/media/zoz/New Volume/repos/testColbert/.venv/lib64/python3.12/site-packages/ragatouille/models/colbert.py", line 84, in __init__
self.inference_ckpt = Checkpoint(
^^^^^^^^^^^
File "/run/media/zoz/New Volume/repos/testColbert/.venv/lib64/python3.12/site-packages/colbert/modeling/checkpoint.py", line 19, in __init__
super().__init__(name, colbert_config)
File "/run/media/zoz/New Volume/repos/testColbert/.venv/lib64/python3.12/site-packages/colbert/modeling/colbert.py", line 24, in __init__
ColBERT.try_load_torch_extensions(self.use_gpu)
File "/run/media/zoz/New Volume/repos/testColbert/.venv/lib64/python3.12/site-packages/colbert/modeling/colbert.py", line 39, in try_load_torch_extensions
segmented_maxsim_cpp = load(
^^^^^
File "/run/media/zoz/New Volume/repos/testColbert/.venv/lib64/python3.12/site-packages/torch/utils/cpp_extension.py", line 1312, in load
return _jit_compile(
^^^^^^^^^^^^^
File "/run/media/zoz/New Volume/repos/testColbert/.venv/lib64/python3.12/site-packages/torch/utils/cpp_extension.py", line 1722, in _jit_compile
_write_ninja_file_and_build_library(
File "/run/media/zoz/New Volume/repos/testColbert/.venv/lib64/python3.12/site-packages/torch/utils/cpp_extension.py", line 1834, in _write_ninja_file_and_build_library
_run_ninja_build(
File "/run/media/zoz/New Volume/repos/testColbert/.venv/lib64/python3.12/site-packages/torch/utils/cpp_extension.py", line 2121, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error building extension 'segmented_maxsim_cpp': [1/1] c++ segmented_maxsim.o -shared -L/run/media/zoz/New Volume/repos/testColbert/.venv/lib64/python3.12/site-packages/torch/lib -lc10 -ltorch_cpu -ltorch -ltorch_python -o segmented_maxsim_cpp.so
FAILED: segmented_maxsim_cpp.so
c++ segmented_maxsim.o -shared -L/run/media/zoz/New Volume/repos/testColbert/.venv/lib64/python3.12/site-packages/torch/lib -lc10 -ltorch_cpu -ltorch -ltorch_python -o segmented_maxsim_cpp.so
/usr/bin/ld: cannot find Volume/repos/testColbert/.venv/lib64/python3.12/site-packages/torch/lib: No such file or directory
/usr/bin/ld: cannot find -lc10: No such file or directory
/usr/bin/ld: cannot find -ltorch_cpu: No such file or directory
/usr/bin/ld: cannot find -ltorch: No such file or directory
/usr/bin/ld: cannot find -ltorch_python: No such file or directory
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
INFO: Tried to clean up context but failed!
Steps to Reproduce:
Clone the repository
Set up the environment as per instructions in the README
Run the example for creating embeddings
The error occurs during the attempt to build the extension with Ninja
Environment Details
Python version: 3.12 pip list output:
[1/1] c++ segmented_maxsim.o -shared -L/run/media/zoz/New Volume/repos/testColbert/.venv/lib64/python3.12/site-packages/torch/lib -lc10 -ltorch_cpu -ltorch -ltorch_python -o segmented_maxsim_cpp.so
FAILED: segmented_maxsim_cpp.so
c++ segmented_maxsim.o -shared -L/run/media/zoz/New Volume/repos/testColbert/.venv/lib64/python3.12/site-packages/torch/lib -lc10 -ltorch_cpu -ltorch -ltorch_python -o segmented_maxsim_cpp.so
/usr/bin/ld: cannot find Volume/repos/testColbert/.venv/lib64/python3.12/site-packages/torch/lib: No such file or directory
/usr/bin/ld: cannot find -lc10: No such file or directory
/usr/bin/ld: cannot find -ltorch_cpu: No such file or directory
/usr/bin/ld: cannot find -ltorch: No such file or directory
/usr/bin/ld: cannot find -ltorch_python: No such file or directory
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Verified that the Torch library is installed correctly.
Confirmed that the torch/lib directory exists in the specified path.
Tried reinstalling Torch and Ragatouille.
Ensured that Ninja is properly installed and accessible in the environment.
Request for Assistance:
Could you please help identify the root cause of this linking error and suggest possible solutions or workarounds? Any insights into properly configuring the environment for building the ColBERT extensions with Ragatouille would be greatly appreciated.
The text was updated successfully, but these errors were encountered:
Issue: Error while running example of creating embeddings
Description
I encountered an error when attempting to run the example of creating embeddings on the official repository. The output and stack trace are provided below.
Error Output
Steps to Reproduce:
Environment Details
Python version: 3.12
pip list
output:Additional Information:
[1/1] c++ segmented_maxsim.o -shared -L/run/media/zoz/New Volume/repos/testColbert/.venv/lib64/python3.12/site-packages/torch/lib -lc10 -ltorch_cpu -ltorch -ltorch_python -o segmented_maxsim_cpp.so FAILED: segmented_maxsim_cpp.so c++ segmented_maxsim.o -shared -L/run/media/zoz/New Volume/repos/testColbert/.venv/lib64/python3.12/site-packages/torch/lib -lc10 -ltorch_cpu -ltorch -ltorch_python -o segmented_maxsim_cpp.so /usr/bin/ld: cannot find Volume/repos/testColbert/.venv/lib64/python3.12/site-packages/torch/lib: No such file or directory /usr/bin/ld: cannot find -lc10: No such file or directory /usr/bin/ld: cannot find -ltorch_cpu: No such file or directory /usr/bin/ld: cannot find -ltorch: No such file or directory /usr/bin/ld: cannot find -ltorch_python: No such file or directory collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed.
Attempted Solutions:
Request for Assistance:
Could you please help identify the root cause of this linking error and suggest possible solutions or workarounds? Any insights into properly configuring the environment for building the ColBERT extensions with Ragatouille would be greatly appreciated.
The text was updated successfully, but these errors were encountered: