CameraTraps icon indicating copy to clipboard operation
CameraTraps copied to clipboard

problem with MegadetectorV6

Open Ladanovasv opened this issue 1 year ago • 7 comments

Search before asking

  • [X] I have searched the Pytorch-Wildlife issues and found no similar bug report.

Bug

Hi, Thanks for the code and model weights.

I try to use MegadetectorV6 and I have a problem LooseVersion = distutils.version.LooseVersion AttributeError: module 'distutils' has no attribute 'version'

How can I fix it?

Environment

No response

Minimal Reproducible Example

No response

Additional

No response

Are you willing to submit a PR?

  • [ ] Yes I'd like to help by submitting a PR!

Ladanovasv avatar Sep 09 '24 14:09 Ladanovasv

Hello @Ladanovasv , thanks for reporting! This is something we have never seen before. Did you pip install . -e?

zhmiao avatar Sep 10 '24 22:09 zhmiao

Hello @zhmiao, yes, I did

Ladanovasv avatar Sep 11 '24 07:09 Ladanovasv

Hello @Ladanovasv, it might be caused my setuptool versions according to these issues: https://github.com/Lightning-AI/pytorch-lightning/issues/12324 and https://github.com/pytorch/pytorch/issues/69894 . Could you try pip install setuptools==59.5.0 and see if that works?

zhmiao avatar Sep 11 '24 17:09 zhmiao

Hello @zhmiao It is fixed first problem, but I have a new problem. RuntimeError: CUDA error: no kernel image is available for execution on the device CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1.

Ladanovasv avatar Sep 16 '24 07:09 Ladanovasv

Hello @zhmiao It is fixed first problem, but I have a new problem. RuntimeError: CUDA error: no kernel image is available for execution on the device CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1.

Hello @zhmiao It is fixed first problem, but I have a new problem. RuntimeError: CUDA error: no kernel image is available for execution on the device CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1.

This might be related to your cuda version. Do you know what cuda version are you using?

zhmiao avatar Sep 18 '24 18:09 zhmiao

Hello @zhmiao, I am using cuda 12.3

Ladanovasv avatar Sep 23 '24 09:09 Ladanovasv

Hello @zhmiao, I am using cuda 12.3

Do you have problem importing pytorch independently? I did some search and it might be an issue related the compatibility of pytorch and cuda. I assume you are using the pip install -r requirement.txt to install the packages right? That might be the issue because pip install cuda 12.1 version of pytorch by default. Could you try a clean environment and pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124, and see if it works?

zhmiao avatar Sep 23 '24 18:09 zhmiao

Hello @Ladanovasv,

Due to inactivity, this issue will be closed. If you're still encountering the problem, please feel free to reopen it.

Thank you for your contributions!

idchacon28 avatar Feb 25 '25 14:02 idchacon28