PaddlePaddle / PaddleRS

Awesome Remote Sensing Toolkit based on PaddlePaddle.
Apache License 2.0
365 stars 88 forks source link

[General Issue] Can't get PaddleRS working #177

Closed zah-tane closed 7 months ago

zah-tane commented 7 months ago

I have some issues running PaddleRS. As far as I understand, PaddleRS depends on PaddlePaddle and PaddleSlim. PaddleRS requires PaddlePaddle >= 2.5.0 and PaddleSlim requires a module in PaddlePaddle called fluid. But fluid is no longer supported in PaddlePaddle starting from version 2.5.0, and [PaddleSlim has not released a version corresponding to v2.5.0 or v2.5.1, yet](https://github.com/PaddlePaddle/Paddle/issues/55765#issuecomment-1654948375).

I can’t use PaddlePaddle < 2.5.0 because PaddleRS requires PaddlePaddle >= 2.5.0, and I can’t use PaddlePaddle >= 2.5.0 because of the conflict with PaddleSlim.

I tried many things to make it work and understand what is causing the conflict: I tested different combinations of the three libraries to see if I can resolve conflicts, downgraded PaddlePaddle to see if it works, changed the CUDA version and the cuDNN version to try other installation methods, installed using pip, tried again with Docker, ... but I couldn't make it work. Specifically, I get the following error when I import paddlers or paddleslim after installation: ImportError: cannot import name 'MSRA' from 'paddle.fluid.initializer'

Here are the packages and the versions I am using:

paddlepaddle-gpu==2.5.1.post116
paddlers==0.0.0.dev0
paddleslim==2.4.1

other info:

OS: Linux
Python version: 3.9.7
CUDA 11.6/cuDNN 8.9.1

Thank you in advance!

Bobholamovic commented 7 months ago

Hi, PaddleRS v1.0 works with PaddlePaddle 2.4 and PaddleSlim 2.4. To use PaddlePaddle 2.5, please install from the develop branch of PaddleRS and also install from the develop branch of PaddleSlim.

zah-tane commented 7 months ago

Thank you for your response. As per your suggestion, I downgraded the packages to the following versions:

paddlepaddle-gpu==2.4.1.post116
paddlers==1.0b0
paddleslim==2.4.1

However, I got the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/zahra/PaddleRS/PaddleRS/paddlers/__init__.py", line 17, in <module>
    from paddlers.utils.env import get_environ_info, init_parallel_env
  File "/home/zahra/PaddleRS/PaddleRS/paddlers/utils/__init__.py", line 17, in <module>
    from . import postprocs
  File "/home/zahra/PaddleRS/PaddleRS/paddlers/utils/postprocs/__init__.py", line 20, in <module>
    from .change_filter import change_detection_filter
  File "/home/zahra/PaddleRS/PaddleRS/paddlers/utils/postprocs/change_filter.py", line 19, in <module>
    from paddlers.transforms.operators import AppendIndex
  File "/home/zahra/PaddleRS/PaddleRS/paddlers/transforms/__init__.py", line 20, in <module>
    from .batch_operators import BatchRandomResize, BatchRandomResizeByShort, _BatchPad, BatchNormalizeImage, BatchPadRGT, BatchCompose
  File "/home/zahra/PaddleRS/PaddleRS/paddlers/transforms/batch_operators.py", line 19, in <module>
    from paddle.io.dataloader.collate import default_collate_fn
ModuleNotFoundError: No module named 'paddle.io.dataloader'

I got the same error with the following versions as well:

paddlepaddle-gpu==2.4.0.post116
paddlers==1.0b0
paddleslim==2.4.0

Finally, I tried PaddlePaddle 2.5 with the develop versions of the other two packages, namely:


paddlepaddle-gpu==2.5.0.post116
paddlers==0.0.0.dev0
paddleslim==0.0.0.dev0

and my issue was solved.