Skip to main content

A CLI for generating synthetic data

Project description

Synda

[!WARNING] This project is in its very early stages of development and should not be used in production environments.

[!NOTE] PR are more than welcome. Check the roadmap if you want to contribute or create discussion to submit a use-case.

Synda (synthetic data) is a package that allows you to create synthetic data generation pipelines. It is opinionated and fast by design, with plans to become highly configurable in the future.

Installation

Synda requires Python 3.10 or higher.

You can install Synda using pip:

pip install synda

Usage

  1. Create a YAML configuration file (e.g., config.yaml) that defines your pipeline:
input:
  type: csv
  properties:
    path: source.csv  # relative path to your source file
    target_column: content
    separator: "\t"

pipeline:
  - type: split
    method: chunk
    parameters:
      size: 500

  - type: generation
    method: llm
    parameters:
      provider: openai
      model: gpt-4o-mini
      template: |
        Ask a question regarding the content.
        content: {chunk}

        Instructions :
        1. Use english only
        2. Keep it short

        question:

  - type: ablation
    method: llm-judge-binary
    parameters:
      provider: openai
      model: gpt-4o-mini
      consensus: all
      criteria:
        - Is the text written in english?
        - Is the text consistent?

output:
  type: csv
  properties:
    path: tests/stubs/simple_pipeline/output.csv
    separator: "\t"
  1. Add a model provider:
synda provider add openai --api-key [YOUR_API_KEY]
  1. Generate some synthetic data:
synda generate config.yaml

Pipeline Structure

The Nebula pipeline consists of three main parts:

  • Input: Data source configuration
  • Pipeline: Sequence of transformation and generation steps
  • Output: Configuration for the generated data output

Available Pipeline Steps

Currently, Synda supports three pipeline steps (as shown in the example above):

  • split: Breaks down data into chunks of defined size (method: chunk)
  • generation: Generates content using LLM models (method: llm)
  • ablation: Filters data based on defined criteria (method: llm-judge-binary)

More steps will be added in future releases.

Roadmap

The following features are planned for future releases:

  • Implement a Proof of Concept
  • Implement a common interface (Node) for input and output of each step
  • Add SQLite support
  • Add setter command for provider variable (openai, etc.)
  • Store each execution and step in DB
  • Allow pausing and resuming pipelines
  • Enable caching of each step's output
  • Trace each synthetic data with his historic
  • Design other step & methods
  • Implement custom scriptable step for developer
  • Add Ollama, VLLM and transformers provider
  • Add a programmatic API
  • Use Ray for large workload

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Project details


Download files

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

Source Distribution

synda-0.2.0.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

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

synda-0.2.0-py3-none-any.whl (24.8 kB view details)

Uploaded Python 3

File details

Details for the file synda-0.2.0.tar.gz.

File metadata

  • Download URL: synda-0.2.0.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.13.1 Darwin/24.1.0

File hashes

Hashes for synda-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1fb4a54f39047259a4e23dd177e7fdc9bc5c3a925dd4b43c35c237b046176f2c
MD5 b293e8b9d2d4bdb97bd61e6d56e54ef4
BLAKE2b-256 f4ab73e0a4eec28b3db9517d98a49781dfdfccae17fcdd5f07bcb723e1a82a1c

See more details on using hashes here.

File details

Details for the file synda-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: synda-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 24.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.13.1 Darwin/24.1.0

File hashes

Hashes for synda-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0ec7ad974198fa4e88d378ee07949d8395b1161b0791056a0aa040798197a39a
MD5 60b75ee5a72c7f926f4328807eab6a0a
BLAKE2b-256 193fc475e3257b17cce58ee5f566ae623d983bb900e20398d47b3bd82213c408

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page