Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Open-Bee/DataStudio
/ functions
Functions
1,367 in github.com/Open-Bee/DataStudio
⨍
Functions
1,367
◇
Types & classes
308
↳
Endpoints
27
↓ 1 callers
Method
_is_excluded
Check if image extension is in the exclusion list.
datastudio/operators/filters/image_ext.py:40
↓ 1 callers
Method
_load
Load checkpoint from file.
datastudio/utils/checkpoint.py:35
↓ 1 callers
Method
_load_dict_from_file
Load config file with _base_ inheritance support. Recursively loads and merges base configurations specified by the _base_ key.
datastudio/utils/config.py:156
↓ 1 callers
Method
_load_dict_from_file_no_base
Load a Python config file as a dict without resolving _base_ inheritance. Imports the file as a Python module and extracts all non-dunder att
datastudio/utils/config.py:78
↓ 1 callers
Method
_load_sources
Load source mapping from YAML using standardized config loader.
datastudio/datasets/data_saver.py:84
↓ 1 callers
Method
_log_example_request
Log a sample request for debugging.
datastudio/operators/mllm/base.py:162
↓ 1 callers
Method
_log_example_response
Log a sample response for debugging.
datastudio/operators/mllm/base.py:190
↓ 1 callers
Method
_make_request
Make an API request, delegating to the non-streaming handler.
datastudio/models/openai_api.py:232
↓ 1 callers
Function
_malloc_trim
(x)
datastudio/models/base.py:21
↓ 1 callers
Method
_messages_to_standard
Convert messages schema to standard schema. Input format: { "messages": [ {"role": "user", "c
datastudio/datasets/formatters/schema_converter.py:154
↓ 1 callers
Method
_normalize
Apply all normalization patterns.
datastudio/operators/rewriters/norm_think.py:60
↓ 1 callers
Method
_parse_qa_pairs
Parse conversations into QA objects.
datastudio/operators/core/data_item.py:87
↓ 1 callers
Method
_reindex_metadata
Re-index metadata for extracted single turn.
datastudio/operators/rewriters/split.py:96
↓ 1 callers
Method
_remove_patterns
Remove instruction patterns from text.
datastudio/operators/rewriters/norm_multi_turn_prompt.py:53
↓ 1 callers
Method
_resolve_base_path
Resolve base config path. Supports: - "@/path" : relative to configs root directory - "path" : relative to current config f
datastudio/utils/config.py:127
↓ 1 callers
Method
_resolve_data_path
Resolve dataset file path (supports JSON/JSONL formats). Args: dataset: Dataset path string or config dict. data_root
datastudio/datasets/data_loader.py:139
↓ 1 callers
Method
_run_cache_images
Cache images only mode: iterate all data and write images to LMDB cache.
run.py:92
↓ 1 callers
Method
_run_pipeline
Normal pipeline execution mode.
run.py:128
↓ 1 callers
Method
_standard_to_messages
Convert standard schema back to messages schema. Input format: { "conversations": [ {"from":
datastudio/datasets/formatters/schema_converter.py:217
↓ 1 callers
Method
add_full_filter_record
Add a filter record for the entire item (not per-QA).
datastudio/operators/core/data_item.py:279
↓ 1 callers
Method
add_model_record
Record which model was used by an operator to process this item. Stored as data["model"] = {op_name: model_name, ...}. Args:
datastudio/operators/core/data_item.py:285
↓ 1 callers
Function
apply_resize_image_cv2
Resize CV2 image maintaining aspect ratio. Args: img_cv2: OpenCV image (numpy array), shape is (height, width, channels). resize_
datastudio/utils/vision.py:46
↓ 1 callers
Method
batch_exists
Batch check existence of multiple images, one transaction per shard. Uses cursor.set_key() for fast key-only existence checks (avoids
datastudio/utils/database.py:307
↓ 1 callers
Method
batch_get
Batch read multiple images, one transaction per shard. Opens temporary LMDB envs with readahead=True for better sequential read perfo
datastudio/utils/database.py:350
↓ 1 callers
Method
check
Check if a QA pair should be rejected. Args: item: DataItem to check. qa_idx: QA pair index. Return
datastudio/operators/core/operator.py:83
↓ 1 callers
Method
check
Check if response contains image/video tags.
datastudio/operators/filters/response_tag.py:39
↓ 1 callers
Method
check
Check if dataset has already been processed. Args: dataset: Dataset object (must have 'datas' attribute). Returns:
datastudio/datasets/saver/processed_checker.py:57
↓ 1 callers
Function
create_single_dataloader
Create a single dataloader for the given dataset path.
datastudio/datasets/builder.py:102
↓ 1 callers
Method
critical
Log critical message. Critical errors are logged to wandb by default.
datastudio/utils/logging.py:268
↓ 1 callers
Method
debug
Log debug message.
datastudio/utils/logging.py:231
↓ 1 callers
Method
extensions
Return list of supported file extensions. Returns: list: List of file extensions (e.g., ['.json', '.JSON']).
datastudio/datasets/formatters/base.py:25
↓ 1 callers
Method
generate
Main method to generate responses. Uses asyncio.run to execute the async generation pipeline. Pre-encodes images before async process
datastudio/models/openai_api.py:490
↓ 1 callers
Method
generate_inner
Sync version of generate for single request (BaseAPI compatibility). Args: inputs: Preprocessed message list (OpenAI format).
datastudio/models/openai_api.py:567
↓ 1 callers
Method
get_name
Get the dataset name.
datastudio/datasets/data_loader.py:360
↓ 1 callers
Method
has_checkpoint
Check if this dataloader has checkpoint tracking enabled and has progress.
datastudio/datasets/data_loader.py:406
↓ 1 callers
Method
load_sources_map
Load config and return file_path to source mapping. Args: yaml_path: Path to YAML config file. Returns: dict
datastudio/datasets/config/config.py:191
↓ 1 callers
Function
main
CLI entry point for DataStudio pipeline.
run.py:167
↓ 1 callers
Method
process
Process a single data item. Args: item: DataItem to process. Returns: Result with filter and/or rew
datastudio/operators/core/operator.py:41
↓ 1 callers
Method
process
Check if image meets size requirements (item-level).
datastudio/operators/filters/image_size.py:50
↓ 1 callers
Method
process
Check if all images have acceptable aspect ratios (item-level).
datastudio/operators/filters/image_aspect_ratio.py:37
↓ 1 callers
Method
process
Split is handled specially - we mark items for expansion. The actual splitting is done in expand_items().
datastudio/operators/rewriters/split.py:39
↓ 1 callers
Method
put
Write a single image to cache. Args: image_path: Image path (used as key). img_bytes: Image data as bytes. R
datastudio/utils/database.py:268
↓ 1 callers
Function
reset_stats_collector
Reset global statistics collector.
datastudio/utils/statistics.py:503
↓ 1 callers
Method
rewrite
Rewrite a QA pair's answer. Args: item: DataItem to rewrite. qa_idx: QA pair index. Returns:
datastudio/operators/core/operator.py:120
↓ 1 callers
Method
rewrite
Remove [ANSWER 0] prefix from an answer.
datastudio/operators/rewriters/remove_answer.py:36
↓ 1 callers
Method
rewrite
(self, item, qa_idx)
tests/operators/test_operator.py:233
↓ 1 callers
Method
shutdown
Shutdown and release resources. Session is created and destroyed per generate() call.
datastudio/models/openai_api.py:628
↓ 1 callers
Method
to_dict
Convert to dictionary. Returns: dict: Configuration as dictionary.
datastudio/datasets/config/config.py:107
↓ 1 callers
Function
write_images_to_sharded_lmdb
Batch write images to sharded LMDB with optimized per-shard grouping. Args: sharded_manager: ShardedLMDBManager instance. image_p
datastudio/utils/database.py:464
Method
__call__
Execute the sub-pipeline. Args: datas: List of raw data dicts to process. Returns: List of all proc
datastudio/pipelines/sub_pipeline.py:55
Method
__call__
Execute all sub-pipelines in priority order. Args: datas: List of raw data dicts to process. Returns:
datastudio/pipelines/pipeline.py:127
Method
__call__
Accumulate data for batch saving. Args: datas: List of data dicts. Rejected items have 'rejected=True'.
datastudio/datasets/data_saver.py:145
Method
__call__
(self)
datastudio/datasets/data_loader.py:416
Method
__contains__
Check if a module is registered.
datastudio/utils/registry.py:78
Method
__del__
(self)
datastudio/pipelines/pipeline.py:204
Method
__getattr__
Get attribute by name, returning None if not found.
datastudio/utils/config.py:67
Method
__getattr__
(self, name)
tests/models/test_base_api.py:32
Method
__init__
(self, cache_images_only: bool = False)
run.py:44
Method
__init__
Initialize the Config. Args: *args: Optional single argument - path to config file.
datastudio/utils/config.py:55
Method
__init__
Initialize the sharded LMDB manager. Args: cache_dir: Cache directory path. num_shards: Number of shards to use.
datastudio/utils/database.py:107
Method
__init__
(self, fmt: str = None, datefmt: str = None, use_color: bool = True)
datastudio/utils/logging.py:50
Method
__init__
(self, logger=None, work_dir: Optional[str] = None)
datastudio/utils/statistics.py:115
Method
__init__
Initialize checkpoint manager. Args: work_dir: Working directory for checkpoint file. checkpoint_name: Name of checkp
datastudio/utils/checkpoint.py:17
Method
__init__
Initialize the registry. Args: name: Optional name for the registry (for debugging).
datastudio/utils/registry.py:20
Method
__init__
Initialize the MLLM operator. Args: model: MLLM model with generate() method. request_builder: RequestBuilde
datastudio/operators/mllm/base.py:22
Method
__init__
( self, model: Any, request_builder: Optional[Dict] = None, batch_qa: bool = F
datastudio/operators/mllm/filter.py:28
Method
__init__
Initialize selective rewriter. Args: should_rewrite_fn: Function(question, answer) -> bool.
datastudio/operators/mllm/rewriter.py:104
Method
__init__
Initialize request builder. Instance values override class defaults. For key_templates, explicitly passing None disables JSO
datastudio/operators/mllm/request.py:57
Method
__init__
Initialize a DataItem. Args: data: Raw data dict (will be modified in place for rewrites). idx: Index in the
datastudio/operators/core/data_item.py:38
Method
__init__
Initialize the operator. Args: name: Operator name (defaults to class name). logger: Logger instance.
datastudio/operators/core/operator.py:22
Method
__init__
Initialize the filter. Args: min_size: Minimum dimension (width or height). max_ratio: Maximum aspect ratio
datastudio/operators/filters/image_size.py:23
Method
__init__
Initialize the filter. Args: check_question: Whether to check questions. check_answer: Whether to check answ
datastudio/operators/filters/text_repeat.py:20
Method
__init__
Initialize the filter. Args: max_aspect_ratio: Maximum allowed aspect ratio (width/height or height/width).
datastudio/operators/filters/image_aspect_ratio.py:18
Method
__init__
Initialize the filter. Args: min_length: Minimum allowed length. max_length: Maximum allowed length.
datastudio/operators/filters/length_anomaly.py:19
Method
__init__
Initialize the filter. Args: logger: Logger instance.
datastudio/operators/filters/response_tag.py:19
Method
__init__
Initialize the filter. Args: excluded_exts: List of excluded extensions (with dot, e.g., ['.gif', '']).
datastudio/operators/filters/image_ext.py:19
Method
__init__
Initialize the filter. Args: min_length: Minimum number of QA pairs (inclusive). max_length: Maximum number
datastudio/operators/filters/conv_length.py:26
Method
__init__
Initialize the rewriter. Args: logger: Logger instance.
datastudio/operators/rewriters/remove_think.py:28
Method
__init__
Initialize the rewriter. Args: logger: Logger instance.
datastudio/operators/rewriters/remove_reason.py:20
Method
__init__
Initialize the rewriter. Args: logger: Logger instance.
datastudio/operators/rewriters/split.py:23
Method
__init__
Initialize the rewriter. Args: logger: Logger instance.
datastudio/operators/rewriters/norm_prompt.py:100
Method
__init__
Initialize the rewriter. Args: logger: Logger instance.
datastudio/operators/rewriters/remove_answer.py:20
Method
__init__
Initialize the rewriter. Args: logger: Logger instance.
datastudio/operators/rewriters/norm_multi_turn_prompt.py:29
Method
__init__
Initialize the rewriter. Args: logger: Logger instance.
datastudio/operators/rewriters/norm_image_tag.py:27
Method
__init__
Initialize the rewriter. Args: logger: Logger instance.
datastudio/operators/rewriters/norm_think.py:35
Method
__init__
Initialize the rewriter. Args: logger: Logger instance.
datastudio/operators/rewriters/add_nothink.py:19
Method
__init__
( self, operators: List[Operator], name: Optional[str] = None, priority: int =
datastudio/pipelines/sub_pipeline.py:43
Method
__init__
Initialize the pipeline. Args: operations: Dict of operation configs with cfg and priority. logger: Logger i
datastudio/pipelines/pipeline.py:45
Method
__init__
Initialize the data saver. Args: output_dir: Output directory path. dataset: Original dataset YAML path.
datastudio/datasets/data_saver.py:34
Method
__init__
( self, data_root, dataset, batch_size, parallel_loading=True,
datastudio/datasets/data_loader.py:37
Method
__init__
Initialize the saver. Args: output_dir: Output root directory. sources: Mapping from json_path to source name.
datastudio/datasets/saver/simple_saver.py:16
Method
__init__
Initialize the checker. Args: output_dir: Output directory path. sources: Mapping from file_path to source name.
datastudio/datasets/saver/processed_checker.py:26
Method
__init__
Initialize the generator. Args: output_dir: Output directory path. yaml_name: YAML file name (without extension).
datastudio/datasets/saver/yaml_generator.py:18
Method
__init__
Initialize multiprocessing OpenAI API wrapper. Args: model: Model name, e.g., gpt-4, Qwen2-VL-72B. key: API key (uses
datastudio/models/mp_openai_api.py:100
Method
__init__
Initialize the base API. Args: retry: Number of retry attempts on API failure. wait: Wait time between retries (secon
datastudio/models/base.py:45
Method
__init__
Initialize OpenAI-compatible API wrapper. Args: model: Model name, e.g., gpt-4, Qwen2-VL-72B. key: API key (uses OPEN
datastudio/models/openai_api.py:30
Method
__init__
(self, param1=None, param2=None)
tests/utils/test_registry.py:166
Method
__init__
(self, x=0, y=0)
tests/utils/test_registry.py:335
Method
__init__
(self, new_answer="Rewritten", **kwargs)
tests/operators/test_operator.py:196
Method
__init__
(self, reject_indices=None, **kwargs)
tests/pipelines/test_sub_pipeline.py:99
← previous
next →
201–300 of 1,367, ranked by callers