opendp / smartnoise-sdk

Tools and service for differentially private processing of tabular and relational data
MIT License
254 stars 68 forks source link

"The returned privacy budget will be incorrect" with DPGAN / DPCTGAN #569

Open hharcolezi opened 1 year ago

hharcolezi commented 1 year ago

My environment (Windows 11): Python 3.8.17 ipykernel 6.19.2 ipython 8.12.0 numpy 1.24.4 opacus 0.14.0 opendp 0.7.0 pac-synth 0.0.8 smartnoise-sql 1.0.1 smartnoise-synth 1.0.1 torch 1.13.1

I installed smartnoise-synth 1.0.1 and I'm trying to run: from snsynth.pytorch.nn import DPGAN from snsynth.pytorch import PytorchDPSynthesizer pums = pd.read_csv("PUMS.csv") synth = PytorchDPSynthesizer(epsilon=3.0, gan=DPGAN()) synth.fit(pums, preprocessor_eps=1.0) pums_synth = synth.sample(1000)

The error message: ...\lib\site-packages\opacus\privacy_engine.py:638: UserWarning: The sample rate will be defined from batch_size and sample_size.The returned privacy budget will be incorrect.

Is there a way to correct this? Or how can I circumvent this error?

Thanks in advance for your help and time.