Skip to main content

SAGE Data - Unified dataset management module for SAGE benchmark suite

Project description

SAGE Data ๐Ÿ“Š# SAGE Data ๏ฟฝ๏ฟฝ

Dataset management module for SAGE benchmark suite****Dataset management module for SAGE benchmark suite

Provides unified access to multiple datasets through a two-layer architecture:Provides unified access to multiple datasets through a two-layer architecture:

  • Sources: Physical datasets in sage/data/sources/ (qa_base, bbh, mmlu, gpqa, locomo, orca_dpo, agent_benchmark, etc.)- Sources: Physical datasets (qa_base, bbh, mmlu, gpqa, locomo, orca_dpo)

  • Usages: Logical views for experiments documented in docs/usages/- Usages: Logical views for experiments (rag, libamm, neuromem, agent_eval)

๐Ÿš€ Quick Start## Quick Start

Installation```python

from sage.data import DataManager

# Run the quickstart script (recommended)manager = DataManager.get_instance()

./quickstart.sh

# Access datasets by logical usage profile

# Or install manuallyrag = manager.get_by_usage("rag")

pip install -e .qa_loader = rag.load("qa_base")  # already instantiated

queries = qa_loader.load_queries()

# Install with optional dependencies

pip install -e ".[all]"  # All datasets# Or fetch a specific data source directly

pip install -e ".[datasets]"  # Hugging Face datasetsbbh_loader = manager.get_by_source("bbh")

pip install -e ".[alignment]"  # DPO/alignment toolstasks = bbh_loader.get_task_names()

Basic Usage## Available Datasets

from sage.data import DataManager|---------|-------------|-------------------|---------|

| **qa_base** | Question-Answering with knowledge base | โŒ No (included) | Local files |

manager = DataManager.get_instance()| **locomo** | Long-context memory benchmark | โœ… Yes (`python -m locomo.download`) | Local files (2.68MB) |

| **bbh** | BIG-Bench Hard reasoning tasks | โŒ No (included) | Local JSON files |

# Access datasets by logical usage profile| **mmlu** | Massive Multitask Language Understanding | ๐Ÿ“ฅ Optional (`python -m mmlu.download --all-subjects`) | On-demand or Local (~160MB) |

rag = manager.get_by_usage("rag")| **gpqa** | Graduate-Level Question Answering | โœ… Auto (Hugging Face) | On-demand (~5MB cached) |

qa_loader = rag.load("qa_base")| **orca_dpo** | Preference pairs for alignment/DPO | โœ… Auto (Hugging Face) | On-demand (varies) |

queries = qa_loader.load_queries()

See `examples/` for detailed usage examples.

# Or fetch a specific data source directly

bbh_loader = manager.get_by_source("bbh")## ๐Ÿ“– Examples

tasks = bbh_loader.get_task_names()

```bash

# Access Orca DPO for alignment researchpython examples/qa_examples.py            # QA dataset usage

from sage.data.sources.orca_dpo import OrcaDPODataLoaderpython examples/locomo_examples.py        # LoCoMo dataset usage

dpo_loader = OrcaDPODataLoader()python examples/bbh_examples.py           # BBH dataset usage

examples = dpo_loader.load_data(split="train")python examples/mmlu_examples.py          # MMLU dataset usage

```python examples/gpqa_examples.py          # GPQA dataset usage

python examples/orca_dpo_examples.py      # Orca DPO dataset usage

## ๐Ÿ“ฆ Available Datasetspython examples/integration_example.py    # Cross-dataset integration

| Dataset | Description | Download Required | Storage | Location |

|---------|-------------|-------------------|---------|----------|## License

| qa_base | Question-Answering with knowledge base | โŒ No (included) | Local files | sage/data/sources/qa_base/ |

| locomo | Long-context memory benchmark | โœ… Yes (python -m locomo.download) | Local (2.68MB) | sage/data/sources/locomo/ |MIT License - see LICENSE file.

| bbh | BIG-Bench Hard reasoning tasks | โŒ No (included) | Local JSON | sage/data/sources/bbh/ |

| mmlu | Massive Multitask Language Understanding | ๐Ÿ“ฅ Optional | On-demand/Local (~160MB) | sage/data/sources/mmlu/ |## ๐Ÿ”— Links

| gpqa | Graduate-Level Question Answering | โœ… Auto (HF) | On-demand (~5MB) | sage/data/sources/gpqa/ |

| orca_dpo | Preference pairs for alignment/DPO | โœ… Auto (HF) | On-demand (varies) | sage/data/sources/orca_dpo/ |- Repository: https://github.com/intellistream/sageData

| agent_benchmark | Agent evaluation tasks | โŒ No (included) | Local files | sage/data/sources/agent_benchmark/ |- Issues: https://github.com/intellistream/sageData/issues

| agent_tools | Tool catalog for agents | โŒ No (included) | Local files | sage/data/sources/agent_tools/ |

| agent_sft | SFT conversation data | โŒ No (included) | Local files | sage/data/sources/agent_sft/ |## โ“ Common Issues

๐Ÿ“– ExamplesQ: Where's the LoCoMo data?

A: Run python -m locomo.download to download it (2.68MB from Hugging Face).

python examples/qa_examples.py            # QA dataset usage**Q: How to download MMLU for offline use?**  

python examples/locomo_examples.py        # LoCoMo dataset usageA: Run `python -m mmlu.download --all-subjects` to download all subjects (~160MB).

python examples/bbh_examples.py           # BBH dataset usage

python examples/mmlu_examples.py          # MMLU dataset usage**Q: GPQA access error?**  

python examples/gpqa_examples.py          # GPQA dataset usageA: You need to accept the dataset terms on Hugging Face: https://huggingface.co/datasets/Idavidrein/gpqa

python examples/orca_dpo_examples.py      # Orca DPO dataset usage

python examples/integration_example.py    # Cross-dataset integration**Q: How to use Orca DPO for alignment research?**  

```A: Use `DataManager.get_by_source("orca_dpo")` to get the loader, then use `format_for_dpo()` to prepare data for training.



## ๐Ÿ“ Project Structure---



```**Version**: 0.1.0 | **Last Updated**: December 2025

sageData/
โ”œโ”€โ”€ quickstart.sh              # Quick setup script
โ”œโ”€โ”€ .pre-commit-config.yaml    # Code quality hooks
โ”œโ”€โ”€ pyproject.toml             # Package configuration
โ”œโ”€โ”€ README.md                  # This file
โ”œโ”€โ”€ LICENSE                    # MIT license
โ”œโ”€โ”€ docs/                      # Documentation
โ”‚   โ”œโ”€โ”€ ARCHITECTURE.md        # System architecture
โ”‚   โ””โ”€โ”€ usages/                # Usage profiles (rag, agent_eval, etc.)
โ”œโ”€โ”€ sage/                      # Main package
โ”‚   โ””โ”€โ”€ data/
โ”‚       โ”œโ”€โ”€ manager.py         # DataManager singleton
โ”‚       โ””โ”€โ”€ sources/           # All dataset sources
โ”‚           โ”œโ”€โ”€ orca_dpo/      # DPO preference data
โ”‚           โ”œโ”€โ”€ agent_benchmark/
โ”‚           โ”œโ”€โ”€ agent_tools/
โ”‚           โ””โ”€โ”€ ...
โ”œโ”€โ”€ examples/                  # Usage examples
โ””โ”€โ”€ tests/                     # Test suite

๐Ÿ› ๏ธ Development

Setup Development Environment

# Run quickstart with development dependencies
./quickstart.sh

# Or manually install dev dependencies
pip install pytest pytest-cov black flake8 isort mypy pre-commit
pre-commit install

Run Tests

pytest tests/
pytest tests/ -v --cov=sage

Code Quality

Pre-commit hooks automatically run on git commit:

  • ruff check: Code linting (replaces flake8, isort, pyupgrade)
  • ruff format: Code formatting (replaces black)
  • mypy: Type checking

Run manually:

pre-commit run --all-files

๐Ÿ“š Documentation

  • Architecture: See docs/ARCHITECTURE.md for system design
  • Usage Profiles: See docs/usages/ for experiment configurations
  • API Reference: Use help(DataManager) in Python

License

MIT License - see LICENSE file.

๐Ÿ”— Links

โ“ Common Issues

Q: Where's the LoCoMo data?
A: Run python -m locomo.download to download it (2.68MB from Hugging Face).

Q: How to download MMLU for offline use?
A: Run python -m mmlu.download --all-subjects to download all subjects (~160MB).

Q: GPQA access error?
A: Accept dataset terms on Hugging Face: https://huggingface.co/datasets/Idavidrein/gpqa

Q: How to use Orca DPO for alignment research?
A: Import from sage.data.sources.orca_dpo and use format_for_dpo() to prepare training data.

Q: Where did the root-level docs go?
A: All documentation is now in the docs/ directory for better organization.

๐Ÿ”„ Recent Changes (v0.2.0)

  • โœ… Added quickstart.sh for easy setup
  • โœ… Added .pre-commit-config.yaml for code quality
  • โœ… Moved orca_dpo to sage/data/sources/
  • โœ… Moved documentation to docs/ directory
  • โœ… Moved usage profiles to docs/usages/
  • โœ… Improved project structure and organization

Version: 0.2.0 | Last Updated: January 2026

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

isage_data-0.2.0.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

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

isage_data-0.2.0-py3-none-any.whl (1.5 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: isage_data-0.2.0.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for isage_data-0.2.0.tar.gz
Algorithm Hash digest
SHA256 007242a04cb97dd875f555d216fc8f2f9a80c84ab67b30df209f67b159b38d89
MD5 f4350a1d1fe944915a8c1d8c3f0d4eda
BLAKE2b-256 631cea53e2f38f1485438b98d02504cf50170738a3b438e3a2de62d9f208c59e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: isage_data-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for isage_data-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f7e07c8a8598f196d510cca37c2ee11af68455794005d65ac63855f7ab6ff56c
MD5 21df191b3c46a7e89bd08896bedcb13c
BLAKE2b-256 4cc26cb46519fdd88c6a68d047a34a98e8162a643dda232413766c9b40ca08b1

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