neulab / RIPPLe

Code for the paper "Weight Poisoning Attacks on Pre-trained Models" (ACL 2020)
BSD 3-Clause "New" or "Revised" License
138 stars 18 forks source link

Can't run RIPPLe without embedding surgery #4

Open ziqi-zhang opened 4 years ago

ziqi-zhang commented 4 years ago

Hi @pmichel31415 ,

I tried to run RIPPLe without embedding surgery but found there is a problem. I set poison_method to "pretrain" according to manifesto_examples.yaml and keep everything else unchanged. And the program corrupts when "Loading features from cached file constructed_data/sst_poisoned_example_train/cached_train_bert-base-uncased_128_sst-2". It seems that the program can't load the training data. But When I run with poison_method=pretrain_combined there is no problem. And I avert this problem by setting a new path to the training data but I think these two data are the same.

Btw I think maybe I found another small problem here. These three python scripts will output to the same directory and the results of the first two run() is over-written.

Thanks, Ziqi

pmichel31415 commented 4 years ago

Sorry for the late reply and thanks for bringing this up! What is the error message exactly when the program ends? Does it nor find the data even though the file exists?

Re the other bug: from what I can tell these run calls only evaluate the model right? They don't actually write to disk so nothing should get overwritten no? Or am I wrong?

ziqi-zhang commented 4 years ago

I think it misses something but sadly I fail to find what it is. But now I've bypassed it by setting a new path.

The other problem is just a reminder because I find they will overwrite the same result log file. If I want to read the results from the files instead of the terminal then the results are missed. But it is not a serious bug, I just think it can improve the efficiency of doing experiments.

And thanks again for the maintenance and patient reply to my problems!

pmichel31415 commented 4 years ago

Got it. I will keep this issue open then, so people who encounter the same issue can see the solution. Maybe if I have time later I will push a fix (if you ever have time, a pull request is also welcome).