Open Data Badger
Project description
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
-
Clone the repository:
git clone https://github.com/ashim-mahara/odbg.git cd odbg
-
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.
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 odbg-0.1.0.tar.gz.
File metadata
- Download URL: odbg-0.1.0.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.9.5-200.fc40.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7954b98f5d62c6ed7e068d68d7a918ef99bcc5088a1ccf3a1fe491c6da9c2493
|
|
| MD5 |
792169eab4bc748aedf47723a345eaca
|
|
| BLAKE2b-256 |
4453414a5c585ab2f762f9b5b6f782f8be00d10c76b96275a37c1596b5e24759
|
File details
Details for the file odbg-0.1.0-py3-none-any.whl.
File metadata
- Download URL: odbg-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.9.5-200.fc40.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91aad58cc7640c7ac2582949b03bca48a7e86d71605755613421688b0d39f6fd
|
|
| MD5 |
d8de33a3607f144d1fbca1aa5ee273f1
|
|
| BLAKE2b-256 |
d1ea7f58b9574f007bb93ca52677e63a9a55a52a42b7779ecc37b7cdc262be23
|