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
Method
__init__
(self, new_answer="Rewritten", **kwargs)
tests/pipelines/test_sub_pipeline.py:115
Method
__init__
(self, order_id, **kwargs)
tests/pipelines/test_sub_pipeline.py:242
Method
__init__
(self)
tests/models/test_base_api.py:272
Method
__iter__
Initialize iteration.
datastudio/datasets/data_loader.py:368
Method
__len__
Return the number of batches.
datastudio/datasets/data_loader.py:364
Method
__next__
(self)
datastudio/datasets/data_loader.py:374
Method
__repr__
(self)
datastudio/utils/registry.py:82
Method
__setattr__
Set attribute as dictionary item.
datastudio/utils/config.py:73
Method
_add_decision
Add filter decision based on parsed response. Args: result: Result to add decision to. qa_idx: QA pair index
datastudio/operators/mllm/filter.py:50
Method
_add_decision
Add rewrite decision based on parsed response. Args: result: Result to add decision to. qa_idx: QA pair inde
datastudio/operators/mllm/rewriter.py:62
Method
_build_openai_headers
Build HTTP headers for OpenAI-compatible API request. Args: api_key: API key for authorization. If empty, no Authorization header
datastudio/models/base.py:315
Method
_build_requests
Build requests with only QA pairs needing rewrite.
datastudio/operators/mllm/rewriter.py:120
Method
_check_shard
(shard_id_and_items)
datastudio/utils/database.py:328
Method
_decode_one
Decode PNG bytes to PIL Image.
datastudio/datasets/data_loader.py:293
Method
_get_resized
Get resized image, caching by (path, size) to avoid redundant work.
datastudio/datasets/data_loader.py:331
Method
_log_text_to_wandb
Log text message to wandb.
datastudio/utils/logging.py:220
Method
_open_read_env
Open a temporary env with readahead=True for batch reading.
datastudio/utils/database.py:381
Method
_ramp_up_semaphore
()
datastudio/models/openai_api.py:441
Method
_read_shard
(shard_id_and_items)
datastudio/utils/database.py:398
Method
_register_module
(module: Type)
datastudio/utils/registry.py:49
Method
_run
()
datastudio/models/openai_api.py:549
Function
_worker_fn
Worker function executed in each forked subprocess. Reads its message slice from the inherited ``_SHARED_MESSAGES`` global (zero-copy via COW
datastudio/models/mp_openai_api.py:51
Method
always_false
(question, answer)
tests/operators/test_mllm.py:615
Method
always_true
(question, answer)
tests/operators/test_mllm.py:606
Function
api
Create a testable API instance.
tests/models/test_base_api.py:37
Function
api
Create an OpenAIAPI instance with test defaults.
tests/models/test_openai_api.py:30
Function
api_return_dict
Create an OpenAIAPI instance with return_dict=True.
tests/models/test_openai_api.py:59
Function
api_with_port
Create an OpenAIAPI instance using api_base + port pattern.
tests/models/test_openai_api.py:45
Function
assert_json_equal
Assert two JSON-serializable objects are equal.
tests/conftest.py:260
Method
base_kwargs
Base kwargs for creating SelectiveMLLMRewriter.
tests/operators/test_mllm.py:592
Method
builder_custom
Create builder with custom settings.
tests/operators/test_mllm.py:50
Method
builder_default
Create builder with default settings.
tests/operators/test_mllm.py:45
Method
check
Not used - item-level filter.
datastudio/operators/filters/image_size.py:99
Method
check
Check for repetitive patterns in a QA pair.
datastudio/operators/filters/text_repeat.py:45
Method
check
Not used - item-level filter.
datastudio/operators/filters/image_aspect_ratio.py:62
Method
check
Not used - item-level filter.
datastudio/operators/filters/image_ext.py:77
Method
check
Not used - this filter operates at item level.
datastudio/operators/filters/conv_length.py:78
Method
checker
Create ProcessedChecker instance.
tests/datasets/test_saver_components.py:171
Function
clean_registry
Provide a clean registry for testing.
tests/conftest.py:211
Method
clear_cover_key
(a)
datastudio/utils/config.py:209
Method
close_all_instances
Close all manager instances.
datastudio/utils/database.py:457
Method
close_shard
Close a specific shard to release memory. Args: shard_id: Shard ID to close.
datastudio/utils/database.py:432
Method
collector
Create collector for testing.
tests/utils/test_statistics.py:228
Method
collector
Create collector for testing.
tests/utils/test_statistics.py:249
Method
collector
Create collector for testing.
tests/utils/test_statistics.py:286
Method
collector_with_data
Create collector with recorded data.
tests/utils/test_statistics.py:322
Method
collector_with_data
Create collector with recorded data.
tests/utils/test_statistics.py:351
Method
conversations
Get the conversations list.
datastudio/operators/core/data_item.py:56
Function
create_mock_file_content
Helper to create mock file content.
tests/conftest.py:255
Method
custom_fn
(question, answer)
tests/operators/test_mllm.py:322
Method
data
Access the underlying data dict.
datastudio/operators/core/data_item.py:51
Function
data_item
Create a DataItem instance for testing.
tests/conftest.py:180
Method
data_item
Create DataItem for testing.
tests/operators/test_result.py:210
Function
data_item_multi_turn
Create a multi-turn DataItem for testing.
tests/conftest.py:196
Function
data_item_with_image
Create a DataItem with image for testing.
tests/conftest.py:188
Method
encode_task
(item)
datastudio/models/base.py:468
Method
execution_time
(self)
datastudio/utils/statistics.py:85
Method
extensions
Return supported file extensions. Returns: list: ['.json']
datastudio/datasets/formatters/json_formatter.py:18
Method
extensions
Return supported file extensions. Returns: list: ['.jsonl']
datastudio/datasets/formatters/jsonl_formatter.py:20
Method
extensions
(cls)
tests/datasets/test_formatters.py:341
Method
filter_check_all
Create filter checking all fields.
tests/operators/test_filters.py:307
Method
filter_check_all
Create filter checking all fields.
tests/operators/test_filters.py:435
Method
filter_custom
Create filter with custom settings.
tests/operators/test_filters.py:39
Method
filter_custom
Create filter with custom settings.
tests/operators/test_filters.py:106
Method
filter_default
Create filter with default settings.
tests/operators/test_filters.py:34
Method
filter_default
Create filter with default settings.
tests/operators/test_filters.py:101
Method
filter_default
Create filter with default settings.
tests/operators/test_filters.py:177
Method
filter_default
Create filter with default settings.
tests/operators/test_filters.py:234
Method
filter_default
Create filter with default settings.
tests/operators/test_filters.py:302
Method
filter_default
Create filter with default settings.
tests/operators/test_filters.py:375
Method
filter_default
Create filter with default settings.
tests/operators/test_filters.py:430
Method
filter_instance
Create MLLMFilter instance.
tests/operators/test_mllm.py:162
Method
filter_instance
Create MLLMFilter instance for testing.
tests/operators/test_mllm.py:427
Method
from_dict
Create standard config from dictionary. Args: data: Raw configuration dictionary with 'datasets' key. Returns:
datastudio/datasets/config/config.py:94
Method
generate
Generate responses using fork-based multiprocessing. Args: messages: List of input messages. **kwargs: Additional gen
datastudio/models/mp_openai_api.py:245
Method
generate_inner
Sync version for single request (BaseAPI compatibility). Delegates to a temporary OpenAIAPI instance. Args: inputs: Prep
datastudio/models/mp_openai_api.py:309
Method
generate_inner
(self, inputs, **kwargs)
tests/models/test_base_api.py:276
Method
get_instance
Get or create ShardedLMDBManager singleton. Args: cache_dir: Cache directory path. num_shards: Number of shards.
datastudio/utils/database.py:149
Method
has_filter
Whether any QA pair is marked for filtering.
datastudio/operators/core/result.py:87
Method
has_image
Whether this item has an image.
datastudio/operators/core/data_item.py:78
Method
has_rewrite
Whether any QA pair has rewrite changes.
datastudio/operators/core/result.py:92
Method
image
Get the image (PIL Image or None).
datastudio/operators/core/data_item.py:73
Method
is_completed
Check if this dataloader has been fully processed.
datastudio/datasets/data_loader.py:400
Method
is_rejected
Whether this item is marked as rejected.
datastudio/operators/core/data_item.py:83
Method
item
Create DataItem for testing.
tests/operators/test_data_item.py:112
Method
item
Create multi-turn DataItem for testing.
tests/operators/test_data_item.py:169
Method
item
Create DataItem for testing.
tests/operators/test_data_item.py:206
Method
item
Create DataItem for testing.
tests/operators/test_data_item.py:249
Method
item
Create DataItem for testing.
tests/operators/test_data_item.py:283
Method
json_format
Create JsonFormat instance.
tests/datasets/test_formatters.py:80
Method
jsonl_format
Create JsonlFormat instance.
tests/datasets/test_formatters.py:181
Method
kept_count
(self)
datastudio/utils/statistics.py:67
Method
load
Load data from JSON file. Args: file_path: Path to JSON file. Returns: list: Data as list of dicts (single o
datastudio/datasets/formatters/json_formatter.py:26
Method
load
Load data from file. Args: file_path: Path to data file. add_source_file: Whether to add 'file_path' field to each it
datastudio/datasets/formatters/__init__.py:66
Method
load
Load data from JSONL file. Args: file_path: Path to JSONL file. Returns: list: List of data dictionaries.
datastudio/datasets/formatters/jsonl_formatter.py:28
Method
load
(self, file_path)
tests/datasets/test_formatters.py:344
Function
load_and_encode_image
Load image from disk and encode to bytes (no LMDB access).
datastudio/utils/database.py:489
Function
load_and_resize_image
Read image from disk and resize. Args: img_path: Image path (must be an absolute path). resize_size: Max edge size for resizing.
datastudio/utils/vision.py:128
Method
loader
Create a loader with mocked FormatRegistry for method testing.
tests/datasets/test_data_loader.py:446
Method
loader_with_checkpoint
Create loader with checkpoint manager.
tests/datasets/test_data_loader.py:182
← previous
next →
301–400 of 1,367, ranked by callers