| check_input_file |
Ran ran on a synthesized input |
open-dataflow/rare/inference/api_infer_post.py code served (permissive licence) · get_code("8b213cd7535cb82d") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned coroutine. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import tempfile
import asyncio
from pathlib import Path
# Create a temporary file with valid data
temp_dir = tempfile.mkdtemp()
test_file = Path(temp_dir) / "test_input.txt"
test_file.write_text("valid data line\n")
ARGS = {
"input_file": str(test_file)
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- aiofiles — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type coroutine — a coroutine output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a coroutine output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| extract_option |
Ran ran on a synthesized input |
open-dataflow/rare/RL_KTO/process_kto.py code served (permissive licence) · get_code("31eca3c5db5632d2") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import re
def extract_option(pred):
for pattern in ['<answer>(.*?)</answer>', '<answer>(.*?)<answer>', '^([A-Z])[.,:]', 'Answer:\\s*([A-Z])\\s*']:
match = re.search(pattern, pred, re.DOTALL)
if match is not None:
pred = match.group(1)
return pred.replace('<', '').replace('>', '').strip()
ARGS = {
'pred': '<answer>A</answer>'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| format_prompt |
Ran ran on a synthesized input |
open-dataflow/rare/inference/vllm_infer_mm.py code served (permissive licence) · get_code("43b4dce1bb401779") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
torch.manual_seed(0)
# Based on the function signature and body analysis:
# - instruction: a string that gets formatted into the prompt
# - template: a string that determines which format template to use
ARGS = {
'instruction': 'What is the capital of France?',
'template': 'qwen'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| format_prompt |
Ran ran on a synthesized input |
open-dataflow/rare/inference/vllm_infer_text.py code served (permissive licence) · get_code("0fb897a1530a0ca3") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
torch.manual_seed(0)
# Analyze the function:
# - Takes two parameters: instruction (str) and template (str)
# - instruction is used in f-string formatting
# - template is used with .lower() and compared with string literals
# - Returns a formatted string
ARGS = {
"instruction": "What is the capital of France?",
"template": "qwen"
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_stop_tokens |
Ran ran on a synthesized input |
open-dataflow/rare/inference/vllm_infer_mm.py code served (permissive licence) · get_code("7734148d35457b70") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
torch.manual_seed(0)
# The function takes a 'template' parameter and returns stop tokens based on it.
# The template is used with .lower() method, so it should be a string.
# We'll test with one of the valid template options.
ARGS = {
'template': 'qwen'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_stop_tokens |
Ran ran on a synthesized input |
open-dataflow/rare/inference/vllm_infer_text.py code served (permissive licence) · get_code("a838fd7b11bb9013") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
torch.manual_seed(0)
ARGS = {
'template': 'qwen'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| load_data |
Ran ran on a synthesized input |
open-dataflow/rare/inference/api_infer_post.py code served (permissive licence) · get_code("fc64cae458054855") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned coroutine. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import json
import tempfile
import asyncio
import os
# Create a temporary file with JSON data
temp_dir = tempfile.mkdtemp()
input_file = os.path.join(temp_dir, "test_data.json")
test_data = [
{"id": "user_1", "name": "Alice", "value": 42},
{"id": "user_2", "name": "Bob", "value": 99},
{"id": "user_3", "name": "Charlie", "value": 7}
]
with open(input_file, 'w') as f:
json.dump(test_data, f)
ARGS = {
"input_file": input_file,
"id": "user_2"
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- aiofiles — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type coroutine — a coroutine output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a coroutine output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| load_dataset |
Ran ran on a synthesized input |
open-dataflow/rare/inference/vllm_infer_mm.py code served (permissive licence) · get_code("0cb12974f022de15") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import json
import os
import tempfile
# Create temporary directory for test files
temp_dir = tempfile.mkdtemp()
# Create a test JSON file
json_file_path = os.path.join(temp_dir, 'test_dataset.json')
test_data = [
{'id': 1, 'text': 'sample text 1', 'label': 'A'},
{'id': 2, 'text': 'sample text 2', 'label': 'B'}
]
with open(json_file_path, 'w', encoding='utf-8') as f:
json.dump(test_data, f)
# Create a test JSONL file
jsonl_file_path = os.path.join(temp_dir, 'test_dataset.jsonl')
with open(jsonl_file_path, 'w', encoding='utf-8') as f:
for item in test_data:
f.write(json.dumps(item) + '\n')
# Define ARGS dictionary
ARGS = {
'dataset_path': json_file_path
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| load_dataset |
Ran ran on a synthesized input |
open-dataflow/rare/inference/vllm_infer_text.py code served (permissive licence) · get_code("5574a27348d23871") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import json
import os
import tempfile
# Create temporary JSON file with sample data
temp_dir = tempfile.mkdtemp()
json_file_path = os.path.join(temp_dir, "dataset.json")
sample_data = [
{"id": 1, "text": "sample text 1", "label": 0},
{"id": 2, "text": "sample text 2", "label": 1},
{"id": 3, "text": "sample text 3", "label": 0}
]
with open(json_file_path, 'w', encoding='utf-8') as f:
json.dump(sample_data, f)
ARGS = {
"dataset_path": json_file_path
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| load_dataset |
Ran ran on a synthesized input |
open-dataflow/rare/process/process_medqa.py code served (permissive licence) · get_code("0ca1b69ca52ee35c") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import json
import os
import tempfile
from pathlib import Path
# Create a temporary directory structure to mock the file system
temp_dir = tempfile.mkdtemp()
process_dir = os.path.join(temp_dir, 'process', 'rare_share')
os.makedirs(process_dir, exist_ok=True)
# Create mock data
mock_data = [
{"id": 1, "text": "sample data point 1"},
{"id": 2, "text": "sample data point 2"},
]
# Write mock dataset file
dataset_name = "test_dataset"
plan_name = f'system=planner_addret,dataset={dataset_name},debug=False'
output_dir = os.path.join(process_dir, plan_name)
os.makedirs(output_dir, exist_ok=True)
output_all_path = os.path.join(output_dir, 'output_all.json')
with open(output_all_path, 'w', encoding='utf-8') as f:
json.dump(mock_data, f)
# Mock the path join to return our temp structure
import unittest.mock as mock
original_pjoin = os.path.join
def mock_pjoin(*args):
if args[0] == 'process':
return original_pjoin(temp_dir, *args)
return original_pjoin(*args)
# Patch the pjoin in the function's module
import sys
test_module = sys.modules[__name__]
ARGS = {
'dataset_name': dataset_name
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| process_dataset |
Ran ran on a synthesized input |
open-dataflow/rare/process/process_medqa.py code served (permissive licence) · get_code("bf7b0dc382946a22") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import os
import logging
import tempfile
from unittest.mock import Mock
logging.basicConfig(level=logging.INFO)
class MockProcessor:
def process_example(self, content, question):
return {
'tokens': content.split(),
'question_tokens': question.split(),
'embedding': [0.1, 0.2, 0.3, 0.4]
}
temp_dir = tempfile.mkdtemp()
test_file_1 = os.path.join(temp_dir, "doc1.txt")
test_file_2 = os.path.join(temp_dir, "doc2.txt")
with open(test_file_1, 'w', encoding='utf-8') as f:
f.write("This is the first document content for testing purposes.")
with open(test_file_2, 'w', encoding='utf-8') as f:
f.write("This is the second document with different content.")
processor = MockProcessor()
dataset_items = [
{
'id': 'item_1',
'name': 'entity_type_1',
'question': 'What is this?',
'gold': 'Answer 1',
'pred': {
'doc_path': test_file_1
}
},
{
'id': 'item_2',
'name': 'entity_type_2',
'question': 'Who did what?',
'gold': 'Answer 2',
'pred': {
'doc_path': test_file_2
}
},
{
'id': 'item_3',
'name': 'entity_type_1',
'question': 'When did it happen?',
'gold': 'Answer 3',
'pred': {
'doc_path': test_file_1
}
}
]
dataset_type = 'validation'
target_names = ['entity_type_1', 'entity_type_2']
ARGS = {
'processor': processor,
'dataset_items': dataset_items,
'dataset_type': dataset_type,
'target_names': target_names
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| process_item |
Ran ran on a synthesized input |
open-dataflow/rare/process/process_pubhealth.py code served (permissive licence) · get_code("5d7f6062b1de0214") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import logging
# Construct arguments for process_item function
# item: dict with keys 'label', 'text_1', 'text_2', 'id'
item = {
'label': 'true',
'text_1': 'Is this a factual claim?',
'text_2': 'The Earth is round.',
'id': 'item_001'
}
# label_to_output: dict mapping labels to output values
label_to_output = {
'true': 'factual',
'false': 'misinformation',
'mixed': 'partially_factual'
}
# instruction_template: string with format placeholders for text_1 and text_2
instruction_template = 'Given the question: {text_1} and the document: {text_2}, determine the veracity.'
ARGS = {
'item': item,
'label_to_output': label_to_output,
'instruction_template': instruction_template
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| process_line |
Ran ran on a synthesized input |
open-dataflow/rare/process/process_mmrait.py code served (permissive licence) · get_code("271b7030a5cdfb52") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import json
import os
# Create a minimal valid JSON line for the function
sample_data = {
'category': 'Support',
'document': 'This is a medical document stating that the vaccine is effective.',
'claim': 'The vaccine is effective in preventing disease.',
'document_image': '/original/path/to/image.jpg'
}
line = json.dumps(sample_data)
ARGS = {
'line': line,
'is_train': True
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| prepare_queue |
Not yet run unverified (harvested, no recorded run) |
open-dataflow/rare/inference/api_infer_post.py code served (permissive licence) · get_code("eef3708cdaa2c7e6") How it ran |