opentau.datasets.vqa.dummy

Dummy vqa dataset for testing and development.

This module provides a simple synthetic vqa dataset for testing the dataset infrastructure without requiring external data sources or network access. The dataset contains three predefined items: black, white, and gray images with corresponding question-answer pairs.

The dataset cycles through the predefined items, making it useful for testing data loading pipelines, training loops, and debugging.

Classes:
DummyVQADataset: Synthetic dataset class that provides simple test

data with configurable length.

Constants:
_data: List of three predefined dataset items (black, white, gray images)

with corresponding tasks, postfixes, and prompts.

Example

Use dummy dataset for testing:
>>> from opentau.configs.default import DatasetConfig
>>> cfg = DatasetConfig(vqa="dummy")
>>> dataset = make_dataset(cfg, train_cfg)
>>> len(dataset)  # Returns 1000 by default

Classes

DummyVQADataset(cfg[, length])

Dummy vqa dataset for testing purposes.

class opentau.datasets.vqa.dummy.DummyVQADataset(cfg: TrainPipelineConfig, length: int = 1000)[source]

Bases: VQADataset

Dummy vqa dataset for testing purposes.

Provides simple synthetic data with black, white, and gray images for testing the dataset infrastructure.

__init__(cfg: TrainPipelineConfig, length: int = 1000)[source]