Dataset Viewer
Auto-converted to Parquet Duplicate
task_id
stringlengths
15
15
repo
stringclasses
9 values
file_path
stringlengths
17
49
function_name
stringlengths
4
33
qualified_name
stringlengths
4
35
function_type
stringclasses
2 values
class_name
stringclasses
4 values
prompt
stringlengths
422
16.4k
signature
stringlengths
22
792
docstring
stringlengths
0
549
canonical_solution
stringlengths
106
1.36k
full_function
stringlengths
129
1.75k
tests
stringlengths
563
526k
setup
stringclasses
9 values
metadata
stringlengths
74
77
validation
stringlengths
36
72
original_task_id
stringlengths
15
15
contamination_label
stringclasses
2 values
repo_patch/0001
Comfy-Org/ComfyUI
comfy_execution/jobs.py
normalize_output_item
normalize_output_item
function
null
""" Job utilities for the /api/jobs endpoint. Provides normalization and helper functions for job status tracking. """ from typing import Optional from comfy_api.internal import prune_dict class JobStatus: """Job status constants.""" PENDING = 'pending' IN_PROGRESS = 'in_progress' COMPLETED = 'compl...
def normalize_output_item(item): """Normalize a single output list item for the jobs API. Returns the normalized item, or None to exclude it. String items with 3D extensions become {filename, type, subfolder} dicts. """
Normalize a single output list item for the jobs API. Returns the normalized item, or None to exclude it. String items with 3D extensions become {filename, type, subfolder} dicts.
if item is None: return None if isinstance(item, str): if has_3d_extension(item): return {'filename': item, 'type': 'output', 'subfolder': '', 'mediaType': '3d'} return None if isinstance(item, dict): return item return None
def normalize_output_item(item): """Normalize a single output list item for the jobs API. Returns the normalized item, or None to exclude it. String items with 3D extensions become {filename, type, subfolder} dicts. """ if item is None: return None if isinstance(item, str): if h...
[{"test_file": "tests/execution/test_jobs.py", "test_function": "TestNormalizeOutputItem.test_none_returns_none", "test_content": "\"\"\"Unit tests for comfy_execution/jobs.py\"\"\"\n\nfrom comfy_execution.jobs import (\n JobStatus,\n is_previewable,\n normalize_queue_item,\n normalize_history_item,\n no...
{"repo_url": "https://github.com/Comfy-Org/ComfyUI", "install_cmd": "pip install -e .", "commit_sha": "dff0a4a15887383c90a031e3fd48ebc41f6928e7", "frozen_requirements": "frozen_requirements/Comfy-Org_ComfyUI.txt"}
{"body_lines": 9, "file_lines": 390, "has_docstring": true, "num_tests": 6}
{"status": "passed", "tests_run": 6}
repo_patch/0001
file_overlap
repo_patch/0002
Comfy-Org/ComfyUI
comfy_execution/jobs.py
normalize_queue_item
normalize_queue_item
function
null
"\"\"\"\nJob utilities for the /api/jobs endpoint.\nProvides normalization and helper functions for (...TRUNCATED)
"def normalize_queue_item(item: tuple, status: str) -> dict:\n \"\"\"Convert queue item tuple to (...TRUNCATED)
"Convert queue item tuple to unified job dict.\n\nExpects item with sensitive data already removed ((...TRUNCATED)
" priority, prompt_id, _, extra_data, _ = item\n create_time, workflow_id = _extract_job_metad(...TRUNCATED)
"def normalize_queue_item(item: tuple, status: str) -> dict:\n \"\"\"Convert queue item tuple to (...TRUNCATED)
"[{\"test_file\": \"tests/execution/test_jobs.py\", \"test_function\": \"TestNormalizeQueueItem.test(...TRUNCATED)
"{\"repo_url\": \"https://github.com/Comfy-Org/ComfyUI\", \"install_cmd\": \"pip install -e .\", \"c(...TRUNCATED)
{"body_lines": 10, "file_lines": 390, "has_docstring": true, "num_tests": 1}
{"status": "passed", "tests_run": 1}
repo_patch/0002
file_overlap
repo_patch/0003
Comfy-Org/ComfyUI
comfy_execution/jobs.py
is_previewable
is_previewable
function
null
"\"\"\"\nJob utilities for the /api/jobs endpoint.\nProvides normalization and helper functions for (...TRUNCATED)
"def is_previewable(media_type: str, item: dict) -> bool:\n \"\"\"\n Check if an output item i(...TRUNCATED)
"Check if an output item is previewable.\nMatches frontend logic in ComfyUI_frontend/src/stores/queu(...TRUNCATED)
" if media_type in PREVIEWABLE_MEDIA_TYPES:\n return True\n\n # Check format field (MIM(...TRUNCATED)
"def is_previewable(media_type: str, item: dict) -> bool:\n \"\"\"\n Check if an output item i(...TRUNCATED)
"[{\"test_file\": \"tests/execution/test_jobs.py\", \"test_function\": \"TestIsPreviewable.test_prev(...TRUNCATED)
"{\"repo_url\": \"https://github.com/Comfy-Org/ComfyUI\", \"install_cmd\": \"pip install -e .\", \"c(...TRUNCATED)
{"body_lines": 12, "file_lines": 390, "has_docstring": true, "num_tests": 7}
{"status": "passed", "tests_run": 7}
repo_patch/0007
file_overlap
repo_patch/0004
Comfy-Org/ComfyUI
middleware/cache_middleware.py
cache_control
cache_control
function
null
"\"\"\"Cache control middleware for ComfyUI server\"\"\"\n\nfrom aiohttp import web\nfrom typing imp(...TRUNCATED)
"async def cache_control(\n request: web.Request, handler: Callable[[web.Request], Awaitable[web.(...TRUNCATED)
"Cache control middleware that sets appropriate cache headers based on file type and response status(...TRUNCATED)
" response: web.Response = await handler(request)\n\n path_filename = request.path.rsplit(\"/\(...TRUNCATED)
"async def cache_control(\n request: web.Request, handler: Callable[[web.Request], Awaitable[web.(...TRUNCATED)
"[{\"test_file\": \"tests-unit/server_test/test_cache_control.py\", \"test_function\": \"TestCacheCo(...TRUNCATED)
"{\"repo_url\": \"https://github.com/Comfy-Org/ComfyUI\", \"install_cmd\": \"pip install -e .\", \"c(...TRUNCATED)
{"body_lines": 22, "file_lines": 54, "has_docstring": true, "num_tests": 9}
{"status": "passed", "tests_run": 9}
repo_patch/0008
clean
repo_patch/0005
docling-project/docling
docling/datamodel/asr_model_specs.py
_get_whisper_base_model
_get_whisper_base_model
function
null
"import logging\nfrom enum import Enum\n\nfrom pydantic import (\n AnyUrl,\n)\n\nfrom docling.dat(...TRUNCATED)
"def _get_whisper_base_model():\n \"\"\"\n Get the best Whisper Base model for the current har(...TRUNCATED)
"Get the best Whisper Base model for the current hardware.\n\nAutomatically selects MLX Whisper Base(...TRUNCATED)
" try:\n import torch\n\n has_mps = torch.backends.mps.is_built() and torch.backend(...TRUNCATED)
"def _get_whisper_base_model():\n \"\"\"\n Get the best Whisper Base model for the current har(...TRUNCATED)
"[{\"test_file\": \"tests/test_asr_mlx_whisper.py\", \"test_function\": \"TestMlxWhisperIntegration.(...TRUNCATED)
"{\"repo_url\": \"https://github.com/docling-project/docling\", \"install_cmd\": \"pip install -e .\(...TRUNCATED)
{"body_lines": 34, "file_lines": 495, "has_docstring": true, "num_tests": 2}
{"status": "passed", "tests_run": 2}
repo_patch/0009
clean
repo_patch/0006
docling-project/docling
docling/datamodel/asr_model_specs.py
_get_whisper_tiny_model
_get_whisper_tiny_model
function
null
"import logging\nfrom enum import Enum\n\nfrom pydantic import (\n AnyUrl,\n)\n\nfrom docling.dat(...TRUNCATED)
"def _get_whisper_tiny_model():\n \"\"\"\n Get the best Whisper Tiny model for the current har(...TRUNCATED)
"Get the best Whisper Tiny model for the current hardware.\n\nAutomatically selects MLX Whisper Tiny(...TRUNCATED)
" try:\n import torch\n\n has_mps = torch.backends.mps.is_built() and torch.backend(...TRUNCATED)
"def _get_whisper_tiny_model():\n \"\"\"\n Get the best Whisper Tiny model for the current har(...TRUNCATED)
"[{\"test_file\": \"tests/test_asr_mlx_whisper.py\", \"test_function\": \"TestMlxWhisperIntegration.(...TRUNCATED)
"{\"repo_url\": \"https://github.com/docling-project/docling\", \"install_cmd\": \"pip install -e .\(...TRUNCATED)
{"body_lines": 34, "file_lines": 495, "has_docstring": true, "num_tests": 1}
{"status": "passed", "tests_run": 1}
repo_patch/0010
clean
repo_patch/0007
docling-project/docling
docling/datamodel/asr_model_specs.py
_get_whisper_medium_model
_get_whisper_medium_model
function
null
"import logging\nfrom enum import Enum\n\nfrom pydantic import (\n AnyUrl,\n)\n\nfrom docling.dat(...TRUNCATED)
"def _get_whisper_medium_model():\n \"\"\"\n Get the best Whisper Medium model for the current(...TRUNCATED)
"Get the best Whisper Medium model for the current hardware.\n\nAutomatically selects MLX Whisper Me(...TRUNCATED)
" try:\n import torch\n\n has_mps = torch.backends.mps.is_built() and torch.backend(...TRUNCATED)
"def _get_whisper_medium_model():\n \"\"\"\n Get the best Whisper Medium model for the current(...TRUNCATED)
"[{\"test_file\": \"tests/test_asr_mlx_whisper.py\", \"test_function\": \"TestMlxWhisperIntegration.(...TRUNCATED)
"{\"repo_url\": \"https://github.com/docling-project/docling\", \"install_cmd\": \"pip install -e .\(...TRUNCATED)
{"body_lines": 34, "file_lines": 495, "has_docstring": true, "num_tests": 1}
{"status": "passed", "tests_run": 1}
repo_patch/0011
clean
repo_patch/0008
docling-project/docling
docling/backend/mets_gbs_backend.py
unload
MetsGbsPageBackend.unload
method
MetsGbsPageBackend
"\"\"\"Backend for GBS Google Books schema.\"\"\"\n\nimport logging\nimport tarfile\nfrom collection(...TRUNCATED)
def unload(self) -> None:
" if hasattr(self, \"_im\"):\n delattr(self, \"_im\")\n if hasattr(self, \"(...TRUNCATED)
" def unload(self) -> None:\n if hasattr(self, \"_im\"):\n delattr(self, \"_im\(...TRUNCATED)
"[{\"test_file\": \"tests/test_backend_mets_gbs.py\", \"test_function\": \"test_process_pages\", \"t(...TRUNCATED)
"{\"repo_url\": \"https://github.com/docling-project/docling\", \"install_cmd\": \"pip install -e .\(...TRUNCATED)
{"body_lines": 4, "file_lines": 400, "has_docstring": false, "num_tests": 4}
{"status": "passed", "tests_run": 4}
repo_patch/0012
file_overlap
repo_patch/0009
docling-project/docling
docling/datamodel/asr_model_specs.py
_get_whisper_small_model
_get_whisper_small_model
function
null
"import logging\nfrom enum import Enum\n\nfrom pydantic import (\n AnyUrl,\n)\n\nfrom docling.dat(...TRUNCATED)
"def _get_whisper_small_model():\n \"\"\"\n Get the best Whisper Small model for the current h(...TRUNCATED)
"Get the best Whisper Small model for the current hardware.\n\nAutomatically selects MLX Whisper Sma(...TRUNCATED)
" try:\n import torch\n\n has_mps = torch.backends.mps.is_built() and torch.backend(...TRUNCATED)
"def _get_whisper_small_model():\n \"\"\"\n Get the best Whisper Small model for the current h(...TRUNCATED)
"[{\"test_file\": \"tests/test_asr_mlx_whisper.py\", \"test_function\": \"TestMlxWhisperIntegration.(...TRUNCATED)
"{\"repo_url\": \"https://github.com/docling-project/docling\", \"install_cmd\": \"pip install -e .\(...TRUNCATED)
{"body_lines": 34, "file_lines": 495, "has_docstring": true, "num_tests": 1}
{"status": "passed", "tests_run": 1}
repo_patch/0013
clean
repo_patch/0010
docling-project/docling
docling/datamodel/asr_model_specs.py
_get_whisper_large_model
_get_whisper_large_model
function
null
"import logging\nfrom enum import Enum\n\nfrom pydantic import (\n AnyUrl,\n)\n\nfrom docling.dat(...TRUNCATED)
"def _get_whisper_large_model():\n \"\"\"\n Get the best Whisper Large model for the current h(...TRUNCATED)
"Get the best Whisper Large model for the current hardware.\n\nAutomatically selects MLX Whisper Lar(...TRUNCATED)
" try:\n import torch\n\n has_mps = torch.backends.mps.is_built() and torch.backend(...TRUNCATED)
"def _get_whisper_large_model():\n \"\"\"\n Get the best Whisper Large model for the current h(...TRUNCATED)
"[{\"test_file\": \"tests/test_asr_mlx_whisper.py\", \"test_function\": \"TestMlxWhisperIntegration.(...TRUNCATED)
"{\"repo_url\": \"https://github.com/docling-project/docling\", \"install_cmd\": \"pip install -e .\(...TRUNCATED)
{"body_lines": 34, "file_lines": 495, "has_docstring": true, "num_tests": 1}
{"status": "passed", "tests_run": 1}
repo_patch/0014
clean
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
28