diff --git a/dpsynth/__init__.py b/dpsynth/__init__.py index bfab1311..9d42abe6 100644 --- a/dpsynth/__init__.py +++ b/dpsynth/__init__.py @@ -29,7 +29,6 @@ from dpsynth._checkpoint import checkpoint from dpsynth.data_generation_v3 import TabularConfig from dpsynth.data_generation_v3 import TabularMechanism -from dpsynth.data_generation_v3 import TabularSynthesizer from dpsynth.discrete_mechanisms.discrete import DiscreteConfig from dpsynth.discrete_mechanisms.discrete import DiscreteMechanism from dpsynth.domain import CategoricalAttribute @@ -68,7 +67,6 @@ 'Schema', 'TabularConfig', 'TabularMechanism', - 'TabularSynthesizer', 'api', 'calibrate', 'checkpoint', diff --git a/dpsynth/data_generation_v3.py b/dpsynth/data_generation_v3.py index 21408bc5..5a0a7060 100644 --- a/dpsynth/data_generation_v3.py +++ b/dpsynth/data_generation_v3.py @@ -18,7 +18,6 @@ from collections.abc import Mapping, Sequence import dataclasses -import warnings from absl import logging import dp_accounting @@ -537,16 +536,3 @@ def configure( initializers=calibrated_inits, max_records_per_user=max_records_per_user, ) - - -@dataclasses.dataclass(frozen=True, kw_only=True) -class TabularSynthesizer(TabularConfig): - """Deprecated. Use TabularConfig and TabularMechanism instead.""" - - def __post_init__(self): - warnings.warn( - 'TabularSynthesizer is deprecated. Use TabularConfig for configuration ' - 'and TabularMechanism for the calibrated runnable mechanism.', - DeprecationWarning, - stacklevel=2, - ) diff --git a/tests/data_generation_v3_test.py b/tests/data_generation_v3_test.py index c488bafc..7fe53278 100644 --- a/tests/data_generation_v3_test.py +++ b/tests/data_generation_v3_test.py @@ -494,14 +494,6 @@ def test_configure_schema_with_constraints(self): calibrated = config.configure(schema, zcdp_rho=100.0) self.assertEqual(calibrated.schema.constraints, (mock_constraint,)) - def test_tabular_synthesizer_deprecated(self): - with self.assertWarnsRegex( - DeprecationWarning, - 'TabularSynthesizer is deprecated. Use TabularConfig for configuration ' - 'and TabularMechanism for the calibrated runnable mechanism.', - ): - data_generation_v3.TabularSynthesizer(domains={}) - def test_compress_columns(self): domains = { 'A': domain.CategoricalAttribute(