zhizdev / mvdfusion

[CVPR 2024] MVD-Fusion: Single-view 3D via Depth-consistent Multi-view Generation

Home Page:https://mvd-fusion.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

torchtext dependency issue

sungmin9939 opened this issue · comments

Hi

Thanks for the great work!

I encountered below error

(base) root@39c632041e34:/workspace/code/mvdfusion# python demo.py -c configs/mvd_gso.yaml
Traceback (most recent call last):
File "demo.py", line 17, in
from pytorch_lightning import seed_everything
File "/opt/conda/lib/python3.8/site-packages/pytorch_lightning/init.py", line 20, in
from pytorch_lightning import metrics # noqa: E402
File "/opt/conda/lib/python3.8/site-packages/pytorch_lightning/metrics/init.py", line 15, in
from pytorch_lightning.metrics.classification import ( # noqa: F401
File "/opt/conda/lib/python3.8/site-packages/pytorch_lightning/metrics/classification/init.py", line 14, in
from pytorch_lightning.metrics.classification.accuracy import Accuracy # noqa: F401
File "/opt/conda/lib/python3.8/site-packages/pytorch_lightning/metrics/classification/accuracy.py", line 18, in
from pytorch_lightning.metrics.utils import deprecated_metrics, void
File "/opt/conda/lib/python3.8/site-packages/pytorch_lightning/metrics/utils.py", line 29, in
from pytorch_lightning.utilities import rank_zero_deprecation
File "/opt/conda/lib/python3.8/site-packages/pytorch_lightning/utilities/init.py", line 18, in
from pytorch_lightning.utilities.apply_func import move_data_to_device # noqa: F401
File "/opt/conda/lib/python3.8/site-packages/pytorch_lightning/utilities/apply_func.py", line 31, in
from torchtext.legacy.data import Batch
ModuleNotFoundError: No module named 'torchtext.legacy'

which can be handled by changing the version of torchtext to 0.10.x (in current env is 0.12.0)
but when i try to reinstall torchtext the version of torch is automatically changed to older version
is it okay to use older version of torch?
and it would be thankful if you can let me the versions of packages you used

Thanks

commented

Thanks for trying out the code! I dumped the versions of pytorch related packages from an environment that is working.

I can't seem to find torchtext anywhere. But I assume yes older version of torch will work.

I would also check out the environment in the colab demo, because it is a pretty lean installation on top of colab.

# Name                    Version                   Build  Channel
python                    3.8.5                h7579374_1  
python-dateutil           2.8.2              pyhd3eb1b0_0  
python-multipart          0.0.6                    pypi_0    pypi
python_abi                3.8                      2_cp38    conda-forge
pytorch                   1.11.0          py3.8_cuda11.3_cudnn8.2.0_0    pytorch
pytorch-lightning         1.4.2                    pypi_0    pypi
pytorch-mutex             1.0                        cuda    pytorch
pytorch3d                 0.7.0                    pypi_0    pypi
transformers              4.25.1                   pypi_0    pypi

that's weird...
could you show me the list from pip list | grep torch?
it seems to be that pytorch-lightning use torchtext.legacy when importing packages

commented

here!

pytorch-lightning           1.4.2
pytorch3d                   0.7.1
torch                       1.11.0
torch-ema                   0.3
torchaudio                  0.11.0
torchmetrics                0.6.0
torchvision                 0.12.0