AIRI-Institute / fdd-defense

Defense of adversarial attacks on FDD models. fdd-defense is a python library with adversarial attacks on Fault Detection and Diagnostic (FDD) models and defense methods against attacks.
MIT License
2 stars 5 forks source link

Ошибка в QuantizationDefender #9

Open maximtavrickiy opened 2 months ago

maximtavrickiy commented 2 months ago

Ветка dashboard_demo

aadmip1-fastapi-1 | File "/usr/local/lib/python3.11/site-packages/fdd_defense/defenders/quantization.py", line 48, in predict aadmip1-fastapi-1 | def_batch = self.quantize(batch) aadmip1-fastapi-1 | ^^^^^^^^^^^^^^^^^^^^ aadmip1-fastapi-1 | File "/usr/local/lib/python3.11/site-packages/fdd_defense/defenders/quantization.py", line 40, in quantize aadmip1-fastapi-1 | scale = (self.max - self.min) aadmip1-fastapi-1 | ^^^^^^^^ aadmip1-fastapi-1 | AttributeError: 'QuantizationDefender' object has no attribute 'max'

maximtavrickiy commented 2 months ago

Оставшиеся ошибки aamip-errors.log

vpozdnyakov commented 2 months ago

@maximtavrickiy можно проверять

maximtavrickiy commented 2 months ago

Проверили, все работает кроме двух атакеров carlini wagner и deep fool. Ниже логи ошибок @vpozdnyakov

fastapi_1 | File "/usr/local/lib/python3.11/site-packages/fdd_defense/attackers/deep_fool.py", line 22, in attack fastapi_1 | num_classes = self.model.num_states fastapi_1 | ^^^^^^^^^^^^^^^^^^^^^ fastapi_1 | AttributeError: 'LinearModel' object has no attribute 'num_states'

fastapi_1 | File "/usr/local/lib/python3.11/site-packages/fdd_defense/attackers/carlini_wagner.py", line 26, in init fastapi_1 | _min = self.model.dataset.df[self.model.dataset.train_mask].values.min() fastapi_1 | ^^^^^^^^^^^^^^^^^^ fastapi_1 | AttributeError: 'LinearModel' object has no attribute 'dataset'

vpozdnyakov commented 2 months ago

@maximtavrickiy исправил можно проверять