safellama / plexiglass

A toolkit for detecting and protecting against vulnerabilities in Large Language Models (LLMs).
Apache License 2.0
121 stars 12 forks source link

Cannot import detectors #4

Closed XinDongol closed 4 years ago

XinDongol commented 4 years ago

I installed plexiglass-1.0.9 with

pip install plexiglass -U

Got some error when importing it

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-0e3709df6528> in <module>
----> 1 from plexiglass.adversarial import FGSM, test_robustness
      2 import torch
      3 import timm
      4 from pprint import pprint
      5 import pytorchcv as ptcv

~/.local/lib/python3.6/site-packages/plexiglass/__init__.py in <module>
----> 1 from . import detectors
      2 from . import adversarial

ImportError: cannot import name 'detectors'
enochkan commented 4 years ago

@XinDongol thanks for bringing this to my attention. May I ask which Python version you're using? This issue may be related to the circular import issue. Will try my best to push a fix by EoD today.

XinDongol commented 4 years ago

I am using 3.6.5. Thanks

enochkan commented 4 years ago

@XinDongol Can you please try to download version 1.1.3 and see if the issue is resolved? Thanks!

XinDongol commented 4 years ago

1.1.3 works well magically. Thanks for your rapid response.

enochkan commented 4 years ago

@XinDongol no problem at all. Thanks for letting me know. You are totally welcome to contribute as well 👍