thuml / Transfer-Learning-Library

Transfer Learning Library for Domain Adaptation, Task Adaptation, and Domain Generalization
http://transfer.thuml.ai
MIT License
3.39k stars 553 forks source link

Failed to import mmdetection #163

Closed SeucheAchat9115 closed 2 years ago

SeucheAchat9115 commented 2 years ago

When i try to run source_only.py I get the error message "No module named 'tlllib.vision.models.object_detection.backbone.mmdetection'"

If I try to import "tlllib.vision.models.object_detection" it seems that the error is in the file backbone/vgg.py in "from .mmdetection.vgg import VGG. Any clue how I can fix this?

thucbx99 commented 2 years ago

I just tried it and found no problem. Can you find this file in the corresponding directory?

image
SeucheAchat9115 commented 2 years ago

The problem was I installed tllib using pip, but this somehow did not work. Therefore I had to uninstall it and load tllib from the source files directly.

thucbx99 commented 2 years ago

Temporarily tllib does not support installing via pip yet, we are planning to support it recently.

thucbx99 commented 2 years ago

We have supported installing tllib via pip using the following command.

pip install -i https://test.pypi.org/simple/ tllib==0.4

mahilaMoghadami commented 9 months ago

I have still this problem and get the error, how can I solve it? error: ModuleNotFoundError: No module named 'tllib.vision.models.object_detection.backbone.mmdetection'

I tried to installed tllib with both pip and source file, but it didnt work for me. appreciate your help.

mahilaMoghadami commented 9 months ago

The problem was I installed tllib using pip, but this somehow did not work. Therefore I had to uninstall it and load tllib from the source files directly.

hello could you please tell me how did you do that? thank you.

SeucheAchat9115 commented 9 months ago

I cloned the tlllib from github and then it worked. No need to pip install.