sdv 1.37.3.dev0__tar.gz → 1.37.4.dev0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. {sdv-1.37.3.dev0/sdv.egg-info → sdv-1.37.4.dev0}/PKG-INFO +2 -2
  2. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/pyproject.toml +2 -2
  3. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/__init__.py +1 -1
  4. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/datasets/demo.py +50 -9
  5. sdv-1.37.4.dev0/sdv/evaluation/__init__.py +12 -0
  6. sdv-1.37.4.dev0/sdv/evaluation/evaluation.py +102 -0
  7. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/evaluation/multi_table.py +31 -2
  8. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/evaluation/single_table.py +30 -2
  9. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0/sdv.egg-info}/PKG-INFO +2 -2
  10. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv.egg-info/SOURCES.txt +1 -0
  11. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv.egg-info/requires.txt +1 -1
  12. sdv-1.37.3.dev0/sdv/evaluation/__init__.py +0 -1
  13. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/LICENSE +0 -0
  14. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/README.md +0 -0
  15. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/_utils.py +0 -0
  16. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/cag/__init__.py +0 -0
  17. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/cag/_errors.py +0 -0
  18. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/cag/_utils.py +0 -0
  19. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/cag/base.py +0 -0
  20. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/cag/fixed_combinations.py +0 -0
  21. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/cag/fixed_increments.py +0 -0
  22. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/cag/inequality.py +0 -0
  23. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/cag/one_hot_encoding.py +0 -0
  24. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/cag/programmable_constraint.py +0 -0
  25. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/cag/range.py +0 -0
  26. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/constraints/__init__.py +0 -0
  27. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/constraints/base.py +0 -0
  28. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/constraints/errors.py +0 -0
  29. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/constraints/tabular.py +0 -0
  30. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/constraints/utils.py +0 -0
  31. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/data_processing/__init__.py +0 -0
  32. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/data_processing/data_processor.py +0 -0
  33. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/data_processing/datetime_formatter.py +0 -0
  34. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/data_processing/errors.py +0 -0
  35. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/data_processing/numerical_formatter.py +0 -0
  36. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/data_processing/utils.py +0 -0
  37. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/datasets/__init__.py +0 -0
  38. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/datasets/local.py +0 -0
  39. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/errors.py +0 -0
  40. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/evaluation/_utils.py +0 -0
  41. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/io/__init__.py +0 -0
  42. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/io/local/__init__.py +0 -0
  43. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/io/local/local.py +0 -0
  44. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/lite/__init__.py +0 -0
  45. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/lite/single_table.py +0 -0
  46. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/logging/__init__.py +0 -0
  47. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/logging/logger.py +0 -0
  48. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/logging/sdv_logger_config.yml +0 -0
  49. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/logging/utils.py +0 -0
  50. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/metadata/__init__.py +0 -0
  51. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/metadata/errors.py +0 -0
  52. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/metadata/metadata.py +0 -0
  53. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/metadata/metadata_upgrader.py +0 -0
  54. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/metadata/multi_table.py +0 -0
  55. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/metadata/single_table.py +0 -0
  56. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/metadata/utils.py +0 -0
  57. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/metadata/visualization.py +0 -0
  58. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/metrics/__init__.py +0 -0
  59. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/metrics/demos.py +0 -0
  60. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/metrics/relational.py +0 -0
  61. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/metrics/tabular.py +0 -0
  62. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/metrics/timeseries.py +0 -0
  63. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/multi_table/__init__.py +0 -0
  64. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/multi_table/base.py +0 -0
  65. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/multi_table/dayz.py +0 -0
  66. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/multi_table/hma.py +0 -0
  67. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/multi_table/utils.py +0 -0
  68. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/sampling/__init__.py +0 -0
  69. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/sampling/hierarchical_sampler.py +0 -0
  70. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/sampling/independent_sampler.py +0 -0
  71. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/sampling/tabular.py +0 -0
  72. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/sequential/__init__.py +0 -0
  73. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/sequential/par.py +0 -0
  74. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/single_table/__init__.py +0 -0
  75. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/single_table/base.py +0 -0
  76. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/single_table/copulagan.py +0 -0
  77. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/single_table/copulas.py +0 -0
  78. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/single_table/ctgan.py +0 -0
  79. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/single_table/dayz.py +0 -0
  80. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/single_table/utils.py +0 -0
  81. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/utils/__init__.py +0 -0
  82. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/utils/mixins.py +0 -0
  83. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/utils/poc.py +0 -0
  84. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/utils/utils.py +0 -0
  85. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv/version/__init__.py +0 -0
  86. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv.egg-info/dependency_links.txt +0 -0
  87. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv.egg-info/entry_points.txt +0 -0
  88. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/sdv.egg-info/top_level.txt +0 -0
  89. {sdv-1.37.3.dev0 → sdv-1.37.4.dev0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sdv
3
- Version: 1.37.3.dev0
3
+ Version: 1.37.4.dev0
4
4
  Summary: Generate synthetic data for single table, multi table and sequential data
5
5
  Author-email: "DataCebo, Inc." <info@sdv.dev>
6
6
  License-Expression: BUSL-1.1
@@ -48,7 +48,7 @@ Requires-Dist: deepecho>=0.7.0; python_version < "3.14"
48
48
  Requires-Dist: deepecho>=0.8.0; python_version >= "3.14"
49
49
  Requires-Dist: rdt>=1.18.2; python_version < "3.14"
50
50
  Requires-Dist: rdt>=1.20.0; python_version >= "3.14"
51
- Requires-Dist: sdmetrics>=0.28.0
51
+ Requires-Dist: sdmetrics>=0.28.1
52
52
  Requires-Dist: platformdirs>=4.0
53
53
  Requires-Dist: pyyaml>=6.0.1
54
54
  Provides-Extra: excel
@@ -46,7 +46,7 @@ dependencies = [
46
46
  "deepecho>=0.8.0;python_version>='3.14'",
47
47
  "rdt>=1.18.2;python_version<'3.14'",
48
48
  "rdt>=1.20.0;python_version>='3.14'",
49
- "sdmetrics>=0.28.0",
49
+ "sdmetrics>=0.28.1",
50
50
  'platformdirs>=4.0',
51
51
  'pyyaml>=6.0.1',
52
52
  ]
@@ -149,7 +149,7 @@ namespaces = false
149
149
  version = {attr = 'sdv.__version__'}
150
150
 
151
151
  [tool.bumpversion]
152
- current_version = "1.37.3.dev0"
152
+ current_version = "1.37.4.dev0"
153
153
  parse = '(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<candidate>\d+))?'
154
154
  serialize = [
155
155
  '{major}.{minor}.{patch}.{release}{candidate}',
@@ -6,7 +6,7 @@
6
6
 
7
7
  __author__ = 'DataCebo, Inc.'
8
8
  __email__ = 'info@sdv.dev'
9
- __version__ = '1.37.3.dev0'
9
+ __version__ = '1.37.4.dev0'
10
10
 
11
11
 
12
12
  import sys
@@ -640,6 +640,20 @@ def _find_text_key(contents, dataset_prefix, filename):
640
640
  return None
641
641
 
642
642
 
643
+ def _validate_resource_filepath(resource_filepath):
644
+ """Validate a resource filepath is a string, not undefined and does not begin with slash."""
645
+ if not isinstance(resource_filepath, str):
646
+ raise TypeError('`resource_filepath` must be a string.')
647
+
648
+ if not resource_filepath:
649
+ raise ValueError('`resource_filepath` cannot be empty.')
650
+
651
+ if resource_filepath.startswith('/'):
652
+ raise ValueError(
653
+ "`resource_filepath` must be relative to the dataset and cannot begin with '/'."
654
+ )
655
+
656
+
643
657
  def _validate_text_file_content(modality, output_filepath, filename):
644
658
  """Validation for the text file content method."""
645
659
  _validate_modalities(modality)
@@ -750,7 +764,7 @@ def _save_file_content(
750
764
  dataset_name (str):
751
765
  The name of the dataset.
752
766
  filename (str):
753
- The filename to fetch (``'README.txt'`` or ``'SOURCE.txt'``).
767
+ The filename to fetch (``'README.txt'`` or ``'SOURCE.txt'`, ``'schemas/postgre.sql'``).
754
768
  output_filepath (str):
755
769
  Save the file contents at this path.
756
770
  bucket (str):
@@ -860,10 +874,11 @@ def get_readme(
860
874
  def save_resource(
861
875
  modality,
862
876
  dataset_name,
863
- resource_filename,
864
- output_filepath,
877
+ resource_filepath=None,
878
+ output_filepath=None,
865
879
  s3_bucket_name='sdv-datasets-public',
866
880
  credentials=None,
881
+ resource_filename=None,
867
882
  ):
868
883
  """Save the resource to disk.
869
884
 
@@ -871,11 +886,12 @@ def save_resource(
871
886
  modality (str):
872
887
  The modality of the dataset: ``'single_table'``, ``'multi_table'``, ``'sequential'``.
873
888
  dataset_name (str):
874
- The name of the dataset to get the README for.
875
- resource_filename (str):
876
- The name of the file to download from S3.
877
- output_filepath (str or None):
878
- Optional path where to save the file.
889
+ The name of the dataset to get the resource for.
890
+ resource_filepath (str):
891
+ The location of the file to download from S3. This can be a filename or a filepath.
892
+ The location of the file should be under the dataset.
893
+ output_filepath (str):
894
+ The filepath where the resource should be saved.
879
895
  s3_bucket_name (str, optional):
880
896
  The name of the bucket to download from. Only 'sdv-datasets-public' is supported in
881
897
  SDV Community. SDV Enterprise is required for other buckets. Defaults to
@@ -887,11 +903,36 @@ def save_resource(
887
903
  'license_key': '<MY_LICENSE_KEY>'
888
904
  }
889
905
  Defaults to None.
906
+ resource_filename (str, optional):
907
+ **Deprecated.**
908
+ The name of the file to download from S3. Use
909
+ ``resource_filepath`` instead. Defaults to None.
890
910
  """
911
+ if resource_filepath is None and resource_filename is None:
912
+ raise ValueError('Please provide a `resource_filepath`.')
913
+
914
+ if output_filepath is None:
915
+ raise ValueError('Please provide an `output_filepath`.')
916
+
917
+ if resource_filepath and resource_filename:
918
+ raise ValueError(
919
+ 'Cannot use both `resource_filepath` and `resource_filename`. '
920
+ 'Please use only `resource_filepath`.'
921
+ )
922
+
923
+ if resource_filename is not None:
924
+ deprecation_msg = (
925
+ 'Warning: The `resource_filename` parameter is deprecated. '
926
+ 'Please use the `resource_filepath` parameter instead.'
927
+ )
928
+ warnings.warn(deprecation_msg, FutureWarning)
929
+ resource_filepath = resource_filename
930
+
931
+ _validate_resource_filepath(resource_filepath)
891
932
  _save_file_content(
892
933
  modality=modality,
893
934
  dataset_name=dataset_name,
894
- filename=resource_filename,
935
+ filename=resource_filepath,
895
936
  output_filepath=output_filepath,
896
937
  bucket=s3_bucket_name,
897
938
  credentials=credentials,
@@ -0,0 +1,12 @@
1
+ """Module to compare real and synthetic data."""
2
+
3
+ from sdv.evaluation.evaluation import (
4
+ evaluate_quality,
5
+ run_diagnostic,
6
+ )
7
+
8
+
9
+ __all__ = (
10
+ 'evaluate_quality',
11
+ 'run_diagnostic',
12
+ )
@@ -0,0 +1,102 @@
1
+ """Methods to compare the real and synthetic data."""
2
+
3
+ import pandas as pd
4
+ from sdmetrics.reports import DiagnosticReport, QualityReport
5
+
6
+ from sdv.metadata.metadata import Metadata
7
+
8
+ DEFAULT_SINGLE_TABLE_NAME = 'table'
9
+ ALLOWED_TYPES = (pd.DataFrame, dict)
10
+
11
+
12
+ def _validate_data_type(data, argument_name):
13
+ if not isinstance(data, ALLOWED_TYPES):
14
+ raise TypeError(
15
+ f'{argument_name} must be a pandas DataFrame or dictionary, got {type(data).__name__}.'
16
+ )
17
+
18
+
19
+ def _validate_data(real_data, synthetic_data):
20
+ _validate_data_type(real_data, 'real_data')
21
+ _validate_data_type(synthetic_data, 'synthetic_data')
22
+
23
+ if type(real_data) is not type(synthetic_data):
24
+ raise TypeError(
25
+ 'real_data and synthetic_data must have the same type. '
26
+ f'Got {type(real_data).__name__} and '
27
+ f'{type(synthetic_data).__name__}.'
28
+ )
29
+
30
+
31
+ def _handle_single_table(real_data, synthetic_data, metadata):
32
+ if isinstance(real_data, pd.DataFrame) and isinstance(synthetic_data, pd.DataFrame):
33
+ table_name = DEFAULT_SINGLE_TABLE_NAME
34
+ if isinstance(metadata, Metadata):
35
+ table_name = metadata._get_single_table_name() or table_name
36
+ else:
37
+ metadata = Metadata.load_from_dict(
38
+ metadata.to_dict(), single_table_name=DEFAULT_SINGLE_TABLE_NAME
39
+ )
40
+
41
+ real_data = {table_name: real_data}
42
+ synthetic_data = {table_name: synthetic_data}
43
+
44
+ return real_data, synthetic_data, metadata
45
+
46
+
47
+ def evaluate_quality(real_data, synthetic_data, metadata, verbose=True):
48
+ """Evaluate the quality of the synthetic data.
49
+
50
+ Args:
51
+ real_data (pd.DataFrame):
52
+ The table containing the real data.
53
+ synthetic_data (pd.DataFrame):
54
+ The table containing the synthetic data.
55
+ metadata (Metadata):
56
+ The metadata object describing the real/synthetic data.
57
+ verbose (bool):
58
+ Whether or not to print report summary and progress.
59
+ Defaults to True.
60
+
61
+ Returns:
62
+ QualityReport:
63
+ Single table quality report object.
64
+ """
65
+ _validate_data(real_data, synthetic_data)
66
+ real_data, synthetic_data, metadata = _handle_single_table(
67
+ real_data=real_data,
68
+ synthetic_data=synthetic_data,
69
+ metadata=metadata,
70
+ )
71
+ quality_report = QualityReport()
72
+ quality_report.generate(real_data, synthetic_data, metadata.to_dict(), verbose)
73
+ return quality_report
74
+
75
+
76
+ def run_diagnostic(real_data, synthetic_data, metadata, verbose=True):
77
+ """Run diagnostic report for the synthetic data.
78
+
79
+ Args:
80
+ real_data (pd.DataFrame):
81
+ The table containing the real data.
82
+ synthetic_data (pd.DataFrame):
83
+ The table containing the synthetic data.
84
+ metadata (Metadata):
85
+ The metadata object describing the real/synthetic data.
86
+ verbose (bool):
87
+ Whether or not to print report summary and progress.
88
+ Defaults to True.
89
+
90
+ Returns:
91
+ DiagnosticReport:
92
+ Single table diagnostic report object.
93
+ """
94
+ _validate_data(real_data, synthetic_data)
95
+ real_data, synthetic_data, metadata = _handle_single_table(
96
+ real_data=real_data,
97
+ synthetic_data=synthetic_data,
98
+ metadata=metadata,
99
+ )
100
+ diagnostic_report = DiagnosticReport()
101
+ diagnostic_report.generate(real_data, synthetic_data, metadata.to_dict(), verbose)
102
+ return diagnostic_report
@@ -1,5 +1,7 @@
1
1
  """Methods to compare the real and synthetic data for multi-table."""
2
2
 
3
+ import warnings
4
+
3
5
  from sdmetrics import visualization
4
6
  from sdmetrics.reports.multi_table.diagnostic_report import DiagnosticReport
5
7
  from sdmetrics.reports.multi_table.quality_report import QualityReport
@@ -7,7 +9,7 @@ from sdmetrics.reports.multi_table.quality_report import QualityReport
7
9
  import sdv.evaluation.single_table as single_table_visualization
8
10
 
9
11
 
10
- def evaluate_quality(real_data, synthetic_data, metadata, verbose=True):
12
+ def _evaluate_quality(real_data, synthetic_data, metadata, verbose=True):
11
13
  """Evaluate the quality of the synthetic data.
12
14
 
13
15
  Args:
@@ -30,7 +32,7 @@ def evaluate_quality(real_data, synthetic_data, metadata, verbose=True):
30
32
  return quality_report
31
33
 
32
34
 
33
- def run_diagnostic(real_data, synthetic_data, metadata, verbose=True):
35
+ def _run_diagnostic(real_data, synthetic_data, metadata, verbose=True):
34
36
  """Run diagnostic report for the synthetic data.
35
37
 
36
38
  Args:
@@ -172,3 +174,30 @@ def get_cardinality_plot(
172
174
  parent_primary_key,
173
175
  plot_type,
174
176
  )
177
+
178
+
179
+ DEPRECATED_EVALUATION_FUNCTIONS = {
180
+ 'evaluate_quality': _evaluate_quality,
181
+ 'run_diagnostic': _run_diagnostic,
182
+ }
183
+
184
+ PLOT_FUNCTIONS = {
185
+ 'get_cardinality_plot': get_cardinality_plot,
186
+ 'get_column_pair_plot': get_column_pair_plot,
187
+ 'get_column_plot': get_column_plot,
188
+ }
189
+
190
+
191
+ def __getattr__(name):
192
+ if name in DEPRECATED_EVALUATION_FUNCTIONS:
193
+ warnings.warn(
194
+ "The evaluation functions are now accessible via the 'sdv.evaluation' module.",
195
+ FutureWarning,
196
+ stacklevel=2,
197
+ )
198
+ return DEPRECATED_EVALUATION_FUNCTIONS.get(name)
199
+
200
+ if name not in PLOT_FUNCTIONS:
201
+ raise AttributeError(f'module {__name__!r} has no attribute {name!r}')
202
+
203
+ return PLOT_FUNCTIONS.get(name)
@@ -1,5 +1,7 @@
1
1
  """Methods to compare the real and synthetic data for single-table."""
2
2
 
3
+ import warnings
4
+
3
5
  from sdmetrics import visualization
4
6
  from sdmetrics.reports.single_table.diagnostic_report import DiagnosticReport
5
7
  from sdmetrics.reports.single_table.quality_report import QualityReport
@@ -9,7 +11,7 @@ from sdv.evaluation._utils import _prepare_data_visualization
9
11
  from sdv.metadata.metadata import Metadata
10
12
 
11
13
 
12
- def evaluate_quality(real_data, synthetic_data, metadata, verbose=True):
14
+ def _evaluate_quality(real_data, synthetic_data, metadata, verbose=True):
13
15
  """Evaluate the quality of the synthetic data.
14
16
 
15
17
  Args:
@@ -35,7 +37,7 @@ def evaluate_quality(real_data, synthetic_data, metadata, verbose=True):
35
37
  return quality_report
36
38
 
37
39
 
38
- def run_diagnostic(real_data, synthetic_data, metadata, verbose=True):
40
+ def _run_diagnostic(real_data, synthetic_data, metadata, verbose=True):
39
41
  """Run diagnostic report for the synthetic data.
40
42
 
41
43
  Args:
@@ -165,3 +167,29 @@ def get_column_pair_plot(
165
167
  )
166
168
 
167
169
  return visualization.get_column_pair_plot(real_data, synthetic_data, column_names, plot_type)
170
+
171
+
172
+ DEPRECATED_EVALUATION_FUNCTIONS = {
173
+ 'evaluate_quality': _evaluate_quality,
174
+ 'run_diagnostic': _run_diagnostic,
175
+ }
176
+
177
+ PLOT_FUNCTIONS = {
178
+ 'get_column_pair_plot': get_column_pair_plot,
179
+ 'get_column_plot': get_column_plot,
180
+ }
181
+
182
+
183
+ def __getattr__(name):
184
+ if name in DEPRECATED_EVALUATION_FUNCTIONS:
185
+ warnings.warn(
186
+ "The evaluation functions are now accessible via the 'sdv.evaluation' module.",
187
+ FutureWarning,
188
+ stacklevel=2,
189
+ )
190
+ return DEPRECATED_EVALUATION_FUNCTIONS.get(name)
191
+
192
+ if name not in PLOT_FUNCTIONS:
193
+ raise AttributeError(f'module {__name__!r} has no attribute {name!r}')
194
+
195
+ return PLOT_FUNCTIONS.get(name)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sdv
3
- Version: 1.37.3.dev0
3
+ Version: 1.37.4.dev0
4
4
  Summary: Generate synthetic data for single table, multi table and sequential data
5
5
  Author-email: "DataCebo, Inc." <info@sdv.dev>
6
6
  License-Expression: BUSL-1.1
@@ -48,7 +48,7 @@ Requires-Dist: deepecho>=0.7.0; python_version < "3.14"
48
48
  Requires-Dist: deepecho>=0.8.0; python_version >= "3.14"
49
49
  Requires-Dist: rdt>=1.18.2; python_version < "3.14"
50
50
  Requires-Dist: rdt>=1.20.0; python_version >= "3.14"
51
- Requires-Dist: sdmetrics>=0.28.0
51
+ Requires-Dist: sdmetrics>=0.28.1
52
52
  Requires-Dist: platformdirs>=4.0
53
53
  Requires-Dist: pyyaml>=6.0.1
54
54
  Provides-Extra: excel
@@ -36,6 +36,7 @@ sdv/datasets/demo.py
36
36
  sdv/datasets/local.py
37
37
  sdv/evaluation/__init__.py
38
38
  sdv/evaluation/_utils.py
39
+ sdv/evaluation/evaluation.py
39
40
  sdv/evaluation/multi_table.py
40
41
  sdv/evaluation/single_table.py
41
42
  sdv/io/__init__.py
@@ -2,7 +2,7 @@ boto3<2.0.0,>=1.28
2
2
  botocore<2.0.0,>=1.31
3
3
  graphviz>=0.13.2
4
4
  tqdm>=4.29
5
- sdmetrics>=0.28.0
5
+ sdmetrics>=0.28.1
6
6
  platformdirs>=4.0
7
7
  pyyaml>=6.0.1
8
8
 
@@ -1 +0,0 @@
1
- """Module to compare real and synthetic data."""
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes