MCPcopy Create free account

hub / github.com/Open-Bee/DataStudio / types & classes

Types & classes308 in github.com/Open-Bee/DataStudio

↓ 79 callersClassDataItem
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 callersClassResult
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 callersClassCheckpointManager
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 callersClassStandardDataLoader
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 callersClassSubPipeline
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 callersClassConfig
Configuration class based on OrderedDict. Supports attribute-style access, hierarchical configuration inheritance, and automatic merging of b
datastudio/utils/config.py:40
↓ 19 callersClassDatasetConfig
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 callersClassPipeline
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 callersClassRegistry
A registry for managing and instantiating registered modules. Example: FILTERS = Registry() @FILTERS.register_module() c
datastudio/utils/registry.py:6
↓ 18 callersClassLogger
Configurable logger with file, console, and WandB backends. Example config:: logger = dict( type='Logger', level
datastudio/utils/logging.py:63
↓ 16 callersClassMockOperator
Mock operator for testing.
tests/pipelines/test_sub_pipeline.py:84
↓ 16 callersClassStandardDataSaver
Dataset saver that groups output by source and tracks statistics. Output directory structure:: output_dir/ ├── source1/
datastudio/datasets/data_saver.py:19
↓ 14 callersClassStatsCollector
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 callersClassOpenAIAPI
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 callersClassConcreteOperator
Concrete implementation of Operator for testing.
tests/operators/test_operator.py:19
↓ 10 callersClassMLLMFilter
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 callersClassConcreteFilter
Concrete implementation of Filter for testing.
tests/operators/test_operator.py:112
↓ 9 callersClassFilterDecision
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 callersClassOperatorStats
Statistics for a single operator execution.
datastudio/utils/statistics.py:18
↓ 9 callersClassRequestBuilder
MLLM request builder. Responsibilities: 1. Store request_builder configuration 2. Build requests (build_request, build_requests)
datastudio/operators/mllm/request.py:18
↓ 9 callersClassRewriteDecision
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 callersClassStandardConfig
Standardized complete configuration containing multiple datasets. Attributes: datasets: List of DatasetConfig objects. extra: Add
datastudio/datasets/config/config.py:82
↓ 8 callersClassQA
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 callersClassColoredFormatter
Colored formatter for console output.
datastudio/utils/logging.py:47
↓ 7 callersClassConcreteRewriter
Concrete implementation of Rewriter for testing.
tests/operators/test_operator.py:193
↓ 6 callersClassLengthAnomalyFilter
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 callersClassMLLMRewriter
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 callersClassPipelineStats
Overall pipeline statistics.
datastudio/utils/statistics.py:72
↓ 5 callersClassMockFilterOperator
Mock filter operator that rejects some items.
tests/pipelines/test_sub_pipeline.py:96
↓ 5 callersClassSelectiveMLLMRewriter
MLLM rewriter that only processes items matching a condition. Example:: rewriter = SelectiveMLLMRewriter( model=model,
datastudio/operators/mllm/rewriter.py:92
↓ 5 callersClassSimpleSaver
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 callersClassConcreteAPI
Concrete implementation of BaseAPI for testing.
tests/models/test_base_api.py:19
↓ 4 callersClassConvLengthFilter
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 callersClassProcessedChecker
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 callersClassYamlConfigGenerator
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 callersClassDatasetStats
Statistics for a dataset.
datastudio/utils/statistics.py:58
↓ 3 callersClassImageAspectRatioFilter
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 callersClassImageSizeFilter
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 callersClassIncompleteFormat
tests/datasets/test_formatters.py:37
↓ 3 callersClassOrderTrackingOperator
tests/pipelines/test_sub_pipeline.py:241
↓ 3 callersClassRemoveThinkRewriter
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 callersClassShardedLMDBManager
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 callersClassImageExtFilter
Filter data items based on image file extensions. Removes items containing images with excluded file extensions.
datastudio/operators/filters/image_ext.py:12
↓ 2 callersClassMockRewriterOperator
Mock rewriter operator.
tests/pipelines/test_sub_pipeline.py:112
↓ 2 callersClassNoChangeRewriter
tests/operators/test_operator.py:232
↓ 2 callersClassOperator
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 callersClassRemoveAnswerRewriter
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 callersClassResponseTagFilter
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 callersClassSplitRewriter
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 callersClassTextRepeatFilter
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 callersClassAddNoThinkRewriter
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 callersClassBaseAPI
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 callersClassBaseFormat
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 callersClassFailingAPI
tests/models/test_base_api.py:271
↓ 1 callersClassFailingOperator
tests/pipelines/test_sub_pipeline.py:352
↓ 1 callersClassIncompleteAPI
tests/models/test_base_api.py:310
↓ 1 callersClassIncompleteFilter
tests/operators/test_operator.py:295
↓ 1 callersClassIncompleteRewriter
tests/operators/test_operator.py:305
↓ 1 callersClassJsonFormat
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 callersClassJsonlFormat
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 callersClassNormImageTagRewriter
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 callersClassNormMultiTurnPromptRewriter
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 callersClassNormPromptRewriter
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 callersClassNormThinkRewriter
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 callersClassRemoveReasonRewriter
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 callersClassRunner
Main pipeline runner that orchestrates data loading, processing, and saving. Initializes all components from the global config: - Logger
run.py:29
↓ 1 callersClassShortResultOperator
Operator that returns fewer results than input items.
tests/pipelines/test_sub_pipeline.py:444
↓ 1 callersClassTestableAPI
tests/models/test_base_api.py:26
ClassConfigLoader
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
ClassCustomFormat
tests/datasets/test_formatters.py:339
ClassFilter
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
ClassFormatRegistry
Registry for data format handlers with automatic schema conversion. Detects file format by extension, converts between ``conversations`` and
datastudio/datasets/formatters/__init__.py:21
ClassLogLevel
Log levels.
datastudio/utils/logging.py:25
ClassMLLMOperator
Base class for MLLM-powered operators. Builds requests via :class:`RequestBuilder`, calls ``model.generate()``, and delegates response parsin
datastudio/operators/mllm/base.py:15
ClassMPOpenAIAPI
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
ClassModuleA
tests/utils/test_registry.py:107
ClassModuleB
tests/utils/test_registry.py:111
ClassNoChangeRewriter
tests/operators/test_operator.py:262
ClassRewriter
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
ClassSchemaConverter
Automatic schema detection and conversion. Usage: # Load and normalize data = json.load(f) normalized = SchemaConverter.n
datastudio/datasets/formatters/schema_converter.py:32
ClassSchemaType
Supported schema types.
datastudio/datasets/formatters/schema_converter.py:11
ClassSimpleClass
tests/utils/test_registry.py:334
ClassTestAddNoThinkRewriter
Tests for AddNoThinkRewriter.
tests/operators/test_rewriters.py:144
ClassTestAsyncRequest
Tests for async request methods using mocked aiohttp.
tests/models/test_openai_api.py:259
ClassTestBaseAPIAbstract
Tests for abstract method enforcement.
tests/models/test_base_api.py:294
ClassTestBaseAPIAllowedTypes
Tests for allowed_types attribute.
tests/models/test_base_api.py:71
ClassTestBaseAPICheckContent
Tests for check_content method.
tests/models/test_base_api.py:115
ClassTestBaseAPIEdgeCases
Edge case tests for BaseAPI.
tests/models/test_base_api.py:251
ClassTestBaseAPIEncodeImage
Tests for encode_image_directly method.
tests/models/test_base_api.py:82
ClassTestBaseAPIGenerate
Tests for generate method.
tests/models/test_base_api.py:188
ClassTestBaseAPIInit
Tests for BaseAPI initialization.
tests/models/test_base_api.py:49
ClassTestBaseAPIPreProcess
Tests for pre_process method.
tests/models/test_base_api.py:226
ClassTestBaseAPIPrepareInputs
Tests for prepare_inputs method.
tests/models/test_base_api.py:167
ClassTestBaseAPIPreprocContent
Tests for preproc_content method.
tests/models/test_base_api.py:141
ClassTestBaseAPIProcessSingleMessage
Tests for process_single_message method.
tests/models/test_base_api.py:217
ClassTestBaseAPIShutdown
Tests for shutdown method.
tests/models/test_base_api.py:243
ClassTestBaseFormat
Tests for BaseFormat abstract class.
tests/datasets/test_formatters.py:26
ClassTestBuildDataloaders
Tests for build_dataloaders function.
tests/datasets/test_builder.py:17
ClassTestBuildDataloadersEdgeCases
Edge case tests for build_dataloaders.
tests/datasets/test_builder.py:147
ClassTestBuildFromCfg
Tests for build_from_cfg function.
tests/utils/test_registry.py:156
next →1–100 of 308, ranked by callers