lxuechen / private-transformers

A codebase that makes differentially private training of transformers easy.

Home Page:https://arxiv.org/abs/2110.05679

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Function for "get_privacy_stats()"

XuandongZhao opened this issue · comments

I try to run the table2text example but there is an error:

  File "/home/xuandongz/dp/private-transformers/examples/table2text/run_language_modeling.py", line 302, in <module>
    main()
  File "/home/xuandongz/dp/private-transformers/examples/table2text/run_language_modeling.py", line 283, in main
    trainer.train(model_path=None)
  File "/home/xuandongz/dp/private-transformers/examples/table2text/trainer.py", line 522, in train
    metrics = self.evaluate(epoch=epoch)
  File "/home/xuandongz/dp/private-transformers/examples/table2text/trainer.py", line 767, in evaluate
    privacy_stats = pe.get_privacy_stats()
AttributeError: 'PrivacyEngine' object has no attribute 'get_privacy_stats'

I checked about privacy_engine.py but didn't find the function 'get_privacy_stats'. Or is it 'get_training_stats'?

Fixed. Sorry for this typo. Feel free to drop more comments if you find anything fishy. Thanks.