Open igoryash-kudryash opened 3 years ago
it's a rare case I'd say
I'm not sure whether the problem is caused by colab (probably not)
can you make sure cython is indeed not used? this can be done by adding a printing function to the code to make sure if cython is unused
and if possible, please explain how this error can be reproduced so it's easier for debugging
That is the way I install all packages and etc. (I do not create virtual env cus I do not think it is necessary in Google Colab, but I believe it does not cause the problem). I already restarted runtime and skipped the output.
So when I execute cell with setup.py I do not have any problems with Cython
Then I execute import torchreid
And if I execute it again, I do not get any output, but I wrote this part in rank.py
try:
from torchreid.metrics.rank_cylib.rank_cy import evaluate_cy
IS_CYTHON_AVAI = True
print(IS_CYTHON_AVAI, "$$$$$$ in try $$$$$") # T H I S
except ImportError:
IS_CYTHON_AVAI = False
print(IS_CYTHON_AVAI, "~~~~~ in except ~~~~~~") # T H I S
warnings.warn(
"Cython evaluation (very fast so highly recommended) is "
"unavailable, now use python evaluation."
)
When I try to impor torchereid I got this Warning![1](https://user-images.githubusercontent.com/64641456/98804303-0fa92580-2427-11eb-809c-372b46c8f16c.png)
Cython evaluation (very fast so highly recommended) is unavailable, now use python evaluation.
I have tried some solutions (e.g. https://github.com/KaiyangZhou/deep-person-reid/issues/160). The thing is, when I import torchreid second time in a row, I do not get this Warning, but the calculus are still very slow (like there is no Cython). P.S. I work in Google Colab. Could this be causing the problem? P.P.S. the results of test_cython.py: