Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'petrel_client' #35

Open
miki0902 opened this issue Oct 17, 2024 · 4 comments
Open

ModuleNotFoundError: No module named 'petrel_client' #35

miki0902 opened this issue Oct 17, 2024 · 4 comments

Comments

@miki0902
Copy link

こんにちは
UPopをCLIPで適用しようとすると
ModuleNotFoundError: No module named 'petrel_client'
のようなエラーが出ます.
自分なりにはclipディレクトリにpetrel_clientディレクトリが無いためエラーが出ていると考えています.
ただし,自分はまだ初学者で間違えている可能性もあるので知識のある方にアドバイスと解決策を教えていただきたいです
よろしくお願いします
以下に自分のclipディレクトリとエラー文を添付します

Hello.
When I try to apply UPop with CLIP, I get
ModuleNotFoundError: No module named 'petrel_client'
I think the error is because there is no petrel_client directory in the CLIP directory.
I think the error is because there is no petrel_client directory in the clip directory.
However, I am still a beginner, and there is a possibility that I am wrong, so I would like to get advice and solutions from someone with knowledge.
Thank you in advance.
I have attached my clip directory and the error text below.

您好。
当我尝试用 CLIP 应用 UPop 时
模块未找到错误:没有名为 “petrel_client ”的模块
我收到类似 “ModuleNotFoundError: No module named ‘petrel_client’”的错误。
我认为这个错误是因为在 clip 目录中没有 petrel_client 目录。
不过,我还是个初学者,可能会出错,所以我希望能从有知识的人那里获得建议和解决方案。
提前感谢您的帮助。
我将剪辑目录和错误文本附在下面。

スクリーンショット 2024-10-17 20 29 24 スクリーンショット 2024-10-17 20 32 21
@sdc17
Copy link
Owner

sdc17 commented Oct 17, 2024

Hi,

You can delete or comment anything related to "petrel" such as:

from petrel_client.client import Client

This is an optional package used to load data. The code will also work without this package.

@miki0902
Copy link
Author

返信ありがとうございます

インポートをコメントした場合、編集するべきコードはありますか
現状NameError: name 'Client' is not definedというエラーが出ています

Thanks for the reply.

Is there any code I should edit if I commented the import
I am getting an error that says Current NameError: name 'Client' is not defined

スクリーンショット 2024-10-18 14 12 00

@miki0902
Copy link
Author

こんにちは、Clientに関する箇所を編集したら、別のエラーにたどり着きました
ImportError: cannot import name '_scaled_dot_product_attention' from 'torch.nn.functional'
と出ており,torchのバージョンが原因であると考えられています
現在私の環境ではversion2.4.1を使用していますが,推奨しているversionはありますか

Hi, I edited the part about Client and got to another error
ImportError: cannot import name '_scaled_dot_product_attention' from 'torch.nn.functional'
and I believe it is due to the version of torch
I am currently using version 2.4.1. Is there a recommended version?

`*****************************************
Setting OMP_NUM_THREADS environment variable for each process to be 1 in default, to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed.


/root/miniconda3/envs/upop/lib/python3.8/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: libtorch_cuda_cu.so: cannot open shared object file: No such file or directory
warn(f"Failed to load image Python extension: {e}")
/root/miniconda3/envs/upop/lib/python3.8/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: libtorch_cuda_cu.so: cannot open shared object file: No such file or directory
warn(f"Failed to load image Python extension: {e}")
Traceback (most recent call last):
File "compress_retrieval_clip.py", line 24, in
from clip import clip
File "/home/miki/UPop-main-4/clip/init.py", line 2, in
from . import mock
File "/home/miki/UPop-main-4/clip/mock.py", line 2, in
from torch.nn.functional import (
ImportError: cannot import name '_scaled_dot_product_attention' from 'torch.nn.functional' (/root/miniconda3/envs/upop/lib/python3.8/site-packages/torch/nn/functional.py)
Traceback (most recent call last):
File "compress_retrieval_clip.py", line 24, in
from clip import clip
File "/home/miki/UPop-main-4/clip/init.py", line 2, in
from . import mock
File "/home/miki/UPop-main-4/clip/mock.py", line 2, in
from torch.nn.functional import (
ImportError: cannot import name '_scaled_dot_product_attention' from 'torch.nn.functional' (/root/miniconda3/envs/upop/lib/python3.8/site-packages/torch/nn/functional.py)
W1018 06:55:01.805221 140239165204288 torch/distributed/elastic/multiprocessing/api.py:858] Sending process 642105 closing signal SIGTERM
E1018 06:55:01.970727 140239165204288 torch/distributed/elastic/multiprocessing/api.py:833] failed (exitcode: 1) local_rank: 0 (pid: 642104) of binary: /root/miniconda3/envs/upop/bin/python3
Traceback (most recent call last):
File "/root/miniconda3/envs/upop/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/root/miniconda3/envs/upop/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/root/miniconda3/envs/upop/lib/python3.8/site-packages/torch/distributed/run.py", line 905, in
main()
File "/root/miniconda3/envs/upop/lib/python3.8/site-packages/torch/distributed/elastic/multiprocessing/errors/init.py", line 348, in wrapper
return f(*args, **kwargs)
File "/root/miniconda3/envs/upop/lib/python3.8/site-packages/torch/distributed/run.py", line 901, in main
run(args)
File "/root/miniconda3/envs/upop/lib/python3.8/site-packages/torch/distributed/run.py", line 892, in run
elastic_launch(
File "/root/miniconda3/envs/upop/lib/python3.8/site-packages/torch/distributed/launcher/api.py", line 133, in call
return launch_agent(self._config, self._entrypoint, list(args))
File "/root/miniconda3/envs/upop/lib/python3.8/site-packages/torch/distributed/launcher/api.py", line 264, in launch_agent
raise ChildFailedError(
torch.distributed.elastic.multiprocessing.errors.ChildFailedError:
`

@sdc17
Copy link
Owner

sdc17 commented Oct 18, 2024

Hi,

Torch 1.x is recommended.

UPop/README.md

Line 76 in 6aae798

The code is tested on `Pytorch==1.11.0`, `cuda==11.3.1`, and `python==3.8.13`. The dependencies can be installed by:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants