Generate high-quality, large-scale synthetic datasets 📊🧪
Project description
Learn more · Documentation · Demo
🚀 Generate any structured dataset from scratch • 👤 Anonymize your dataset and be GDPR-compliant
🔥 Highlights
- Want to train a AI model, but don't have a training dataset? Describe it to Synthex and it will generate it for you.
- Need to anonymize your dataset to be GDPR-compliant? Synthex can replicate your dataset and remove Personally Identifiable Information (PII).
- Need to test your software, but don't yet have customer data? Synthex will generate a dataset for you.
⏩ Demo
Don't have time to go through this README? We got you covered. Just click on the button below for an interactive demo.
Introduction
Synthex is a Python library for generating large-scale, high-quality synthetic datasets. It is helpful in cases in which real data is too limited, unbalanced, completely absent or contains Personal Identifiable Information (PII).
Features & Use Cases
Key Features
- Generate any dataset from scratch: you don't need any data at all; Synthex will generate any structured dataset, even if it has no sample dataset to copy from.
- Natural language description: describe your requirements and any constraint the dataset may have in natural language.
- Specify fields and types: Synthex allows you to specify your dataset schema, including field names and types.
Use Cases:
- AI Model Training: lacking training data is no longer an issue; generate any training dataset for AI models with Synthex.
- Dataset anonymization: need a dataset without Personally Identifiable Information to be GDPR-compliant? Synthex is anonymous by default.
- Software testing: we all know testing your new software without customer data is not easy. Synthex will generate a testing dataset for you, so you can populate your DB.
🚀 Quickstart Guide
Installation
Install the library with
pip install synthex
Basic Usage
To create a new dataset, use Synthex.jobs.generate_data(). For this method's full documentation, see the Tanaos Docs.
from synthex import Synthex
client = Synthex()
client.jobs.generate_data(
schema_definition = {
"surface": {"type": "float"},
"number_of_rooms": {"type": "integer"},
"construction_year": {"type": "integer"},
"city": {"type": "string"},
"market_price": {"type": "float"}
},
examples = [
{
"surface": 104.00,
"number_of_rooms": 3,
"construction_year": 1985,
"city": "Nashville",
"market_price": 218000.00
},
{
"surface": 98.00,
"number_of_rooms": 2,
"construction_year": 1999,
"city": "Springfield",
"market_price": 177000.00
},
{
"surface": 52.00,
"number_of_rooms": 1,
"construction_year": 2014,
"city": "Denver",
"market_price": 230000.00
}
],
requirements = [
"The 'market price' field should be realistic and should depend on the characteristics of the property.",
"The 'city' field should specify cities in the USA, and the USA only"
],
output_path = "output_data/output.csv",
number_of_samples = 100,
output_type = "csv"
)
where the parameters are as follows:
-
schema_definition: Adictwhich specifies the output dataset's schema. It must have the following format:{ "<name_of_column_1>": {"type": "<datatype_of_column_1>"}, "<name_of_column_2>": {"type": "<datatype_of_column_2>"}, ... "<name_of_column_n>": {"type": "<datatype_of_column_n>"} }
the possible values of
"type"are"string","integer"and"float". -
examples: AList[dict], which specifies a few (3 to 5 are enough) sample datapoints that will help the data generation model understand what the output data should look like. They must have the same schema as the one specified in theschema_definitionparameter, or an exception will be raised. -
requirements: aList[str], where each string specifies a requirement or constraint for the job. It can be an empty list if no specific requirements are present. -
output_path: astrwhich specifies the path where the output dataset will be generated. It does not need to contain a file name, as this will be added automatically if one is not provided. Ifoutput_pathdoes contain a file name, its extension must be consistent with theoutput_typeparameter. If this is the case, the providedoutput_pathis used in its entirety. Otherwise, the provided extension is replaced with one that is consistent withoutput_type. For example: -
number_of_samples: anintwhich specifies the number of datapoints that the model should generate. Keep in mind that the maximum number of datapoints you can generate with a single job depends on whether you are on a free or paid plan. For example: -
output_type: astrwhich specifies the format of the output dataset. Only"csv"(meaning a .csv file will be generated) is supported at this time, but we will soon add more options.
🔗 Sample Datasets & Demos
- Demo - Create your first Synthetic Dataset: an interactive tutorial on how to use Synthex to create your first synthetic dataset (Live Demo)
- Online Store Chatbot Guardrail Training Dataset: a synthetic dataset, created with Synthex, used for training a Guardrail Model for an online store chatbot (See Dataset on HuggingFace).
🔑 Plans
Free plan: each user enjoys 1500 datapoints per month and 500 datapoints per job for free.
Pay-as-you-go: for additional usage beyond the free tier:
- create an account on our platform
- add credits to it
- create an Api Key and pass it to Synthex at initialization:
from synthex import Synthex client = Synthex( api_key="<your-api-key>" )
The pay-as-you-go pricing is 1$ per 100 datapoints. Once you finish your credits, if you have not exceeded the monthly limit, you will be automatically switched to the free plan.
📚 Documentation & Support
- Full documentation: https://docs.tanaos.com/synthex
- Contact: info@tanaos.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file synthex-0.4.2.tar.gz.
File metadata
- Download URL: synthex-0.4.2.tar.gz
- Upload date:
- Size: 156.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6148a0319437b27690431536ef83ebc37b260e997ebc5b02d46b02a0648f2fac
|
|
| MD5 |
d766e9b84fd681fd80b26695abff4d6c
|
|
| BLAKE2b-256 |
73d9c707077fcabcc2396f5c29860d11aee055e18d0a9808bfe90850d88ea488
|
File details
Details for the file synthex-0.4.2-py3-none-any.whl.
File metadata
- Download URL: synthex-0.4.2-py3-none-any.whl
- Upload date:
- Size: 125.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ef16b8c66bb389f74277d8d48629e0e4f261e29c520db332e6aa7ba5cfbcacd
|
|
| MD5 |
9c075cc4b91613372103cf818f49e1c5
|
|
| BLAKE2b-256 |
f0ff4e436d60da098b0d88920724c5516314461fd1cce104f9ee25ceb125c31f
|