Skip to main content

Open Data Badger (ODBG)

Overview

Open Data Badger (ODBG) is a powerful data batching utility designed for OpenAI endpoints, with plans for future support for local language models (LLMs). ODB provides robust tools for managing, submitting, and processing large batches of data efficiently.

Features

  • BatchProcessor:

    • Initializes a SQLite database to store job details.
    • Reads system prompts from a string or file.
    • Creates batch files from input data.
    • Submits batch jobs to OpenAI API.
    • Estimates and processes batches based on maximum batch size and request limits.
    • Supports CSV and Parquet input files.
    • Handles random sampling and dry runs.
    • Verbose mode for detailed batch information.
  • ResultDownloader:

    • Retrieves the status of batch jobs.
    • Downloads and saves results from completed batch jobs.
    • Supports output in CSV and Parquet formats.

Requirements

  • Python 3.6+
  • Poetry for dependency management

Installation

  1. Clone the repository:

    git clone https://github.com/ashim-mahara/odbg.git
    cd odbg
    
  2. Install the required dependencies using Poetry:

    poetry install
    

Usage

BatchProcessor

Use the BatchProcessor to create and submit batch jobs to the OpenAI API.

Example

poetry run python batch_processor.py \
    --base_url https://your-openai-proxy.com \
    --system_prompt "Your system prompt here" \
    --input_file data/input.csv \
    --data_path data/output \
    --text_field text \
    --task_name example_task \
    --model text-davinci-003 \
    --id_field id \
    --description "Example batch processing task" \
    --random_samples 100 \
    --dry_run \
    --verbose

ResultDownloader

Use the ResultDownloader to retrieve and save results from completed batch jobs.

Example

poetry run python result_downloader.py \
    --task_name example_task \
    --task_run_id 1 \
    --output_format csv

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

Metadata

Release files for odbg 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for odbg 0.1.0
File Size Uploaded Provenance Actions
odbg-0.1.0.tar.gz 7.2 kB Without provenance Details for odbg-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for odbg 0.1.0
File Interpreter ABI Platform Actions
odbg-0.1.0-py3-none-any.whl Python 3 none any Details for odbg-0.1.0-py3-none-any.whl

Total release size: 15.1 kB

Release files / odbg-0.1.0.tar.gz

Download URL odbg-0.1.0.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7954b98f5d62c6ed7e068d68d7a918ef99bcc5088a1ccf3a1fe491c6da9c2493
BLAKE2b-256 checksum
How to use checksums
4453414a5c585ab2f762f9b5b6f782f8be00d10c76b96275a37c1596b5e24759
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.3 Linux/6.9.5-200.fc40.x86_64

Release files / odbg-0.1.0-py3-none-any.whl

Download URL odbg-0.1.0-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
91aad58cc7640c7ac2582949b03bca48a7e86d71605755613421688b0d39f6fd
BLAKE2b-256 checksum
How to use checksums
d1ea7f58b9574f007bb93ca52677e63a9a55a52a42b7779ecc37b7cdc262be23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.3 Linux/6.9.5-200.fc40.x86_64

Security for odbg 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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