fra31 / auto-attack

Code relative to "Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attacks"
https://arxiv.org/abs/2003.01690
MIT License
639 stars 111 forks source link

Unable to use Python debugger #88

Open yuezuegu opened 2 years ago

yuezuegu commented 2 years ago

When I call the run_standard_evaluation function in my Python script, it outputs the following warning message and I am no longer able to use the Python debugger in my code due to sys.settrace() calls in the autoattack/checks.py file.

PYDEV DEBUGGER WARNING: sys.settrace() should not be used when the debugger is being used. This may cause the debugger to stop working correctly. If this is needed, please check: http://pydev.blogspot.com/2007/06/why-cant-pydev-debugger-work-with.html to see how to restore the debug tracing back correctly. Call Location: File "/home/yuezuegu/.conda/envs/yuezuegu/lib/python3.8/site-packages/autoattack/checks.py", line 100, in check_dynamic sys.settrace(tracefunc)

fra31 commented 2 years ago

Hi,

check_dynamic is used to detect whether the model performs some kind of optimization during inference, but doesn't affect the attacks. Then, you might skip it to run the evaluation normally. I'm not sure whether there's a better solution, but please let me know in case you find it.

892446631 commented 1 month ago

same problem!!!!!!Linux and Windows11!!!! Pycharm and Vscode!!!!!!!!!! when run_standard_evaluation is called. The debugger will stop

ScarlettChan commented 1 month ago

您好,您的邮件已收到!

fra31 commented 1 month ago

@892446631 Please check the comment above. If that doesn't work for you, please provide more information about the issue.