# SDV Synthesizers

The [SDV library](https://github.com/sdv-dev/SDV) offers a variety of synthesizers that you can use for creating synthetic data and benchmarking it. Pass the string names into the `synthesizers` parameter.

```python
import sdgym

sdgym.benchmark_single_table(
    synthesizers=['GaussianCopulaSynthesizer', 'SegmentSynthesizer']
)
```

SDGym offers native integration with SDV Synthesizers. Name any synthesizer that you have access to in the SDV library.

* [Single Table Synthesizers](https://docs.sdv.dev/sdv/single-table-data/modeling/synthesizers): Provide the name of a basic or specialty single-table synthesizers
* [Multi Table Synthesizers](https://docs.sdv.dev/sdv/multi-table-data/modeling/synthesizers): Provide the name of a multi-table synthesizer

{% hint style="info" %}
The SDGym library uses the **default settings** of each synthesizer. To change them, create a variant using the steps below.
{% endhint %}

{% hint style="warning" %}
All SDV synthesizers are compatible with SDGym except for the single and multi-table DayZSynthesizer. This synthesizer is not designed to learn a model from the real data, and so cannot be used for benchmarking purposes.
{% endhint %}

## Create an SDV variant

Many of the SDV synthesizers can be tuned by setting different parameters. You can test these parameters by creating a variant of the synthesizer.

### create\_sdv\_synthesizer\_variant

Use this method to create a variant of an SDV synthesizer.

```python
from sdgym import create_sdv_synthesizer_variant

GammaCopulaSynthesizer = create_sdv_synthesizer_variant(
  synthesizer_class='GaussianCopulaSynthesizer',
  synthesizer_parameters={ 'default_distribution': 'gamma' }
  display_name='GammaCopulaSynthesizer'
)
```

**Parameters**

* (required) `synthesizer_class`: A string with the name of the synthesizer. This can be any SDV synthesizer.
* (required) `synthesizer_parameters`: A dictionary mapping the name of each parameter to the value that you'd like to set for it. The parameters and values may be different for each synthesizer. For more information, see the [SDV API](https://sdv.dev/SDV/api_reference/index.html).
* (required) `display_name`: A string that identifies this variant. The display name will appear in the benchmarking results.

**Returns** A synthesizer class that you can use directly in the benchmarking script

### Using your synthesizer variant

To use your synthesizer variant for benchmarking, provide the class using the `custom_synthesizers` parameter. For example:

```python
import sdgym

sdgym.benchmark_single_table(
    custom_synthesizers=[GammaCopulaSynthesizer]
)
```

### Results

Results from your synthesizer variant will be labeled by the provided `display_name`.

```
Synthesizer                      Dataset   Dataset_Size_MB   Model_Time   Peak_Memory_KB   Model_Size_MB    Sample_Time    Evaluate_Time   Quality Score   NewRowSynthesis
Variant:GammaCopulaSynthesizer   alarm     34.5              45.45        100201           0.340            2012.2         1001.2          0.71882         0.99901           
```

See [Interpreting Results](https://docs.sdv.dev/sdgym/benchmarking/interpreting-results) for more details.
