Skip to main content

This repository is part of The Synthetic Data Vault Project, a project from DataCebo.

Development Status Travis PyPi Shield Downloads Slack

Overview

The Synthetic Data Gym (SDGym) is a benchmarking framework for modeling and generating synthetic data. Measure performance and memory usage across different synthetic data modeling techniques – classical statistics, deep learning and more!

The SDGym library integrates with the Synthetic Data Vault ecosystem. You can use any of its synthesizers, datasets or metrics for benchmarking. You can also customize the process to include your own work.

  • Datasets: Select any of the publicly available datasets from the SDV project, or input your own data.
  • Synthesizers: Choose from any of the SDV synthesizers and baselines. Or write your own custom machine learning model.
  • Evaluation: In addition to performance and memory usage, you can also measure synthetic data quality and privacy through a variety of metrics.

Install

Install SDGym using pip or conda. We recommend using a virtual environment to avoid conflicts with other software on your device.

pip install sdgym
conda install -c pytorch -c conda-forge sdgym

For more information about using SDGym, visit the SDGym Documentation.

Usage

Let's benchmark synthetic data generation for single tables. First, let's define which modeling techniques we want to use. Let's choose a few synthesizers from the SDV library and a few others to use as baselines.

# these synthesizers come from the SDV library
# each one uses different modeling techniques
sdv_synthesizers = ['GaussianCopulaSynthesizer', 'CTGANSynthesizer']

# these basic synthesizers are available in SDGym
# as baselines
baseline_synthesizers = ['UniformSynthesizer']

Now, we can benchmark the different techniques:

import sdgym

sdgym.benchmark_single_table(synthesizers=(sdv_synthesizers + baseline_synthesizers))

The result is a detailed performance, memory and quality evaluation across the synthesizers on a variety of publicly available datasets.

Supplying a custom synthesizer

Benchmark your own synthetic data generation techniques. Define your synthesizer by specifying the training logic (using machine learning) and the sampling logic.

def my_training_logic(data, metadata):
    # create an object to represent your synthesizer
    # train it using the data
    return synthesizer


def my_sampling_logic(trained_synthesizer, num_rows):
    # use the trained synthesizer to create
    # num_rows of synthetic data
    return synthetic_data

Learn more in the Custom Synthesizers Guide.

Customizing your datasets

The SDGym library includes many publicly available datasets that you can include right away. List these using the list_datasets feature.

sdgym.dataset_explorer.DatasetExplorer().list_datasets()
dataset_name   size_MB     num_tables
KRK_v1         0.072128    1
adult          3.907448    1
alarm          4.520128    1
asia           1.280128    1
...

You can also include any custom, private datasets that are stored on your computer on an Amazon S3 bucket.

my_datasets_folder = 's3://my-datasets-bucket'

For more information, see the docs for Customized Datasets.

What's next?

Visit the SDGym Documentation to learn more!




The Synthetic Data Vault Project was first created at MIT's Data to AI Lab in 2016. After 4 years of research and traction with enterprise, we created DataCebo in 2020 with the goal of growing the project. Today, DataCebo is the proud developer of SDV, the largest ecosystem for synthetic data generation & evaluation. It is home to multiple libraries that support synthetic data, including:

  • 🔄 Data discovery & transformation. Reverse the transforms to reproduce realistic data.
  • 🧠 Multiple machine learning models -- ranging from Copulas to Deep Learning -- to create tabular, multi table and time series data.
  • 📊 Measuring quality and privacy of synthetic data, and comparing different synthetic data generation models.

Get started using the SDV package -- a fully integrated solution and your one-stop shop for synthetic data. Or, use the standalone libraries for specific needs.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sdgym-0.15.0.tar.gz (115.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sdgym-0.15.0-py3-none-any.whl (127.3 kB view details)

Uploaded Python 3

File details

Details for the file sdgym-0.15.0.tar.gz.

File metadata

  • Download URL: sdgym-0.15.0.tar.gz
  • Upload date:
  • Size: 115.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sdgym-0.15.0.tar.gz
Algorithm Hash digest
SHA256 9213478d527a2426796c9fb0850eba4183a8eb2b853704e4f46f6b32201df673
MD5 299407ca70b4450784c1e158a3561b60
BLAKE2b-256 082ba5f06e32b9df998cc58cfee2a58339871eff118be1448e642b621ffa16af

See more details on using hashes here.

Provenance

The following attestation bundles were made for sdgym-0.15.0.tar.gz:

Publisher: release.yml on sdv-dev/SDGym

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sdgym-0.15.0-py3-none-any.whl.

File metadata

  • Download URL: sdgym-0.15.0-py3-none-any.whl
  • Upload date:
  • Size: 127.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sdgym-0.15.0-py3-none-any.whl
Algorithm Hash digest
SHA256 565797e33407c45d0a7ee159a7e914f716c9f182e866327d80f3256fb96babdd
MD5 7502d5983cc839e7a019b5e640826364
BLAKE2b-256 cc224fa4a23a84fc0d5d6128416bf9aabd894e64511c2247acbbc9cb451878fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for sdgym-0.15.0-py3-none-any.whl:

Publisher: release.yml on sdv-dev/SDGym

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.15.0 This release

2 files

0.14.4

2 files

0.14.3

2 files

0.14.2

2 files

0.14.1

2 files

0.14.0

2 files

0.13.1

2 files

0.13.0

2 files

0.12.1

2 files

0.12.0

2 files

0.11.1

2 files

0.11.0

2 files

0.10.0

2 files

0.9.1

2 files

0.9.0

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.1

2 files

0.4.0

2 files

0.3.1

2 files

0.3.0

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page