| Args |
Ran ran on a synthesized input · constructed an object; no result was computed |
bigcode-project/selfcodealign/src/star_align/self_ossinstruct.py code served (permissive licence) · get_code("ae0b66e2959a4a8b") 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 an instance of its own class, Args: the run constructed the object and did not call it, so no result was computed. 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 types as _types
def compute_fingerprint(*args, hash_length=5):
"""Stub fingerprint function"""
import hashlib
content = str(args)
return hashlib.md5(content.encode()).hexdigest()[:hash_length]
star_align = _types.SimpleNamespace(**{'utils': _types.SimpleNamespace(compute_fingerprint=compute_fingerprint)})
ARGS = {
'seed_data_files': ['path/to/seed1.py', 'path/to/seed2.py'],
'max_new_data': 100,
'model': 'gpt-3.5-turbo',
'instruct_mode': 'I->R',
'use_vllm_server': True,
'seed_code_start_index': 0,
'continue_from': None,
'seed': 3407,
'temperature': 0.7,
'max_output_tokens': 1536,
'prompting_mode': 'completion',
'num_fewshots': 8,
'async_micro_batch_size': 1,
'num_batched_requests': 1,
'num_sample_per_request': 32,
'sleep': None,
'delay': None,
'tag': '',
'save_dir': './',
}
- 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 Args — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Args 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
|
| Example |
Ran ran on a synthesized input · constructed an object; no result was computed |
bigcode-project/selfcodealign/src/star_align/self_ossinstruct.py code served (permissive licence) · get_code("ce4e9324e38a0ddf") 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 an instance of its own class, Example: the run constructed the object and did not call it, so no result was computed. 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 random
from dataclasses import dataclass
# Set random seed for reproducibility
random.seed(0)
# Set environment variable for LLAMA3
os.environ['LLAMA3'] = '1'
@dataclass(frozen=True)
class Property:
category: str
language: str
concepts: list[str]
difficulty: str
@staticmethod
def random_exercise(concepts: list[str], language: str) -> 'Property':
category = random.choice(['function implementation', 'function implementation', 'class implementation', 'program implementation'])
difficulty = random.choice(['easy', 'medium', 'hard'])
return Property(category=category, language=language, concepts=concepts, difficulty=difficulty)
def concepts_prompt(self) -> str:
return ', '.join(self.concepts)
def prompt(self) -> str:
category = f'category: {self.category}'
language = f'language: {self.language}'
difficulty = f'difficulty: {self.difficulty}'
concepts = f'concepts: {self.concepts_prompt()}'
return '\n'.join([category, language, difficulty, concepts])
def to_json(self) -> dict[str, str | list[str]]:
return dict(category=self.category, language=self.language, concepts=self.concepts, difficulty=self.difficulty)
@staticmethod
def from_json(data: dict) -> 'Property':
assert all((isinstance(data[key], str) for key in ['category', 'language', 'difficulty']))
assert isinstance(data['concepts'], list)
return Property(category=data['category'], language=data['language'], concepts=data['concepts'], difficulty=data['difficulty'])
@dataclass(frozen=True)
class Example:
property: Property
snippet: str
instruction: str
response: str
tests: str
@staticmethod
def prefix_template(mode: str) -> str:
if mode == 'I->R':
if os.getenv('LLAMA3') is not None:
template = '### Instruction {index} \n{instruction}\n\n### Response {index}\n'
else:
template = '<instruction>\n{instruction}\n</instruction>\n\n<response>\n'
return template
elif mode == 'S->C':
return '### Snippet\n{snippet}\n\n### Concepts\n'
elif mode == 'C->I':
return '### Properties\n{property}\n\n### Task\n'
elif mode == 'S->I':
return '### Snippet\n{snippet}\n\n### Task\n'
else:
assert False
def prompt(self, mode: str, return_in_separate: bool=False, index: int | None=None) -> str | tuple[str, str]:
assert index is None or (mode == 'I->R' and os.getenv('LLAMA3') is not None)
if mode == 'I->R':
kwargs = dict(instruction=self.instruction)
if os.getenv('LLAMA3') is not None:
assert index is not None
kwargs['index'] = str(index)
suffix = f'{self.response}\n\n### Tests {index}\n{self.tests}'
else:
suffix = f'{self.response}\n</response>\n\n<tests>\n{self.tests}\n</tests>'
elif mode == 'S->C':
kwargs = dict(snippet=self.snippet)
suffix = self.property.concepts_prompt()
elif mode == 'C->I':
property_prompt = self.property.prompt()
kwargs = dict(property=property_prompt)
suffix = self.instruction
elif mode == 'S->I':
kwargs = dict(snippet=self.snippet)
suffix = self.instruction
else:
assert False
prefix = self.prefix_template(mode).format(**kwargs)
if return_in_separate:
return (prefix, suffix)
else:
return prefix + suffix
# Create a Property instance
test_property = Property(
category='function implementation',
language='python',
concepts=['loops', 'conditionals'],
difficulty='easy'
)
# Create an Example instance with all required arguments
ARGS = {
'property': test_property,
'snippet': 'def calculate_sum(numbers):\n total = 0\n for num in numbers:\n total += num\n return total',
'instruction': 'Write a function that calculates the sum of a list of numbers.',
'response': 'def calculate_sum(numbers):\n return sum(numbers)',
'tests': 'assert calculate_sum([1, 2, 3]) == 6\nassert calculate_sum([]) == 0'
}
- 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 Example — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Example 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
|
| Property |
Ran ran on a synthesized input · constructed an object; no result was computed |
bigcode-project/selfcodealign/src/star_align/self_ossinstruct.py code served (permissive licence) · get_code("5b83b230eb85881a") 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 an instance of its own class, Property: the run constructed the object and did not call it, so no result was computed. 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 random
from dataclasses import dataclass, field
@dataclass(frozen=True)
class Property:
category: str
language: str
concepts: list[str]
difficulty: str
@staticmethod
def random_exercise(concepts: list[str], language: str) -> 'Property':
category = random.choice(['function implementation', 'function implementation', 'class implementation', 'program implementation'])
difficulty = random.choice(['easy', 'medium', 'hard'])
return Property(category=category, language=language, concepts=concepts, difficulty=difficulty)
def concepts_prompt(self) -> str:
return ', '.join(self.concepts)
def prompt(self) -> str:
category = f'category: {self.category}'
language = f'language: {self.language}'
difficulty = f'difficulty: {self.difficulty}'
concepts = f'concepts: {self.concepts_prompt()}'
return '\n'.join([category, language, difficulty, concepts])
def to_json(self) -> dict[str, str | list[str]]:
return dict(category=self.category, language=self.language, concepts=self.concepts, difficulty=self.difficulty)
@staticmethod
def from_json(data: dict) -> 'Property':
assert all((isinstance(data[key], str) for key in ['category', 'language', 'difficulty']))
assert isinstance(data['concepts'], list)
return Property(category=data['category'], language=data['language'], concepts=data['concepts'], difficulty=data['difficulty'])
ARGS = {
'category': 'function implementation',
'language': 'python',
'concepts': ['loops', 'recursion', 'data structures'],
'difficulty': 'medium'
}
- 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 Property — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Property 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
|
| benchmark_name_to_filter_reason |
Ran ran on a synthesized input |
bigcode-project/starcoder2-self-align/src/star_align/decontamination/find_substrings.py code served (permissive licence) · get_code("a349a736c168650a") 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
def benchmark_name_to_filter_reason(benchmark_name: str):
return f'{benchmark_name}_match'
ARGS = {
'benchmark_name': 'test_benchmark'
}
- 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 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
|
| build_kwargs |
Ran ran; our contract draft was wrong, not the code |
bigcode-project/selfcodealign/src/star_align/self_ossinstruct.py code served (permissive licence) · get_code("8dd50472f41a7528") 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 random
from dataclasses import dataclass, field
from typing import Any, Literal, cast
InstructMode = Literal['I->R', 'S->C', 'C->I', 'S->I']
LANGUAGE_MAP = {'cpp': 'C++', 'java': 'Java', 'php': 'PHP', 'python': 'Python', 'rust': 'Rust', 'typescript': 'TypeScript'}
@dataclass(frozen=True)
class Property:
category: str
language: str
concepts: list[str]
difficulty: str
@staticmethod
def random_exercise(concepts: list[str], language: str) -> 'Property':
category = random.choice(['function implementation', 'function implementation', 'class implementation', 'program implementation'])
difficulty = random.choice(['easy', 'medium', 'hard'])
return Property(category=category, language=language, concepts=concepts, difficulty=difficulty)
def concepts_prompt(self) -> str:
return ', '.join(self.concepts)
def prompt(self) -> str:
category = f'category: {self.category}'
language = f'language: {self.language}'
difficulty = f'difficulty: {self.difficulty}'
concepts = f'concepts: {self.concepts_prompt()}'
return '\n'.join([category, language, difficulty, concepts])
def to_json(self) -> dict[str, str | list[str]]:
return dict(category=self.category, language=self.language, concepts=self.concepts, difficulty=self.difficulty)
@staticmethod
def from_json(data: dict) -> 'Property':
assert all((isinstance(data[key], str) for key in ['category', 'language', 'difficulty']))
assert isinstance(data['concepts'], list)
return Property(category=data['category'], language=data['language'], concepts=data['concepts'], difficulty=data['difficulty'])
def build_kwargs(instruct_mode: InstructMode, example: dict) -> dict[str, str]:
kwargs = dict[str, str]()
if instruct_mode == 'I->R':
kwargs['instruction'] = example['instruction']
elif instruct_mode in ['S->C', 'S->I']:
kwargs['snippet'] = example['seed']
elif instruct_mode == 'C->I':
lang = example.get('data_dir', 'dummy_key_not_in_example')
language = LANGUAGE_MAP.get(lang, 'Python')
property = Property.random_exercise(example['concepts'], language=language)
property_prompt = property.prompt()
kwargs['property'] = property_prompt
kwargs['property_obj'] = property
else:
assert False
return kwargs
# Test case 1: I->R mode
example_ir = {
'instruction': 'Write a function that adds two numbers'
}
# Test case 2: S->C mode
example_sc = {
'seed': 'def hello():\n print("world")'
}
# Test case 3: C->I mode with language in data_dir
example_ci = {
'data_dir': 'cpp',
'concepts': ['recursion', 'dynamic programming']
}
ARGS = {
'instruct_mode': 'I->R',
'example': example_ir
}
- 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
|
| chunked |
Ran ran; our contract draft was wrong, not the code |
bigcode-project/starcoder2-self-align/src/star_align/utils.py code served (permissive licence) · get_code("a6974ed3c2ddb7eb") 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 generator. 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
from typing import Sequence, TypeVar
torch.manual_seed(0)
_T = TypeVar('_T')
# Create a simple sequence to chunk
seq = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
n = 3
ARGS = {
'seq': seq,
'n': n
}
- 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 generator — a generator output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a generator 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
|
| encode_prompt |
Ran ran; our contract draft was wrong, not the code |
sahil280114/codealpaca/generate_instruction.py code served (permissive licence) · get_code("9b2dd0265fc6e6b6") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) 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
import tempfile
import os
# Create a temporary prompt.txt file
temp_dir = tempfile.mkdtemp()
prompt_file = os.path.join(temp_dir, 'prompt.txt')
with open(prompt_file, 'w') as f:
f.write('You are a helpful assistant.\n')
# Change to temp directory so the function can find prompt.txt
original_dir = os.getcwd()
os.chdir(temp_dir)
# Define the prompt_instructions parameter
prompt_instructions = [
{
'instruction': 'Classify the sentiment',
'input': 'This movie is great!',
'output': 'Positive'
},
{
'instruction': 'Translate to French',
'input': 'Hello world',
'output': 'Bonjour le monde'
},
{
'instruction': 'Summarize the text',
'input': '',
'output': 'This is a summary'
}
]
ARGS = {
'prompt_instructions': prompt_instructions
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- 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
|
| extract_and_concat_function_names |
Ran ran on a synthesized input |
bigcode-project/starcoder2-self-align/src/star_align/clean_data.py code served (permissive licence) · get_code("ab5fa2503ae7af82") 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 ast
def extract_and_concat_function_names(python_content):
"""
Extracts all function names from a given Python content string and concatenates them into a single string.
Parameters:
- python_content: A string containing the Python code to analyze.
Returns:
- A string containing all function names defined in the content, concatenated.
"""
tree = ast.parse(python_content)
function_names = []
class FunctionDefVisitor(ast.NodeVisitor):
def visit_FunctionDef(self, node):
function_names.append(node.name)
self.generic_visit(node)
def visit_AsyncFunctionDef(self, node):
function_names.append(node.name)
self.generic_visit(node)
visitor = FunctionDefVisitor()
visitor.visit(tree)
return ' '.join(function_names)
# Setup code to construct valid arguments
python_content = """
def add(x, y):
return x + y
def multiply(a, b):
return a * b
async def fetch_data():
pass
class MyClass:
def method(self):
pass
"""
ARGS = {
"python_content": python_content
}
- 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
|
| extract_code_with_indentation |
Ran ran on a synthesized input |
bigcode-project/starcoder2-self-align/src/star_align/collect_snippets.py code served (permissive licence) · get_code("5483cff90bd19eb8") 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
# Create a mock node class that mimics tree-sitter's Node interface
class MockNode:
def __init__(self, start_byte, end_byte):
self.start_byte = start_byte
self.end_byte = end_byte
# Define sample source code with indentation
source_code = """def hello():
x = 1
if True:
y = 2
print(y)
z = 3
"""
# Create a node that corresponds to "y = 2" which is indented
# First, find where "y = 2" starts in the source code
target_line = " y = 2"
start_byte = source_code.find(target_line)
end_byte = start_byte + len("y = 2")
node = MockNode(start_byte, end_byte)
ARGS = {
"node": node,
"source_code": source_code
}
- 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
|
| extract_docstring |
Ran ran; our contract draft was wrong, not the code |
bigcode-project/starcoder2-self-align/src/star_align/decontamination/benchmark_data.py code served (permissive licence) · get_code("0edeacd7a9034f53") 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 torch.nn as nn
# This function extracts docstrings from Python code prompts
# It looks for triple-quoted strings and returns the content between them
# Test case 1: docstring with """ delimiters (2 occurrences)
prompt_1 = '''def foo():
"""This is a docstring"""
pass
'''
# Test case 2: docstring with """ delimiters (4 occurrences - nested or multiple)
prompt_2 = '''def bar():
"""First docstring"""
x = """some string literal"""
"""Second docstring"""
pass
'''
# Test case 3: docstring with ''' delimiters
prompt_3 = """def baz():
'''This is another docstring'''
pass
"""
# Use the first prompt as the main test case
ARGS = {
"prompt": prompt_1
}
- 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 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
|
| extract_ds_1000_prompt |
Ran ran on a synthesized input |
bigcode-project/starcoder2-self-align/src/star_align/decontamination/benchmark_data.py code served (permissive licence) · get_code("2160a71414dde9a6") 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
# The function extract_ds_1000_prompt takes a single string parameter 'prompt'
# It checks if 'SOLUTION START' or 'BEGIN SOLUTION' is in the prompt
# and splits the prompt accordingly, or raises ValueError if neither is found
# Test case 1: prompt with 'SOLUTION START'
prompt_1 = "This is the problem statement\nSOLUTION START\nHere is the solution"
ARGS = {
'prompt': prompt_1
}
- 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 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
|
| filter_reason_to_benchmark_name |
Ran ran on a synthesized input |
bigcode-project/starcoder2-self-align/src/star_align/decontamination/find_substrings.py code served (permissive licence) · get_code("9c5b01ef26d74c74") 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
# Setup
torch.manual_seed(0)
# The function takes a filter_reason string that must end with '_match'
# and removes the last 6 characters ('_match') to return the benchmark name
filter_reason_value = "accuracy_match"
ARGS = {
"filter_reason": filter_reason_value
}
- 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 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
|
| find_word_in_string |
Ran ran; our contract draft was wrong, not the code |
sahil280114/codealpaca/generate_instruction.py code served (permissive licence) · get_code("8ca6a5f9f77053c2") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Match. 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
# The function find_word_in_string takes two parameters:
# w: a word (string) to search for
# s: a string to search in
# It uses re.compile with word boundary matching and case-insensitive flag
ARGS = {
"w": "hello",
"s": "Hello world, this is a test string with HELLO in it"
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- 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 Match — a Match output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Match 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
|
| flatten_openai_responses |
Ran ran; our contract draft was wrong, not the code |
bigcode-project/selfcodealign/src/star_align/self_ossinstruct.py code served (permissive licence) · get_code("1fc3a1bcc54c9a56") 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.
from openai.types import CompletionChoice, Completion
# Create minimal CompletionChoice instances
choice1 = CompletionChoice(
index=0,
message=None,
text="Sample response 1",
finish_reason="stop",
logprobs=None
)
choice2 = CompletionChoice(
index=1,
message=None,
text="Sample response 2",
finish_reason="stop",
logprobs=None
)
choice3 = CompletionChoice(
index=0,
message=None,
text="Sample response 3",
finish_reason="stop",
logprobs=None
)
# Create Completion instances with multiple choices
completion1 = Completion(
id="completion-1",
object="text_completion",
created=1234567890,
model="gpt-3.5-turbo",
choices=[choice1, choice2],
usage=None,
system_fingerprint="fp-123"
)
completion2 = Completion(
id="completion-2",
object="text_completion",
created=1234567891,
model="gpt-3.5-turbo",
choices=[choice3],
usage=None,
system_fingerprint="fp-124"
)
ARGS = {
"responses": [completion1, completion2]
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- openai — 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
|
| form_starcoder_infill |
Ran ran; our contract draft was wrong, not the code |
bigcode-project/starcoder2-self-align/src/star_align/llm_wrapper.py code served (permissive licence) · get_code("971c70adc27358da") 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
ARGS = {
"prefix": "def hello():\n print(",
"suffix": ")\n return True"
}
- 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 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
|
| make_python_membound_code_prefix |
Ran ran on a synthesized input |
bigcode-project/starcoder2-self-align/src/star_align/execution_filter.py code served (permissive licence) · get_code("8c087c3185ff5fab") 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 resource
import platform
def make_python_membound_code_prefix(limit_mb):
maximum_memory_bytes = limit_mb * 1024 * 1024
_magic_splitter_ = '### -- what do you think? -- ###'
return f'import resource\nimport platform\n\nresource.setrlimit(\n resource.RLIMIT_AS, ({maximum_memory_bytes}, {maximum_memory_bytes})\n)\nresource.setrlimit(\n resource.RLIMIT_DATA, ({maximum_memory_bytes}, {maximum_memory_bytes})\n)\nif not platform.uname().system == "Darwin":\n resource.setrlimit(\n resource.RLIMIT_STACK, ({maximum_memory_bytes}, {maximum_memory_bytes})\n )\n{_magic_splitter_}\n'
ARGS = {
'limit_mb': 256
}
- 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
|
| ngrams |
Ran ran on a synthesized input |
bigcode-project/starcoder2-self-align/src/star_align/minhash_dedup.py code served (permissive licence) · get_code("a0d7edeceb109990") 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 zip. 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
from typing import List
torch.manual_seed(0)
# The function ngrams takes:
# - sequence: List[str]
# - n: int
# - min_length: int (optional, default=5)
# Create a simple sequence of strings
sequence = ["hello", "world", "this", "is", "a", "test", "string"]
# Create an n value for generating n-grams
n = 2
# Create a min_length value
min_length = 5
ARGS = {
"sequence": sequence,
"n": n,
"min_length": min_length,
}
- 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 zip — a zip output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a zip 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
|
| pad_sequences |
Ran ran, honoured the contract we drafted |
bigcode-project/starcoder2-self-align/src/star_align/llm_wrapper.py code served (permissive licence) · get_code("7b178c461482e3f6") 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 Tensor, ndim 2, dtype family int, shape (3, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 = {
"sequences": [[1, 2, 3], [4, 5], [6, 7, 8, 9]],
"pad_value": 0,
"padding_side": "right",
"dtype": torch.long,
"padding_length": None,
}
- 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 Tensor, ndim 2, dtype family int, shape (3, 4) — shape (3, 4) as a later run recorded it
- 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
|
| parse_generated_content |
Ran ran; our contract draft was wrong, not the code |
bigcode-project/selfcodealign/src/star_align/self_ossinstruct.py code served (permissive licence) · get_code("a75703b3e4e8a6a7") 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 torch
import numpy as np
from typing import Literal
# Set seed for reproducibility
torch.manual_seed(0)
# Define ARGS with valid arguments for parse_generated_content
ARGS = {
'content': 'This is a test response with some content',
'instruct_mode': 'I->R'
}
# Test with different modes to verify all paths work
# Additional test cases (not in ARGS, just for reference):
test_cases = [
{'content': 'concept1, concept2, concept3', 'instruct_mode': 'S->C'},
{'content': 'Generate a summary of the text', 'instruct_mode': 'C->I'},
{'content': 'Write instructions for making tea', 'instruct_mode': 'S->I'},
]
- 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 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
|
| parse_property |
Ran ran; our contract draft was wrong, not the code |
bigcode-project/selfcodealign/src/star_align/self_ossinstruct.py code served (permissive licence) · get_code("fba12f4a4a9f3c28") 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 Property. 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 random
from dataclasses import dataclass, field
@dataclass(frozen=True)
class Property:
category: str
language: str
concepts: list[str]
difficulty: str
@staticmethod
def random_exercise(concepts: list[str], language: str) -> 'Property':
category = random.choice(['function implementation', 'function implementation', 'class implementation', 'program implementation'])
difficulty = random.choice(['easy', 'medium', 'hard'])
return Property(category=category, language=language, concepts=concepts, difficulty=difficulty)
def concepts_prompt(self) -> str:
return ', '.join(self.concepts)
def prompt(self) -> str:
category = f'category: {self.category}'
language = f'language: {self.language}'
difficulty = f'difficulty: {self.difficulty}'
concepts = f'concepts: {self.concepts_prompt()}'
return '\n'.join([category, language, difficulty, concepts])
def to_json(self) -> dict[str, str | list[str]]:
return dict(category=self.category, language=self.language, concepts=self.concepts, difficulty=self.difficulty)
@staticmethod
def from_json(data: dict) -> 'Property':
assert all((isinstance(data[key], str) for key in ['category', 'language', 'difficulty']))
assert isinstance(data['concepts'], list)
return Property(category=data['category'], language=data['language'], concepts=data['concepts'], difficulty=data['difficulty'])
def parse_property(content: str) -> Property | None:
content = content.strip()
lines = content.split('\n')
if len(lines) != 4:
return None
try:
lines = [line[line.index(':') + 1:].strip() for line in lines]
except ValueError:
return None
category, language, difficulty, concepts_str = lines
concepts = list(map(str.strip, concepts_str.split(',')))
return Property(category, language, concepts, difficulty)
# Valid test content that will parse correctly
test_content = """category: function implementation
language: python
difficulty: easy
concepts: loops, conditionals, string manipulation"""
ARGS = {
'content': test_content
}
- 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 Property — a Property output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Property 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
|
| post_process_gpt3_response |
Ran ran, honoured the contract we drafted |
sahil280114/codealpaca/generate_instruction.py code served (permissive licence) · get_code("a5e4ad4e11cf2143") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) 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 re
import string
# Construct valid arguments for post_process_gpt3_response
ARGS = {
'num_prompt_instructions': 2,
'response': {
'text': '\n### 3. Instruction: Write a summary of the text\nInput: The quick brown fox jumps over the lazy dog\nOutput: A fast fox jumps over a slow dog\n### 4. Instruction: Translate to Spanish\nInput: Hello world\nOutput: Hola mundo',
'finish_reason': 'stop'
}
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- 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
|
| postprocess |
Ran ran; our contract draft was wrong, not the code |
bigcode-project/selfcodealign/evaluation/ds_1000.py code served (permissive licence) · get_code("1173d57fe1b4d158") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) 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
torch.manual_seed(0)
ARGS = {
"text": "some code here\n```\nmore code"
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- Imports
- 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
|
| preprocess_completion_prompt |
Ran ran; our contract draft was wrong, not the code |
bigcode-project/selfcodealign/evaluation/ds_1000.py code served (permissive licence) · get_code("956cd0aa1cec0821") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned tuple, 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.
# Analyze the function to understand what it needs
# The function takes a single parameter: prompt (str)
# It processes DS-1000 prompts in completion mode
# Let's create a valid prompt that matches one of the code paths
# The function has multiple branches based on prompt structure
# Path 1: prompt contains 'SOLUTION START' (simplest case)
prompt_with_solution_start = """def solve(x):
return x * 2
# SOLUTION START"""
# Path 2: prompt with '### BEGIN SOLUTION' (has <code> tags)
prompt_with_begin_solution_v1 = """Problem: Write a function that doubles the input
A: <code>
def solve(x):
return x * 2
### BEGIN SOLUTION
# return result
# result
</code>"""
# Path 3: prompt with 'BEGIN SOLUTION' (has 2 <code> tags, 1 </code>)
prompt_with_begin_solution_v2 = """Problem: Write a function that doubles the input
A: <code>
def solve(x):
pass
</code>
Some explanation
<code>
def solve(x):
return x * 2
BEGIN SOLUTION
# Solution code
<code>"""
# Use the simplest valid case
ARGS = {
"prompt": prompt_with_solution_start
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- 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 tuple, ndim 1, dtype family float — a tuple 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
|
| read_jsonl |
Ran ran; our contract draft was wrong, not the code |
bigcode-project/starcoder2-self-align/src/star_align/utils.py code served (permissive licence) · get_code("b0fdb2b203090d2e") 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 tempfile
from pathlib import Path
# Create a temporary JSONL file with test data
temp_dir = tempfile.TemporaryDirectory()
temp_path = Path(temp_dir.name) / "test.jsonl"
# Write some test JSONL data
test_data = [
{"id": 1, "text": "hello"},
{"id": 2, "text": "world"},
{"id": 3, "name": "test", "values": [1, 2, 3]}
]
with open(temp_path, 'w') as f:
for item in test_data:
f.write(json.dumps(item) + '\n')
# Define arguments for read_jsonl
ARGS = {
"path": temp_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
|
| retry |
Ran ran on a synthesized input |
bigcode-project/starcoder2-self-align/src/star_align/utils.py code served (permissive licence) · get_code("e10de9c97d0ec5c5") 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 function. 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 tenacity
# Define the errors parameter - can be a single exception type or tuple of exception types
errors_arg = (ValueError, RuntimeError, TypeError)
# Define max_attempts parameter
max_attempts_arg = 5
# Construct the ARGS dictionary
ARGS = {
"errors": errors_arg,
"max_attempts": max_attempts_arg,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- tenacity, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
|
| sha1_hash |
Ran ran on a synthesized input |
bigcode-project/starcoder2-self-align/src/star_align/minhash_dedup.py code served (permissive licence) · get_code("e5358426087cdd76") 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 int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 hashlib
import struct
def sha1_hash(data: bytes, d: int=32) -> int:
"""
Generate a d-bit hash value from the given data.
"""
if d == 32:
return struct.unpack('<I', hashlib.sha1(data, usedforsecurity=False).digest()[:4])[0]
if d == 64:
return struct.unpack('<Q', hashlib.sha1(data, usedforsecurity=False).digest()[:8])[0]
return int.from_bytes(hashlib.sha1(data, usedforsecurity=False).digest()[:d // 8], byteorder='little')
ARGS = {
"data": b"hello world",
"d": 32
}
- 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 int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
- 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
|
| split_llama3_response_tests |
Ran ran on a synthesized input |
bigcode-project/starcoder2-self-align/src/star_align/sanitize_data.py code served (permissive licence) · get_code("13b161a5bbc15829") 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 re
LLAMA3_DEFAULT_TEST_SPLIT = '### Tests \\d\\n'
LLAMA3_ADDITIONAL_PATTERNS = ['We can verify the functionality', 'We can verify the correctness', 'You can verify the correctness', 'You can verify the functionality', 'To ensure the correctness', 'To verify the correctness', 'To test the', 'To test this', 'To test this', 'You can test the', 'We can test the', 'We can test this', "Now, we'll test"]
def split_llama3_response_tests(response: str) -> list[str]:
splits = re.split(LLAMA3_DEFAULT_TEST_SPLIT, response)
if len(splits) > 2:
return []
if len(splits) == 2:
return splits
for pattern in LLAMA3_ADDITIONAL_PATTERNS:
index = response.find(pattern)
if index != -1:
return [response[:index], response[index:]]
return []
# Test case 1: response with matching pattern
response_1 = "Here is some code. To test the function:\nprint('hello')"
# Test case 2: response that matches the default split pattern
response_2 = "Some code here\n### Tests 1\ntest code here"
# Test case 3: response with no matches
response_3 = "Just some random response with no special patterns"
ARGS = {
"response": response_1
}
- 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
|
| suppress_output |
Ran ran on a synthesized input |
bigcode-project/starcoder2-self-align/src/star_align/execution_filter.py code served (permissive licence) · get_code("d2c4d113d519cc11") 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 function. 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 sys
import torch
import torch.nn as nn
torch.manual_seed(0)
# The suppress_output decorator takes a function as its only parameter
# Let's create a simple test function to be decorated
def test_function(x, y):
"""A simple function that will be wrapped by suppress_output"""
return x + y
# Create the ARGS dictionary
# The suppress_output function takes one parameter: func
ARGS = {
"func": test_function
}
- 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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
|
| update_benchmark_dict |
Ran ran on a synthesized input |
bigcode-project/starcoder2-self-align/src/star_align/decontamination/find_substrings.py code served (permissive licence) · get_code("303bc7228b4758e6") 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 tuple. 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 os
from copy import deepcopy
# Create temporary files for the cache JSONs
temp_dir = tempfile.mkdtemp()
benchmark_cache_path = os.path.join(temp_dir, 'benchmark_cache.json')
excluded_data_cache_path = os.path.join(temp_dir, 'excluded_data_cache.json')
# Create benchmark cache file
benchmark_cache_data = {
'benchmark_1': ['sample_1', 'sample_2'],
'benchmark_2': ['sample_3']
}
with open(benchmark_cache_path, 'w') as f:
json.dump(benchmark_cache_data, f)
# Create excluded data cache file
excluded_data_cache_data = [
{'filter_reason': 'benchmark_1_match', 'matched_substring': 'sample_1', 'file': 'data_1.txt'},
{'filter_reason': 'benchmark_1_match', 'matched_substring': 'sample_2', 'file': 'data_2.txt'},
{'filter_reason': 'benchmark_2_match', 'matched_substring': 'sample_3', 'file': 'data_3.txt'},
{'filter_reason': 'other_reason', 'matched_substring': 'sample_4', 'file': 'data_4.txt'}
]
with open(excluded_data_cache_path, 'w') as f:
json.dump(excluded_data_cache_data, f)
# Create filter_out dict
filter_out = {
'benchmark_1': ['sample_1', 'sample_2', 'sample_5'],
'benchmark_2': ['sample_3', 'sample_6'],
'benchmark_3': ['sample_7']
}
ARGS = {
'filter_out': filter_out,
'benchmark_cache': benchmark_cache_path,
'excluded_data_cache': excluded_data_cache_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 tuple — a tuple output has no array shape of its own; none is 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
|
| xxh3_16hash |
Ran ran on a synthesized input |
bigcode-project/starcoder2-self-align/src/star_align/minhash_dedup.py code served (permissive licence) · get_code("b85036e1fe10ab3b") 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 int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 xxhash
# The function takes two parameters:
# 1. data: bytes - the data to hash
# 2. seed: int - optional seed (default 0)
# Create simple test data
test_data = b"hello world"
test_seed = 42
ARGS = {
"data": test_data,
"seed": test_seed,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- xxhash — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
- 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
|
| Fewshot |
Not yet run unverified (harvested, no recorded run) |
bigcode-project/selfcodealign/src/star_align/self_ossinstruct.py code served (permissive licence) · get_code("69d27e542d70e540") How it ran |
| containerized_run |
Not yet run unverified (harvested, no recorded run) |
bigcode-project/starcoder2-self-align/src/star_align/execution_filter.py code served (permissive licence) · get_code("17b4339501de907f") How it ran |
| extract_snippets_with_constraints |
Not yet run unverified (harvested, no recorded run) |
bigcode-project/starcoder2-self-align/src/star_align/collect_snippets.py code served (permissive licence) · get_code("465ba803e1fe81b9") How it ran |
| get_model_context |
Not yet run unverified (harvested, no recorded run) |
bigcode-project/starcoder2-self-align/src/star_align/llm_wrapper.py code served (permissive licence) · get_code("1415e89bd7265711") How it ran |
| get_ossinstruct_fewshots |
Not yet run unverified (harvested, no recorded run) |
bigcode-project/selfcodealign/src/star_align/self_ossinstruct.py code served (permissive licence) · get_code("d063f1765c316bac") How it ran |
| load_dataset_column |
Not yet run unverified (harvested, no recorded run) |
bigcode-project/starcoder2-self-align/src/star_align/decontamination/benchmark_data.py code served (permissive licence) · get_code("9c7f0c27b8d08b0f") How it ran |
| main |
Not yet run unverified (harvested, no recorded run) |
bigcode-project/selfcodealign/src/star_align/self_ossinstruct.py code served (permissive licence) · get_code("5c02c0de38a6ae98") How it ran |