| check_number_proximity_any_order |
Ran ran on a synthesized input |
eth-sri/matharena/src/matharena/grader.py code served (permissive licence) · get_code("cebd63ce42db8cf0") 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 bool, ndim 0, dtype family float, 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 re
from collections import defaultdict
# Define ARGS dict with valid arguments for check_number_proximity_any_order
ARGS = {
"gold": "The answer is 42 and 3.14",
"model": "We found that 42 is close to 3.14 in the data",
"threshold": 20
}
- 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 bool, ndim 0, dtype family float, 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
|
| exclude_configs |
Ran ran on a synthesized input |
eth-sri/matharena/src/matharena/configs.py code served (permissive licence) · get_code("3c24b8cb7ab88e6d") 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, 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 tempfile
import os
# Create a temporary exclude file with some regex patterns
temp_dir = tempfile.mkdtemp()
exclude_file_path = os.path.join(temp_dir, "exclude.txt")
with open(exclude_file_path, 'w', encoding='utf-8') as f:
f.write("config_v1_.*\n")
f.write("test_.*_prod EXCEPT staging\n")
f.write("experimental_.*\n")
# Create sample configurations
configs = {
"config_v1_baseline": {"lr": 0.001, "batch_size": 32},
"config_v2_baseline": {"lr": 0.0005, "batch_size": 64},
"config_v2_advanced": {"lr": 0.0001, "batch_size": 128},
"experimental_new": {"lr": 0.01, "batch_size": 16},
"test_model_prod": {"lr": 0.005, "batch_size": 48},
}
# Create human-readable IDs mapping
human_readable_ids = {
"config_v1_baseline": "Baseline V1",
"config_v2_baseline": "Baseline V2",
"config_v2_advanced": "Advanced V2",
"experimental_new": "Experimental New",
"test_model_prod": "Test Model Production",
}
# Competition name
comp = "production"
ARGS = {
"configs": configs,
"human_readable_ids": human_readable_ids,
"exclude_file_path": exclude_file_path,
"comp": comp,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- loguru — 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
|
| extract_numbers |
Ran ran on a synthesized input |
eth-sri/matharena/src/matharena/grader.py code served (permissive licence) · get_code("811a3d879ce72f27") 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 2, 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
def extract_numbers(text):
"""
Extract numbers from the text.
Args:
text (str): The text to extract numbers from.
Returns:
list: A list of tuples, where each tuple contains the number string,
start index, and end index.
"""
pattern = '(?<!\\w)(-?\\d+(?:\\.\\d+)?)(?!\\w)'
return [(m.group(), m.start(), m.end()) for m in re.finditer(pattern, text)]
# Setup code
ARGS = {
"text": "The temperature is -42.5 degrees and the humidity is 78 percent."
}
- 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 2, 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
|
| find_last_boxed_content |
Ran ran on a synthesized input |
eth-sri/matharena/src/matharena/parser.py code served (permissive licence) · get_code("d8d2c5ba39e34d5f") 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, 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
from enum import Enum
from functools import total_ordering
from typing import Any, Optional
import regex
APPROX_RE = re.compile('\\\\approx|≈|approximately|approx\\.?|about', re.I)
EXACT_BOX_TOKENS = ('\\frac', '\\sqrt', '\\binom', '/', '^')
@total_ordering
class WarningType(Enum):
"""An enumeration for warning levels."""
NONE = 0
MINOR = 1
POSSIBLE = 2
MAJOR = 3
def __lt__(self, other):
if self.__class__ is other.__class__:
return self.value < other.value
return self.value < other
def remove_inner_boxed(match: str):
"""Removes inner `\x08oxed` or `\x0cbox` commands from a string.
Args:
match (str): The string to process.
Returns:
str: The string with inner `\x08oxed` or `\x0cbox` commands removed.
"""
pattern = '(\\\\boxed|\\\\fbox)\\{((?:[^{}]|\\{(?2)\\})*)\\}'
matches = list(regex.finditer(pattern, match))
if not matches:
return match
for m in matches:
match = match.replace(m.group(0), m.group(2))
return match
def contains_approximation(s: str) -> bool:
"""Returns whether a boxed answer looks like a trailing approximation."""
return APPROX_RE.search(s) is not None
def should_prefer_previous_boxed_over_approximation(s: str) -> bool:
if not contains_approximation(s):
return False
prefix = APPROX_RE.split(s, maxsplit=1)[0].strip()
if not prefix:
return True
if '=' in prefix or any((token in prefix for token in EXACT_BOX_TOKENS)):
return False
return re.fullmatch('[\\s$(){}\\[\\].,0-9+\\-]+', prefix) is not None
def is_decimal_approximation_box(s: str) -> bool:
"""Returns whether a boxed value is only a decimal approximation."""
s = s.replace('\\displaystyle', '')
s = s.replace('$', '').replace(',', '').strip()
s = re.sub('\\\\[,;:! ]', '', s)
s = re.sub('\\s+', '', s)
return re.fullmatch('[-+]?\\d+\\.\\d+(?:\\.\\.\\.)?', s) is not None
def looks_like_exact_boxed_expression(s: str) -> bool:
"""Returns whether a boxed expression is a plausible exact answer."""
if contains_approximation(s) or is_decimal_approximation_box(s):
return False
return any((token in s for token in EXACT_BOX_TOKENS))
def find_last_boxed_content(text: str, list_answer: bool=False) -> Optional[str]:
"""Finds the content of the last `\x08oxed` or `\x0cbox` command in a string.
Args:
text (str): The string to search.
list_answer (bool, optional): Whether to expect a list of answers. Defaults to False.
Returns:
tuple: A tuple containing the content of the last `\x08oxed` or `\x0cbox` command
and a warning level.
"""
pattern = '(boxed|fbox)\\{((?:[^{}]|\\{(?2)\\})*)\\}'
matches = list(regex.finditer(pattern, text))
if not matches:
return (None, WarningType.NONE)
if len(matches) > 1 and list_answer:
split_text = text.split('\n')
for i in range(len(split_text) - 1, -1, -1):
matches_line = list(regex.finditer(pattern, split_text[i]))
if len(matches_line) > 0:
if any((',' in match.group(2) for match in matches_line)):
returned_boxed = matches_line[-1].group(2)
else:
returned_boxed = ','.join([match.group(2) for match in matches_line])
return (remove_inner_boxed(returned_boxed), WarningType.POSSIBLE)
selected_match = matches[-1]
if len(matches) > 1 and should_prefer_previous_boxed_over_approximation(selected_match.group(2)):
for match in reversed(matches[:-1]):
if not contains_approximation(match.group(2)):
selected_match = match
break
if len(matches) > 1 and is_decimal_approximation_box(selected_match.group(2)):
for match in reversed(matches[:-1]):
if looks_like_exact_boxed_expression(match.group(2)):
selected_match = match
break
last_match = remove_inner_boxed(selected_match.group(2))
return (last_match, WarningType.NONE)
ARGS = {
"text": "The answer is \\boxed{42} and approximately \\boxed{42.0}",
"list_answer": False,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- regex — 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
|
| load_configs |
Ran ran on a synthesized input |
eth-sri/matharena/src/matharena/configs.py code served (permissive licence) · get_code("19d49ff9409d85f2") 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 tempfile
import os
from pathlib import Path
import yaml
# Create a temporary directory with test YAML config files
temp_dir = tempfile.mkdtemp()
# Create a valid config file
config1 = {
'human_readable_id': 'config_1',
'param1': 'value1',
'param2': 42
}
config1_path = Path(temp_dir) / 'config1.yaml'
with open(config1_path, 'w') as f:
yaml.dump(config1, f)
# Create another valid config file in a subdirectory
subdir = Path(temp_dir) / 'subdir'
subdir.mkdir(exist_ok=True)
config2 = {
'human_readable_id': 'config_2',
'nested_param': 'value2'
}
config2_path = subdir / 'config2.yml'
with open(config2_path, 'w') as f:
yaml.dump(config2, f)
ARGS = {
'root_dir': temp_dir,
'remove_extension': True
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- yaml — 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
|
| load_json_zst |
Ran ran on a synthesized input |
eth-sri/matharena/src/matharena/json_zst.py code served (permissive licence) · get_code("b8de5523615a315e") 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
from pathlib import Path
import tempfile
import zstandard as zstd
# Create a temporary file with zstd-compressed JSON data
temp_dir = tempfile.mkdtemp()
temp_path = Path(temp_dir) / "test_data.json.zst"
# Prepare test data
test_data = {"key1": "value1", "key2": [1, 2, 3], "key3": {"nested": True}}
json_bytes = json.dumps(test_data).encode('utf-8')
# Compress with zstandard
compressor = zstd.ZstdCompressor()
compressed_data = compressor.compress(json_bytes)
# Write compressed data to file
with temp_path.open('wb') as f:
f.write(compressed_data)
ARGS = {
"path": temp_path
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- zstandard — 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
|
| load_metadata |
Ran ran on a synthesized input |
eth-sri/matharena/src/matharena/arxivbench_utils.py code served (permissive licence) · get_code("d2318c1b39c8b47e") 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
import tempfile
import shutil
# Create a temporary directory structure with test metadata
temp_dir = tempfile.mkdtemp()
paper_id = "test_paper_123"
paper_path = os.path.join(temp_dir, paper_id)
os.makedirs(paper_path, exist_ok=True)
# Create a valid metadata.json file
metadata_content = {
"title": "Test Paper",
"authors": ["Author One", "Author Two"],
"year": 2024,
"abstract": "This is a test paper"
}
metadata_file = os.path.join(paper_path, 'metadata.json')
with open(metadata_file, 'w', encoding='utf-8') as f:
json.dump(metadata_content, f, ensure_ascii=False)
ARGS = {
"paper_root": temp_dir,
"paper_id": paper_id
}
- 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
|
| load_model_config |
Ran ran on a synthesized input |
eth-sri/matharena/src/matharena/arxivbench_utils.py code served (permissive licence) · get_code("1556226ccd07a184") 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 tempfile
import yaml
import os
# Create a temporary YAML file with valid model config
temp_dir = tempfile.mkdtemp()
config_path = os.path.join(temp_dir, "model_config.yaml")
# Write a valid model configuration to the file
config_data = {
'model': {
'type': 'transformer',
'hidden_size': 256,
'num_layers': 2
},
'human_readable_id': 'test_model',
'other_params': {'some': 'value'},
'date': '2024-01-01',
'training': {
'epochs': 10,
'batch_size': 32
}
}
with open(config_path, 'w', encoding='utf-8') as f:
yaml.dump(config_data, f)
ARGS = {
'path': config_path
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- yaml — 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
|
| output_json_stem |
Ran ran on a synthesized input |
eth-sri/matharena/src/matharena/json_zst.py code served (permissive licence) · get_code("dc50b0737967bce1") 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.
from pathlib import Path
OUTPUT_JSON_SUFFIX = '.json.zst'
def output_json_stem(path):
return Path(path).name.removesuffix(OUTPUT_JSON_SUFFIX)
ARGS = {
'path': 'example_file.json.zst'
}
- 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
|
| parse_arxiv_version |
Ran ran on a synthesized input |
eth-sri/matharena/src/matharena/arxiv_source.py code served (permissive licence) · get_code("f2a8eb492e8c00b1") 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 ArxivVersion. 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
from dataclasses import asdict, dataclass
from urllib.parse import quote, urlparse
@dataclass(frozen=True)
class ArxivVersion:
"""A normalized arXiv identifier pinned to one immutable version."""
base_id: str
version: int
def __post_init__(self) -> None:
if not isinstance(self.base_id, str) or not self.base_id:
raise ValueError('base_id must be a non-empty arXiv identifier')
if not isinstance(self.version, int) or isinstance(self.version, bool) or self.version < 1:
raise ValueError('version must be a positive integer')
modern = re.fullmatch('(?P<year>\\d{2})(?P<month>\\d{2})\\.\\d{4,5}', self.base_id)
legacy = re.fullmatch('[A-Za-z][A-Za-z0-9.-]*/\\d{7}', self.base_id)
if modern:
if not 1 <= int(modern.group('month')) <= 12:
raise ValueError('base_id contains an invalid month')
elif legacy is None:
raise ValueError(f'invalid arXiv base identifier: {self.base_id!r}')
@property
def canonical_id(self) -> str:
return f'{self.base_id}v{self.version}'
@property
def storage_key(self) -> str:
"""A slash-free name suitable for caller-created paper directories."""
return self.canonical_id.replace('/', '__')
def __str__(self) -> str:
return self.canonical_id
_MODERN_ID_RE = re.compile('(?P<year>\\d{2})(?P<month>\\d{2})\\.(?P<number>\\d{4,5})v(?P<version>[1-9]\\d*)')
_LEGACY_ID_RE = re.compile('(?P<archive>[A-Za-z][A-Za-z0-9.-]*)/(?P<number>\\d{7})v(?P<version>[1-9]\\d*)')
def parse_arxiv_version(value: str) -> ArxivVersion:
"""Parse an arXiv ID or arxiv.org URL and require an explicit ``vN``.
Both modern IDs (``2608.12345v1``) and legacy IDs
(``hep-th/9901001v2``) are supported. Unversioned identifiers are rejected
so a later paper revision cannot silently change a benchmark item.
"""
if not isinstance(value, str) or not value.strip():
raise ValueError('arXiv identifier must be a non-empty string')
candidate = value.strip()
if candidate.lower().startswith('arxiv:'):
candidate = candidate[6:].strip()
if '://' in candidate:
parsed = urlparse(candidate)
if parsed.scheme != 'https' or parsed.hostname not in {'arxiv.org', 'www.arxiv.org', 'export.arxiv.org'}:
raise ValueError('only HTTPS arxiv.org URLs are accepted')
if parsed.query or parsed.fragment:
raise ValueError('arXiv URL must not contain a query or fragment')
path = parsed.path.strip('/')
for prefix in ('abs/', 'pdf/', 'src/'):
if path.startswith(prefix):
path = path[len(prefix):]
break
else:
raise ValueError('arXiv URL must use an /abs/, /pdf/, or /src/ path')
candidate = path
if candidate.endswith('.pdf'):
candidate = candidate[:-4]
modern = _MODERN_ID_RE.fullmatch(candidate)
if modern:
month = int(modern.group('month'))
if not 1 <= month <= 12:
raise ValueError(f'invalid month in arXiv identifier: {value!r}')
base_id = f"{modern.group('year')}{modern.group('month')}.{modern.group('number')}"
return ArxivVersion(base_id=base_id, version=int(modern.group('version')))
legacy = _LEGACY_ID_RE.fullmatch(candidate)
if legacy:
return ArxivVersion(base_id=f"{legacy.group('archive')}/{legacy.group('number')}", version=int(legacy.group('version')))
if re.search('v\\d+$', candidate) is None:
raise ValueError(f'arXiv identifier must pin an explicit version (for example {candidate}v1)')
raise ValueError(f'invalid versioned arXiv identifier: {value!r}')
ARGS = {
"value": "2608.12345v1"
}
- 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 ArxivVersion — a ArxivVersion output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ArxivVersion 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
|
| remove_inner_boxed |
Ran ran on a synthesized input |
eth-sri/matharena/src/matharena/parser.py code served (permissive licence) · get_code("74e072aba194c7ff") 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 regex
def remove_inner_boxed(match: str):
"""Removes inner `\x08oxed` or `\x0cbox` commands from a string.
Args:
match (str): The string to process.
Returns:
str: The string with inner `\x08oxed` or `\x0cbox` commands removed.
"""
pattern = '(\\\\boxed|\\\\fbox)\\{((?:[^{}]|\\{(?2)\\})*)\\}'
matches = list(regex.finditer(pattern, match))
if not matches:
return match
for m in matches:
match = match.replace(m.group(0), m.group(2))
return match
# Setup test arguments
ARGS = {
"match": r"\boxed{x^2 + y^2} and \fbox{nested \boxed{content}}"
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- regex — 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
|
| resolve_model_config_path |
Ran ran on a synthesized input |
eth-sri/matharena/src/matharena/arxivbench_utils.py code served (permissive licence) · get_code("478cd2117377963f") 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 os
import tempfile
import shutil
# Create a temporary directory structure for testing
temp_dir = tempfile.mkdtemp()
configs_dir = os.path.join(temp_dir, 'configs', 'models')
os.makedirs(configs_dir, exist_ok=True)
# Create a test config file
test_config_path = os.path.join(configs_dir, 'test_model.yaml')
with open(test_config_path, 'w') as f:
f.write('model: test\n')
# Create an absolute path config file
abs_config_dir = tempfile.mkdtemp()
abs_config_path = os.path.join(abs_config_dir, 'absolute_model.yaml')
with open(abs_config_path, 'w') as f:
f.write('model: absolute\n')
# Change to temp_dir so relative paths work
original_cwd = os.getcwd()
os.chdir(temp_dir)
ARGS = {
'model_arg': 'test_model',
'config_root': 'configs/models'
}
- 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
|
| sha256_bytes |
Ran ran; our contract draft was wrong, not the code |
eth-sri/matharena/src/matharena/arxivmath_source.py code served (permissive licence) · get_code("f3f472b0143c5adf") 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 hashlib
def sha256_bytes(value: bytes) -> str:
return hashlib.sha256(value).hexdigest()
# Construct valid arguments
ARGS = {
"value": b"hello world"
}
- 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
|
| sha256_file |
Ran ran on a synthesized input |
eth-sri/matharena/src/matharena/arxivmath_source.py code served (permissive licence) · get_code("66fa4b8fdf3fcdfb") 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 hashlib
from pathlib import Path
import tempfile
import os
# Create a temporary file with some content to hash
with tempfile.NamedTemporaryFile(mode='wb', delete=False, suffix='.bin') as f:
temp_file_path = f.name
# Write some test data (larger than 1MB to test chunking, but keep it reasonable)
test_data = b'test content for hashing ' * 100000
f.write(test_data)
try:
ARGS = {
'path': temp_file_path
}
finally:
# Clean up the temporary file after defining ARGS
if os.path.exists(temp_file_path):
os.remove(temp_file_path)
# Redefine ARGS with a Path object that will be created fresh when needed
ARGS = {
'path': Path(tempfile.gettempdir()) / 'test_file.bin'
}
# Create the test file for real this time
test_file = ARGS['path']
test_file.write_bytes(b'test content for hashing ' * 100000)
- 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
|
| sha256_text |
Ran ran; our contract draft was wrong, not the code |
eth-sri/matharena/src/matharena/arxivmath_source.py code served (permissive licence) · get_code("ba2d92a5368b72bc") 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 hashlib
def sha256_bytes(value: bytes) -> str:
return hashlib.sha256(value).hexdigest()
def sha256_text(value: str) -> str:
return sha256_bytes(value.encode('utf-8'))
ARGS = {
"value": "hello world"
}
- 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
|
| create_query_client |
Not yet run unverified (harvested, no recorded run) |
eth-sri/matharena/src/matharena/query_client.py code served (permissive licence) · get_code("9cb53e3638337514") How it ran |
| download_arxiv_artifacts |
Not yet run unverified (harvested, no recorded run) |
eth-sri/matharena/src/matharena/arxiv_source.py code served (permissive licence) · get_code("43400d10bfb3e09d") How it ran |
| extract_source |
Not yet run unverified (harvested, no recorded run) |
eth-sri/matharena/src/matharena/arxiv_source.py code served (permissive licence) · get_code("b00cd74d90f045f6") How it ran |
| latex2sympy_fixed |
Not yet run unverified (harvested, no recorded run) |
eth-sri/matharena/src/matharena/parser.py code served (permissive licence) · get_code("81a738b6f6cd0dae") How it ran |