clovaai / spade

Apache License 2.0
81 stars 20 forks source link

Error in pred_cord.sh #17

Closed yellowjs0304 closed 2 years ago

yellowjs0304 commented 2 years ago

Thank you for sharing nice work. I wanna check the pred_cord scripts. I followed all script in your readme file. But, I'm using 3090 RTX, so I couldn't install the version in the requirement.txt file. It returns like this errors. Could you please check this problem? (+ below is pip list in my anaconda env)

Package                 Version
----------------------- ---------------
absl-py                 0.13.0
addict                  2.4.0
aiohttp                 3.8.1
aiosignal               1.2.0
antlr4-python3-runtime  4.8
async-timeout           4.0.2
attrs                   21.4.0
cachetools              4.2.2
certifi                 2021.5.30
cffi                    1.14.3
charset-normalizer      2.0.4
click                   8.0.1
colorama                0.4.4
colorlog                6.4.1
cosine-annealing-warmup 2.0
cycler                  0.10.0
Cython                  0.29.24
editdistance            0.5.3
filelock                3.6.0
frozenlist              1.3.0
fsspec                  2022.1.0
future                  0.18.2
google-auth             1.35.0
google-auth-oauthlib    0.4.6
grpcio                  1.40.0
huggingface-hub         0.4.0
idna                    3.2
iniconfig               1.1.1
joblib                  1.0.1
kiwisolver              1.3.2
lmdb                    1.2.1
Markdown                3.3.4
matplotlib              3.4.3
mkl-fft                 1.3.0
mkl-random              1.2.2
mkl-service             2.4.0
mmcv                    0.2.12
multidict               6.0.2
munch                   2.5.0
nltk                    3.6.2
numpy                   1.21.2
oauthlib                3.1.1
olefile                 0.46
omegaconf               2.1.1
opencv-python           4.5.3.56
opencv-python-headless  4.5.2.54
packaging               21.3
pandas                  1.3.3
Pillow                  8.3.2
pip                     21.2.4
pluggy                  0.13.1
Polygon3                3.0.9.1
protobuf                3.18.0
py                      1.11.0
pyasn1                  0.4.8
pyasn1-modules          0.2.8
pyclipper               1.3.0
pycparser               2.20
pyDeprecate             0.3.1
pyparsing               2.4.7
pytest                  6.2.3
python-dateutil         2.8.2
pytorch-lightning       1.5.10
pytz                    2021.1
PyYAML                  5.4.1
regex                   2021.8.28
requests                2.26.0
requests-oauthlib       1.3.0
rsa                     4.7.2
sacremoses              0.0.47
scipy                   1.7.1
seaborn                 0.11.2
setuptools              59.5.0
six                     1.16.0
tensorboard             2.6.0
tensorboard-data-server 0.6.1
tensorboard-plugin-wit  1.8.0
tensorboardX            2.4
tokenizers              0.10.3
toml                    0.10.2
torch                   1.10.2+cu113
torchaudio              0.9.0a0+33b2469
torchmetrics            0.7.2
torchvision             0.11.3+cu113
tqdm                    4.62.2
transformers            4.16.2
typing-extensions       3.10.0.2
urllib3                 1.26.6
Werkzeug                2.0.1
wheel                   0.37.0
yarl                    1.7.2

image

whwang299 commented 2 years ago

Hi @yellowjs0304

Hm.. strange. You may turn off "ddp"?

https://github.com/clovaai/spade/blob/a85574ceaa00f1878a23754f283aa66bc2daf082/spade/model/run_model.py#L61

https://github.com/clovaai/spade/blob/a85574ceaa00f1878a23754f283aa66bc2daf082/configs/cord.1.5layers.train.yaml#L122

Wonseok

locomotiivo commented 2 years ago

I was using Jupyter notebook when I got the same error, and after a bit of "experimenting" I have managed to find a temporary "work-around" by changing the following line

https://github.com/clovaai/spade/blob/a85574ceaa00f1878a23754f283aa66bc2daf082/spade/model/model.py#L545

Into "def predict_step(self, batch, batch_idx, _datasetidx=0):"

But I highly doubt this is even a right answer. Any answer or a proper workaround would be really appreciated, thanks :)

yellowjs0304 commented 2 years ago

Sorry, I saw really late. I didn't modified any option about yaml (what you told "ddp"?). I'll follow unleft's comment. thank you so much.