Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Open-Bee/DataStudio
/ types & classes
Types & classes
308 in github.com/Open-Bee/DataStudio
⨍
Functions
1,367
◇
Types & classes
308
↳
Endpoints
27
↓ 79 callers
Class
DataItem
Wrapper around a raw data dict with typed QA pair access. Example:: item = DataItem(raw_data, idx=0) for qa in item.qa_pairs:
datastudio/operators/core/data_item.py:27
↓ 66 callers
Class
Result
Operator execution result. Responsibilities: 1. Store decision lists 2. Apply decisions to DataItem 3. Manage records Can c
datastudio/operators/core/result.py:49
↓ 26 callers
Class
CheckpointManager
Tracks per-file processing progress for resumable execution. Persists a JSON file mapping each data file to its last processed index, allowin
datastudio/utils/checkpoint.py:9
↓ 24 callers
Class
StandardDataLoader
Dataset loader with LMDB image caching and checkpoint resume. Supports automatic format detection, parallel image loading, adaptive batch siz
datastudio/datasets/data_loader.py:19
↓ 23 callers
Class
SubPipeline
Execute a sequence of operators on data items. Runs each operator in order, splitting items into kept and rejected after each step. Rejected
datastudio/pipelines/sub_pipeline.py:22
↓ 20 callers
Class
Config
Configuration class based on OrderedDict. Supports attribute-style access, hierarchical configuration inheritance, and automatic merging of b
datastudio/utils/config.py:40
↓ 19 callers
Class
DatasetConfig
Standard configuration for a single dataset. Attributes: file_path: Path to the data file. source: Data source name/identifier.
datastudio/datasets/config/config.py:30
↓ 19 callers
Class
Pipeline
Composes sub-pipelines and executes them by priority (lower = earlier). Operators are resolved from the unified ``OPERATORS`` registry, so su
datastudio/pipelines/pipeline.py:35
↓ 19 callers
Class
Registry
A registry for managing and instantiating registered modules. Example: FILTERS = Registry() @FILTERS.register_module() c
datastudio/utils/registry.py:6
↓ 18 callers
Class
Logger
Configurable logger with file, console, and WandB backends. Example config:: logger = dict( type='Logger', level
datastudio/utils/logging.py:63
↓ 16 callers
Class
MockOperator
Mock operator for testing.
tests/pipelines/test_sub_pipeline.py:84
↓ 16 callers
Class
StandardDataSaver
Dataset saver that groups output by source and tracks statistics. Output directory structure:: output_dir/ ├── source1/
datastudio/datasets/data_saver.py:19
↓ 14 callers
Class
StatsCollector
Collects and aggregates pipeline statistics. Tracks per-operator and per-dataset metrics, and exports to CSV/JSON. Example: >>> coll
datastudio/utils/statistics.py:102
↓ 13 callers
Class
OpenAIAPI
Async OpenAI-compatible API wrapper. Uses a shared :class:`aiohttp.ClientSession` with connection pooling and ``asyncio.Semaphore`` for concu
datastudio/models/openai_api.py:22
↓ 11 callers
Class
ConcreteOperator
Concrete implementation of Operator for testing.
tests/operators/test_operator.py:19
↓ 10 callers
Class
MLLMFilter
Filter data items using MLLM quality assessment. Expected response format: ``{"q0": true/false, "q0_reason": "..."}`` where ``true`` means re
datastudio/operators/mllm/filter.py:12
↓ 9 callers
Class
ConcreteFilter
Concrete implementation of Filter for testing.
tests/operators/test_operator.py:112
↓ 9 callers
Class
FilterDecision
Filter decision for a QA pair or entire item. Attributes: qa_idx: QA pair index (0-based), or -1 for a global decision. rejected:
datastudio/operators/core/result.py:17
↓ 9 callers
Class
OperatorStats
Statistics for a single operator execution.
datastudio/utils/statistics.py:18
↓ 9 callers
Class
RequestBuilder
MLLM request builder. Responsibilities: 1. Store request_builder configuration 2. Build requests (build_request, build_requests)
datastudio/operators/mllm/request.py:18
↓ 9 callers
Class
RewriteDecision
Rewrite decision for a single QA pair. Attributes: qa_idx: QA pair index (0-based). new_question: Rewritten question text (None =
datastudio/operators/core/result.py:32
↓ 9 callers
Class
StandardConfig
Standardized complete configuration containing multiple datasets. Attributes: datasets: List of DatasetConfig objects. extra: Add
datastudio/datasets/config/config.py:82
↓ 8 callers
Class
QA
Immutable view of a single QA pair. Attributes: idx: QA pair index (0-based). question: Question text. answer: Answer tex
datastudio/operators/core/data_item.py:9
↓ 7 callers
Class
ColoredFormatter
Colored formatter for console output.
datastudio/utils/logging.py:47
↓ 7 callers
Class
ConcreteRewriter
Concrete implementation of Rewriter for testing.
tests/operators/test_operator.py:193
↓ 6 callers
Class
LengthAnomalyFilter
Filter data items based on text length anomalies. Detects and filters QA pairs with abnormally short or long text. Supports per-QA-pair
datastudio/operators/filters/length_anomaly.py:11
↓ 6 callers
Class
MLLMRewriter
Rewrite data using MLLM. Supports both structured (JSON dict) and plain text responses. Set ``key_templates=None`` in the request builder for
datastudio/operators/mllm/rewriter.py:13
↓ 6 callers
Class
PipelineStats
Overall pipeline statistics.
datastudio/utils/statistics.py:72
↓ 5 callers
Class
MockFilterOperator
Mock filter operator that rejects some items.
tests/pipelines/test_sub_pipeline.py:96
↓ 5 callers
Class
SelectiveMLLMRewriter
MLLM rewriter that only processes items matching a condition. Example:: rewriter = SelectiveMLLMRewriter( model=model,
datastudio/operators/mllm/rewriter.py:92
↓ 5 callers
Class
SimpleSaver
Saves processed data grouped by source file. Groups items by their ``_source_file``, removes temporary fields, and delegates to :class:`Forma
datastudio/datasets/saver/simple_saver.py:9
↓ 4 callers
Class
ConcreteAPI
Concrete implementation of BaseAPI for testing.
tests/models/test_base_api.py:19
↓ 4 callers
Class
ConvLengthFilter
Filter data items based on conversation length (number of QA pairs). Example: filter = ConvLengthFilter(min_length=1, max_length=10)
datastudio/operators/filters/conv_length.py:11
↓ 4 callers
Class
ProcessedChecker
Checker for detecting already processed datasets. Checks if processed output files exist in the output directory. Used for skipping already c
datastudio/datasets/saver/processed_checker.py:9
↓ 4 callers
Class
YamlConfigGenerator
Generates training dataset YAML configs from processed output. Attributes: output_dir: Output directory path. yaml_name: YAML fil
datastudio/datasets/saver/yaml_generator.py:9
↓ 3 callers
Class
DatasetStats
Statistics for a dataset.
datastudio/utils/statistics.py:58
↓ 3 callers
Class
ImageAspectRatioFilter
Filter data items based on image aspect ratio. Removes items containing images with extreme aspect ratios.
datastudio/operators/filters/image_aspect_ratio.py:11
↓ 3 callers
Class
ImageSizeFilter
Filter data items based on image dimensions. Rejects images that are too small or have extreme aspect ratios. Example: filter =
datastudio/operators/filters/image_size.py:11
↓ 3 callers
Class
IncompleteFormat
tests/datasets/test_formatters.py:37
↓ 3 callers
Class
OrderTrackingOperator
tests/pipelines/test_sub_pipeline.py:241
↓ 3 callers
Class
RemoveThinkRewriter
Remove <think>...</think> tags from answers. These tags often contain model reasoning that shouldn't be in the final output. Exampl
datastudio/operators/rewriters/remove_think.py:15
↓ 3 callers
Class
ShardedLMDBManager
Sharded LMDB manager with singleton pattern per cache directory. Distributes images across LMDB shards using hash-based partitioning. Loads s
datastudio/utils/database.py:92
↓ 2 callers
Class
ImageExtFilter
Filter data items based on image file extensions. Removes items containing images with excluded file extensions.
datastudio/operators/filters/image_ext.py:12
↓ 2 callers
Class
MockRewriterOperator
Mock rewriter operator.
tests/pipelines/test_sub_pipeline.py:112
↓ 2 callers
Class
NoChangeRewriter
tests/operators/test_operator.py:232
↓ 2 callers
Class
Operator
Base class for all operators. Subclasses implement :meth:`process` for single-item logic, or override :meth:`process_batch` for batch-level o
datastudio/operators/core/operator.py:14
↓ 2 callers
Class
RemoveAnswerRewriter
Remove [ANSWER 0] prefix from responses. Some data may have "[ANSWER 0]" prefixes in responses that should be removed for clean output.
datastudio/operators/rewriters/remove_answer.py:12
↓ 2 callers
Class
ResponseTagFilter
Filter data items that have image/video tags in responses. Responses should not contain <image> or <video> tags as these indicate potent
datastudio/operators/filters/response_tag.py:11
↓ 2 callers
Class
SplitRewriter
Split multi-turn conversations into single-turn conversations. Each QA pair becomes a separate data item, preserving all metadata and ad
datastudio/operators/rewriters/split.py:12
↓ 2 callers
Class
TextRepeatFilter
Filter data items with repetitive text patterns. Detects and filters QA pairs containing consecutive repetitive patterns. Supports per-Q
datastudio/operators/filters/text_repeat.py:12
↓ 1 callers
Class
AddNoThinkRewriter
Add empty <think> tags to responses that don't have them. This ensures consistent format for responses that should have think tags but a
datastudio/operators/rewriters/add_nothink.py:11
↓ 1 callers
Class
BaseAPI
Base API class providing common functionality for all API models. This class handles: - Message preprocessing and formatting - Image enco
datastudio/models/base.py:33
↓ 1 callers
Class
BaseFormat
Abstract base for data format handlers. Subclasses implement :meth:`extensions`, :meth:`load`, and :meth:`save`, then register via ``@FormatR
datastudio/datasets/formatters/base.py:6
↓ 1 callers
Class
FailingAPI
tests/models/test_base_api.py:271
↓ 1 callers
Class
FailingOperator
tests/pipelines/test_sub_pipeline.py:352
↓ 1 callers
Class
IncompleteAPI
tests/models/test_base_api.py:310
↓ 1 callers
Class
IncompleteFilter
tests/operators/test_operator.py:295
↓ 1 callers
Class
IncompleteRewriter
tests/operators/test_operator.py:305
↓ 1 callers
Class
JsonFormat
JSON data format handler. Supports loading and saving data in JSON format. Single objects are wrapped in a list for consistency.
datastudio/datasets/formatters/json_formatter.py:10
↓ 1 callers
Class
JsonlFormat
JSONL (JSON Lines) data format handler. Each line contains one JSON object. Invalid lines are skipped with a warning.
datastudio/datasets/formatters/jsonl_formatter.py:13
↓ 1 callers
Class
NormImageTagRewriter
Normalize image tag positions in conversations. Moves all <image> tags to the beginning of the first human message, ensuring consistent
datastudio/operators/rewriters/norm_image_tag.py:12
↓ 1 callers
Class
NormMultiTurnPromptRewriter
Normalize instruction patterns in multi-turn conversations. If the first turn contains instruction patterns (like "Answer concisely"), r
datastudio/operators/rewriters/norm_multi_turn_prompt.py:21
↓ 1 callers
Class
NormPromptRewriter
Normalize hint/instruction prompt formatting. Ensures hints like ``"Answer concisely"`` are properly separated with newlines from the main qu
datastudio/operators/rewriters/norm_prompt.py:93
↓ 1 callers
Class
NormThinkRewriter
Normalize <think> tag format in answers. Ensures consistent format: - Lowercase tags - Newline after opening tag - Newline befor
datastudio/operators/rewriters/norm_think.py:12
↓ 1 callers
Class
RemoveReasonRewriter
Remove "Reasoning:" prefix from responses. Some data may have "Reasoning:" prefixes in responses that should be removed for clean output
datastudio/operators/rewriters/remove_reason.py:12
↓ 1 callers
Class
Runner
Main pipeline runner that orchestrates data loading, processing, and saving. Initializes all components from the global config: - Logger
run.py:29
↓ 1 callers
Class
ShortResultOperator
Operator that returns fewer results than input items.
tests/pipelines/test_sub_pipeline.py:444
↓ 1 callers
Class
TestableAPI
tests/models/test_base_api.py:26
Class
ConfigLoader
Configuration loader for loading and saving YAML configs. Provides static methods for loading YAML configurations and converting them to stan
datastudio/datasets/config/config.py:132
Class
CustomFormat
tests/datasets/test_formatters.py:339
Class
Filter
Base class for filter operators. Subclasses implement check(item, qa_idx) for per-QA filtering. Example: class MyFilter(Filter)
datastudio/operators/core/operator.py:69
Class
FormatRegistry
Registry for data format handlers with automatic schema conversion. Detects file format by extension, converts between ``conversations`` and
datastudio/datasets/formatters/__init__.py:21
Class
LogLevel
Log levels.
datastudio/utils/logging.py:25
Class
MLLMOperator
Base class for MLLM-powered operators. Builds requests via :class:`RequestBuilder`, calls ``model.generate()``, and delegates response parsin
datastudio/operators/mllm/base.py:15
Class
MPOpenAIAPI
Multiprocessing OpenAI-compatible API using fork + COW shared memory. Distributes requests across multiple worker processes, each running an
datastudio/models/mp_openai_api.py:84
Class
ModuleA
tests/utils/test_registry.py:107
Class
ModuleB
tests/utils/test_registry.py:111
Class
NoChangeRewriter
tests/operators/test_operator.py:262
Class
Rewriter
Base class for rewrite operators. Subclasses implement rewrite(item, qa_idx) for per-QA rewriting. Example: class MyRewriter(Re
datastudio/operators/core/operator.py:106
Class
SchemaConverter
Automatic schema detection and conversion. Usage: # Load and normalize data = json.load(f) normalized = SchemaConverter.n
datastudio/datasets/formatters/schema_converter.py:32
Class
SchemaType
Supported schema types.
datastudio/datasets/formatters/schema_converter.py:11
Class
SimpleClass
tests/utils/test_registry.py:334
Class
TestAddNoThinkRewriter
Tests for AddNoThinkRewriter.
tests/operators/test_rewriters.py:144
Class
TestAsyncRequest
Tests for async request methods using mocked aiohttp.
tests/models/test_openai_api.py:259
Class
TestBaseAPIAbstract
Tests for abstract method enforcement.
tests/models/test_base_api.py:294
Class
TestBaseAPIAllowedTypes
Tests for allowed_types attribute.
tests/models/test_base_api.py:71
Class
TestBaseAPICheckContent
Tests for check_content method.
tests/models/test_base_api.py:115
Class
TestBaseAPIEdgeCases
Edge case tests for BaseAPI.
tests/models/test_base_api.py:251
Class
TestBaseAPIEncodeImage
Tests for encode_image_directly method.
tests/models/test_base_api.py:82
Class
TestBaseAPIGenerate
Tests for generate method.
tests/models/test_base_api.py:188
Class
TestBaseAPIInit
Tests for BaseAPI initialization.
tests/models/test_base_api.py:49
Class
TestBaseAPIPreProcess
Tests for pre_process method.
tests/models/test_base_api.py:226
Class
TestBaseAPIPrepareInputs
Tests for prepare_inputs method.
tests/models/test_base_api.py:167
Class
TestBaseAPIPreprocContent
Tests for preproc_content method.
tests/models/test_base_api.py:141
Class
TestBaseAPIProcessSingleMessage
Tests for process_single_message method.
tests/models/test_base_api.py:217
Class
TestBaseAPIShutdown
Tests for shutdown method.
tests/models/test_base_api.py:243
Class
TestBaseFormat
Tests for BaseFormat abstract class.
tests/datasets/test_formatters.py:26
Class
TestBuildDataloaders
Tests for build_dataloaders function.
tests/datasets/test_builder.py:17
Class
TestBuildDataloadersEdgeCases
Edge case tests for build_dataloaders.
tests/datasets/test_builder.py:147
Class
TestBuildFromCfg
Tests for build_from_cfg function.
tests/utils/test_registry.py:156
next →
1–100 of 308, ranked by callers