| build_embedding_search_params |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
ad-freiburg/grasp/src/grasp/search_params.py code served (permissive licence) · get_code("299cfce576a21b7d") 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 EmbeddingSearchParams. 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 numpy as np
from pydantic import BaseModel, ValidationError
from typing import Any, ClassVar, Literal
class SearchParamsBase(BaseModel):
non_search_fields: ClassVar[set[str]] = set()
def search_kwargs(self) -> dict[str, Any]:
return self.model_dump(exclude=self.non_search_fields, exclude_none=True)
class EmbeddingSearchParams(SearchParamsBase):
non_search_fields: ClassVar[set[str]] = {'type', 'build'}
type: Literal['embedding'] = 'embedding'
min_score: float | None = 0.0
rerank: float | None = 2.0
exact: bool | None = True
build: dict[str, Any] | None = None
class EmbeddingBuildParams(BaseModel):
type: Literal['embedding'] = 'embedding'
min_score_percentile: float | None = None
min_score_margin: float = 0.0
min_score_samples: int = 4096
seed: int = 22
# Create embeddings array with shape (10, 8) - 10 samples, 8 dimensions
embeddings = np.random.randn(10, 8).astype(np.float32)
# Create build params with min_score_percentile set
build_params = EmbeddingBuildParams(
type='embedding',
min_score_percentile=75.0,
min_score_margin=0.1,
min_score_samples=4,
seed=42
)
# Create search params override
search_params = EmbeddingSearchParams(
type='embedding',
min_score=0.5,
rerank=1.5,
exact=False
)
ARGS = {
'embeddings': embeddings,
'build': build_params,
'search': search_params
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, pydantic — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type EmbeddingSearchParams — a EmbeddingSearchParams output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a EmbeddingSearchParams 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
|
| camel_case_split |
Ran ran; our contract draft was wrong, not the code |
ad-freiburg/grasp/src/grasp/utils.py code served (permissive licence) · get_code("605e1730cf0fc60d") 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
# camel_case_split takes a single parameter: s (a string)
# The function iterates through the string, checks if each character is uppercase,
# and splits on transitions from lowercase to uppercase letters.
ARGS = {
"s": "camelCaseString"
}
- 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
|
| clean |
Ran ran; our contract draft was wrong, not the code |
ad-freiburg/wikidata-query-logs/prepare_input.py code served (permissive licence) · get_code("99dab9f051fdb14e") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import re
def clean(sparql: str) -> str:
"""Normalize whitespace in a SPARQL query."""
return re.sub('\\s+', ' ', sparql, flags=re.DOTALL).strip()
# Test with various SPARQL query strings
ARGS = {
"sparql": "SELECT ?x ?y\n WHERE {\n ?x rdf:type Person .\n ?y foaf:knows ?x\n }"
}
- 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
|
| compute_validity_stats |
Ran ran; our contract draft was wrong, not the code |
ad-freiburg/wikidata-query-logs/visualize_app.py code served (permissive licence) · get_code("4ef15effa0fe36b5") 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
torch.manual_seed(0)
# Construct valid arguments for compute_validity_stats
samples = [
{
'valid': True,
'validity_reason': 'passed_checks'
},
{
'valid': True,
'validity_reason': 'passed_checks'
},
{
'valid': False,
'validity_reason': 'format_error'
},
{
'valid': False,
'validity_reason': 'format_error'
},
{
'valid': False,
'validity_reason': 'constraint_violation'
},
{
'valid': False
# Missing 'validity_reason', will default to 'unknown'
}
]
ARGS = {
'samples': samples
}
- 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
|
| count_lines_in_file |
Ran ran, honoured the contract we drafted |
ad-freiburg/wikidata-query-logs/dataset_creation_statistics.py code served (permissive licence) · get_code("0818868e4cab4d2e") 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 tempfile
from pathlib import Path
# Create a temporary file with known content for testing
temp_dir = tempfile.TemporaryDirectory()
temp_path = Path(temp_dir.name) / "test_file.txt"
# Write some test content with multiple lines
test_content = b"line 1\nline 2\nline 3\nline 4\nline 5\n"
with temp_path.open('wb') as f:
f.write(test_content)
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 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
|
| count_raw_logs |
Ran ran, honoured the contract we drafted |
ad-freiburg/wikidata-query-logs/dataset_creation_statistics.py code served (permissive licence) · get_code("4cd091f4a35bf4fa") 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 tempfile
from pathlib import Path
# Create temporary TSV files with known numbers of lines
temp_dir = tempfile.TemporaryDirectory()
temp_path = Path(temp_dir.name)
# Create first test file with 5 lines
tsv_file_1 = temp_path / "test1.tsv"
tsv_file_1.write_bytes(b"col1\tcol2\n" * 5)
# Create second test file with 3 lines
tsv_file_2 = temp_path / "test2.tsv"
tsv_file_2.write_bytes(b"col1\tcol2\n" * 3)
# Create third test file with 7 lines
tsv_file_3 = temp_path / "test3.tsv"
tsv_file_3.write_bytes(b"col1\tcol2\n" * 7)
ARGS = {
'tsv_files': [tsv_file_1, tsv_file_2, tsv_file_3]
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type 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
|
| display_name_from_file |
Ran ran; our contract draft was wrong, not the code |
ad-freiburg/grasp/src/grasp/apps/shared.py code served (permissive licence) · get_code("5d0cde52ea9e2908") 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
from pathlib import Path
# Test case 1: filename with .jsonl extension and additional info
path1 = "model_v1.weights.jsonl"
ARGS = {
"path": path1
}
- 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
|
| estimate_embedding_min_score |
Ran ran; our contract draft was wrong, not the code |
ad-freiburg/grasp/src/grasp/search_params.py code served (permissive licence) · get_code("71826e9b6f5112d6") 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 float, 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 numpy as np
# Create a small embedding array with shape (10, 8)
# Each row is an embedding vector
embeddings = np.random.randn(10, 8).astype(np.float32)
ARGS = {
"embeddings": embeddings,
"num_samples": 4096,
"percentile": 75.0,
"margin": 0.0,
"seed": 22
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type float, 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
|
| extract_prefix_declarations |
Ran ran; our contract draft was wrong, not the code |
ad-freiburg/wikidata-query-logs/sparql_statistics.py code served (permissive licence) · get_code("5e0feca7e089bbe1") 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.
# Parse tree with PREFIX declarations
tree = {
'name': 'QueryUnit',
'children': [
{
'name': 'PrefixDecl',
'children': [
{
'name': 'PNAME_NS',
'value': 'custom:'
},
{
'name': 'IRIREF',
'value': '<http://example.org/custom/>'
}
]
},
{
'name': 'PrefixDecl',
'children': [
{
'name': 'PNAME_NS',
'value': 'ex:'
},
{
'name': 'IRIREF',
'value': '<http://example.org/>'
}
]
},
{
'name': 'SelectQuery',
'children': [
{
'name': 'WhereClause',
'children': []
}
]
}
]
}
ARGS = {
'tree': tree
}
- 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
|
| format_as_jsonl |
Ran ran; our contract draft was wrong, not the code |
ad-freiburg/wikidata-query-logs/export_kgqa_dataset.py code served (permissive licence) · get_code("861de91e9eab991a") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
from typing import Any
torch.manual_seed(0)
# Construct samples with the required structure
samples = [
{
'questions': ['What is the capital of France?', 'What is the capital city of France?', 'Name the capital of France.'],
'sparql': 'SELECT ?capital WHERE { France capital ?capital }',
'raw_sparql': 'SELECT ?capital WHERE { <http://dbpedia.org/resource/France> <http://dbpedia.org/ontology/capital> ?capital }'
},
{
'questions': ['Who is the president of the USA?'],
'sparql': 'SELECT ?president WHERE { USA president ?president }',
'raw_sparql': 'SELECT ?president WHERE { <http://dbpedia.org/resource/United_States> <http://dbpedia.org/ontology/president> ?president }'
},
{
'questions': [],
'sparql': 'SELECT * WHERE { ?s ?p ?o }',
'raw_sparql': 'SELECT * WHERE { ?s ?p ?o }'
}
]
split = 'train'
ARGS = {
'samples': samples,
'split': split
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| generate_id |
Ran ran; our contract draft was wrong, not the code |
ad-freiburg/grasp/src/grasp/server.py code served (permissive licence) · get_code("c1f6273fc43edf2d") 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 random
import string
ALPHABET = string.ascii_letters + string.digits
def generate_id(length: int=6) -> str:
return ''.join(random.sample(ALPHABET, length))
# Setup code
ARGS = {
"length": 6
}
- 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
|
| get_evaluation_file |
Ran ran; our contract draft was wrong, not the code |
ad-freiburg/grasp/src/grasp/evaluate.py code served (permissive licence) · get_code("4d2aafa46d7fb115") 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
def get_evaluation_file(prediction_file: str) -> str:
base = os.path.splitext(prediction_file)[0]
return f'{base}.evaluation.json'
ARGS = {
"prediction_file": "predictions.json"
}
- 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
|
| get_local_name_from_iri |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
ad-freiburg/grasp/src/grasp/utils.py code served (permissive licence) · get_code("d4b296a66b3ab0ae") 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
from unittest.mock import Mock
# Mock the grasp.sparql.utils module and find_longest_prefix function
class MockGraspUtils:
@staticmethod
def find_longest_prefix(iri, prefixes):
# Find the longest matching prefix
longest = None
longest_len = 0
for prefix, uri in prefixes.items():
if iri.startswith(uri) and len(uri) > longest_len:
longest = (prefix, uri)
longest_len = len(uri)
return longest
# Monkey-patch the import
import sys
from unittest.mock import MagicMock
grasp_module = MagicMock()
grasp_module.sparql.utils.find_longest_prefix = MockGraspUtils.find_longest_prefix
sys.modules['grasp'] = grasp_module
sys.modules['grasp.sparql'] = grasp_module.sparql
sys.modules['grasp.sparql.utils'] = grasp_module.sparql.utils
# Now construct arguments for get_local_name_from_iri
iri = "http://example.org/ontology#MyClass"
prefixes = {
"ex": "http://example.org/ontology#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
}
ARGS = {
"iri": iri,
"prefixes": prefixes
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- grasp, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_wikidata_prefix |
Ran ran; our contract draft was wrong, not the code |
ad-freiburg/wikidata-query-logs/sparql_statistics.py code served (permissive licence) · get_code("e39164956ac43808") 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.
# Setup code for get_wikidata_prefix function
ARGS = {
'iri': 'http://www.wikidata.org/prop/statement/value-normalized/test'
}
- 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
|
| load_jsonl |
Ran ran; our contract draft was wrong, not the code |
ad-freiburg/wikidata-query-logs/check_overlap.py code served (permissive licence) · get_code("3ad6b4253f5b5e42") 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
import os
# Create a temporary JSONL file with test data
temp_dir = tempfile.mkdtemp()
jsonl_path = os.path.join(temp_dir, "test.jsonl")
with open(jsonl_path, 'w') as f:
# Write valid JSON lines
f.write(json.dumps({'id': '1', 'text': 'hello'}) + '\n')
f.write(json.dumps({'id': '2', 'text': 'world'}) + '\n')
f.write(json.dumps({'name': 'test', 'value': 42}) + '\n') # No 'id', will get '_line' added
f.write('\n') # Empty line, will be skipped
f.write(json.dumps({'id': '3', 'data': [1, 2, 3]}) + '\n')
ARGS = {
'path': jsonl_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
|
| mtime |
Ran ran, honoured the contract we drafted |
ad-freiburg/grasp/src/grasp/apps/shared.py code served (permissive licence) · get_code("70b44990d9eeed68") 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 float, 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 os
import tempfile
# Create a temporary file to test mtime with
with tempfile.NamedTemporaryFile(delete=False, mode='w') as f:
temp_path = f.name
f.write("test content")
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 float, 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
|
| normalize_tree |
Ran ran; our contract draft was wrong, not the code |
ad-freiburg/wikidata-query-logs/sparql_statistics.py code served (permissive licence) · get_code("abcff2e9b1e82ff5") 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.
# Analyze the function signature and body to understand what arguments are needed
# normalize_tree takes:
# - tree: dict | list (a SPARQL parse tree structure)
# - normalize_properties: bool = False
# - var_map: dict[str, str] | None = None
# - entity_map: dict[str, str] | None = None
# - property_map: dict[str, str] | None = None
# - literal_map: dict[str, str] | None = None
# Create a sample SPARQL parse tree structure
sample_tree = {
'name': 'Query',
'children': [
{
'name': 'VAR1',
'value': '?x'
},
{
'name': 'PNAME_LN',
'value': 'wdt:P31'
},
{
'name': 'IRIREF',
'value': '<http://www.wikidata.org/entity/Q5>'
},
{
'name': 'Literal',
'value': '"test"'
}
]
}
# Build minimal maps for testing
var_map = {}
entity_map = {}
property_map = {}
literal_map = {}
ARGS = {
'tree': sample_tree,
'normalize_properties': False,
'var_map': var_map,
'entity_map': entity_map,
'property_map': property_map,
'literal_map': literal_map
}
- 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
|
| normalize_whitespace |
Ran ran; our contract draft was wrong, not the code |
ad-freiburg/wikidata-query-logs/check_overlap.py code served (permissive licence) · get_code("5e98056300a67fa9") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import re
def normalize_whitespace(sparql: str) -> str:
return re.sub('\\s+', ' ', sparql).strip()
ARGS = {
'sparql': ' SELECT ?x WHERE { ?x rdf:type ex:Thing } '
}
- 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_args |
Ran ran; our contract draft was wrong, not the code |
ad-freiburg/grasp/src/grasp/apps/expert.py code served (permissive licence) · get_code("a85ee2822986abc3") 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 Namespace. 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 argparse
import tempfile
import json
import os
# Create temporary files for the arguments
temp_dir = tempfile.gettempdir()
# Create input_file with sample JSONL data
input_file = os.path.join(temp_dir, "input.jsonl")
with open(input_file, 'w') as f:
f.write('{"id": "1", "question": "What is the capital of France?", "sparql": "SELECT ?x WHERE {?x rdf:type City}"}\n')
f.write('{"id": "2", "question": "What is the population?", "sparql": "SELECT ?pop WHERE {?x population ?pop}"}\n')
# Create prediction files with sample JSONL data
pred_file_1 = os.path.join(temp_dir, "predictions_1.jsonl")
with open(pred_file_1, 'w') as f:
f.write('{"id": "1", "prediction": "Paris"}\n')
f.write('{"id": "2", "prediction": "8000000"}\n')
pred_file_2 = os.path.join(temp_dir, "predictions_2.jsonl")
with open(pred_file_2, 'w') as f:
f.write('{"id": "1", "prediction": "Lyon"}\n')
f.write('{"id": "2", "prediction": "7000000"}\n')
# Create evaluation file
evaluation_file = os.path.join(temp_dir, "evaluation.json")
with open(evaluation_file, 'w') as f:
json.dump({"evaluated": []}, f)
# Create optional kg-config YAML file
kg_config_file = os.path.join(temp_dir, "kg_config.yaml")
with open(kg_config_file, 'w') as f:
f.write("endpoint: http://localhost:8890/sparql\n")
f.write("timeout: 30\n")
# Build the argv list for parse_args
argv = [
input_file,
pred_file_1,
pred_file_2,
'--evaluation', evaluation_file,
'--kg-config', kg_config_file
]
ARGS = {
'argv': argv
}
- 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 Namespace — a Namespace output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Namespace 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_formatted_sections |
Ran ran; our contract draft was wrong, not the code |
ad-freiburg/wikidata-query-logs/visualize_app.py code served (permissive licence) · get_code("7f7843225b5ec998") 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 re
def strip_code_fences(text: str) -> str:
"""Remove a surrounding markdown code fence from a text block."""
stripped = text.strip()
if stripped.startswith('```sparql'):
stripped = stripped.removeprefix('```sparql').lstrip('\n')
elif stripped.startswith('```'):
stripped = stripped.removeprefix('```').lstrip('\n')
if stripped.endswith('```'):
stripped = stripped.removesuffix('```').rstrip('\n')
return stripped.strip()
def parse_formatted_sections(formatted_text: str) -> dict[str, str]:
"""Parse formatted output into sections: questions, sparql, and rest."""
if not formatted_text:
return {'questions': '', 'sparql': '', 'rest': ''}
sections = {'questions': '', 'sparql': '', 'rest': ''}
questions_match = re.search('^(.*?)(?=SPARQL query)', formatted_text, re.DOTALL | re.MULTILINE)
if questions_match:
sections['questions'] = questions_match.group(1).strip()
sparql_match = re.search('SPARQL query[^\\n]*:\\n(.*?)(?=\\n\\nUsing entities:|\\n\\nUsing properties:|\\n\\nExecution result:|\\Z)', formatted_text, re.DOTALL)
if sparql_match:
sections['sparql'] = strip_code_fences(sparql_match.group(1))
rest_match = re.search('SPARQL query[^\\n]*:.*?\\n\\n((?:Using entities:|Using properties:|Execution result:).*)', formatted_text, re.DOTALL)
if rest_match:
sections['rest'] = rest_match.group(1).strip()
return sections
# Test input with all sections
formatted_text_full = """What is the capital of France?
SPARQL query:
sparql
SELECT ?capital WHERE {
?country rdfs:label "France" .
?country dbo:capital ?capital .
}
Using entities:
- France
Using properties:
- capital
Execution result:
- Paris"""
ARGS = {
'formatted_text': formatted_text_full
}
- 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
|
| parse_model_name |
Ran ran; our contract draft was wrong, not the code |
ad-freiburg/grasp/src/grasp/apps/shared.py code served (permissive licence) · get_code("4345f9f7c76ba530") 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 os
def parse_model_name(filename: str) -> tuple[str, str]:
basename = os.path.basename(filename)
if basename.endswith('.jsonl'):
basename = basename[:-6]
parts = basename.split('.', 1)
model_name = parts[0]
additional_info = parts[1] if len(parts) > 1 else ''
return (model_name, additional_info)
ARGS = {
'filename': '/path/to/model.weights.jsonl'
}
- 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, 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
|
| prepare_file |
Ran ran, honoured the contract we drafted |
ad-freiburg/wikidata-query-logs/prepare_input.py code served (permissive licence) · get_code("ede193119a639c47") 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 int; 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 re
import tempfile
from csv import DictReader
from pathlib import Path
from typing import TextIO
from urllib.parse import quote_plus
from io import StringIO
# Create temporary files for testing
temp_dir = tempfile.TemporaryDirectory()
temp_path = Path(temp_dir.name)
# Create a sample input file with TSV data
in_file = temp_path / "input.tsv"
with open(in_file, 'w') as f:
f.write("sparql\ttimestamp\tsource\tuser_agent\n")
f.write(f"{quote_plus('SELECT * WHERE { ?s ?p ?o }')}\t2023-01-01T00:00:00Z\twikidata\tMozilla/5.0\n")
f.write(f"{quote_plus('SELECT ?x WHERE { ?x a rdfs:Class }')}\t2023-01-01T00:00:01Z\tdbpedia\tChrome/1.0\n")
f.write(f"{quote_plus('SELECT * WHERE { ?s ?p ?o }')}\t2023-01-01T00:00:02Z\twikidata\tSafari/1.0\n")
# Create output files as StringIO objects
out_files = {
'wikidata': StringIO(),
'dbpedia': StringIO(),
}
# Create a set to track seen queries
seen = set()
ARGS = {
'in_file': in_file,
'out_files': out_files,
'seen': seen,
}
- 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, ndim 1, dtype family int — 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
|
| sample_from_clusters |
Ran ran; our contract draft was wrong, not the code |
ad-freiburg/wikidata-query-logs/export_kgqa_dataset.py code served (permissive licence) · get_code("ba63317cd5e597aa") 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 random
from collections import defaultdict
from typing import Any
# Construct metadata list with sample dictionaries
metadata = [
{
'valid': True,
'questions': ['What is the capital of France?'],
'sparql': 'SELECT ?x WHERE { ?x a Capital . }',
'sparql_fixed': 'SELECT ?x WHERE { ?x rdf:type dbo:Capital . }',
'origin': {'input': 'SELECT ?x WHERE { ?x a Capital . }'}
},
{
'valid': True,
'questions': ['Name all cities in Europe'],
'sparql': 'SELECT ?city WHERE { ?city a City . }',
'sparql_fixed': '',
'origin': {'input': 'SELECT ?city WHERE { ?city a City . }'}
},
{
'valid': True,
'questions': ['Who is the president?'],
'sparql': 'SELECT ?person WHERE { ?person a President . }',
'sparql_fixed': 'SELECT ?person WHERE { ?person rdf:type dbo:President . }',
'origin': {'input': 'SELECT ?person WHERE { ?person a President . }'}
},
{
'valid': True,
'questions': ['List all mountains'],
'sparql': 'SELECT ?mountain WHERE { ?mountain a Mountain . }',
'sparql_fixed': '',
'origin': {'input': 'SELECT ?mountain WHERE { ?mountain a Mountain . }'}
},
{
'valid': False,
'questions': ['Invalid query'],
'sparql': 'SELECT ? WHERE { }',
'sparql_fixed': '',
'origin': {'input': 'SELECT ? WHERE { }'}
},
]
# Construct cluster_labels list
# Map valid samples to clusters, invalid samples to -1
cluster_labels = [0, 0, 1, 1, -1]
ARGS = {
'metadata': metadata,
'cluster_labels': cluster_labels,
'samples_per_cluster': 1,
'seed': 22
}
- 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
|
| sample_id |
Ran ran; our contract draft was wrong, not the code |
ad-freiburg/wikidata-query-logs/check_overlap.py code served (permissive licence) · get_code("cf33c581f8ebad4f") 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
torch.manual_seed(0)
# The function sample_id takes a dict parameter 's' and calls:
# - s.get('id', ...) to retrieve an 'id' key with a fallback
# - s.get('_line', '?') to retrieve a '_line' key with a fallback
# We need to construct a dict that satisfies these operations
ARGS = {
's': {
'id': 'sample_001',
'_line': 42
}
}
- 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
|
| split_by_cluster |
Ran ran; our contract draft was wrong, not the code |
ad-freiburg/wikidata-query-logs/export_kgqa_dataset.py code served (permissive licence) · get_code("47a184c3b9314caa") 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 random
from typing import Any
# Create sample data with cluster_id field
samples = [
{'cluster_id': 0, 'data': 'sample_a', 'value': 1},
{'cluster_id': 0, 'data': 'sample_b', 'value': 2},
{'cluster_id': 1, 'data': 'sample_c', 'value': 3},
{'cluster_id': 1, 'data': 'sample_d', 'value': 4},
{'cluster_id': 2, 'data': 'sample_e', 'value': 5},
{'cluster_id': 2, 'data': 'sample_f', 'value': 6},
{'cluster_id': 3, 'data': 'sample_g', 'value': 7},
{'cluster_id': 3, 'data': 'sample_h', 'value': 8},
{'cluster_id': 4, 'data': 'sample_i', 'value': 9},
{'cluster_id': 4, 'data': 'sample_j', 'value': 10},
]
ARGS = {
'samples': samples,
'train_ratio': 0.7,
'val_ratio': 0.15,
'seed': 22
}
- 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
|
| split_iri |
Ran ran; our contract draft was wrong, not the code |
ad-freiburg/grasp/src/grasp/utils.py code served (permissive licence) · get_code("04a6678dc10e7aec") 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 torch
# Analyzing the function: split_iri takes a string parameter 'iri' and performs string operations
# It checks for '://', finds positions of '#' and '/', and returns a tuple of two strings
# No complex objects needed - just a string parameter
ARGS = {
'iri': 'https://example.com/path#fragment'
}
- 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 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
|
| strip_code_fences |
Ran ran; our contract draft was wrong, not the code |
ad-freiburg/wikidata-query-logs/visualize_app.py code served (permissive licence) · get_code("a289056569285182") 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 strip_code_fences takes a single string parameter
# It removes markdown code fences from text blocks
text_with_sparql_fence = """```sparql
SELECT * FROM table
WHERE id = 1
"""
text_with_generic_fence = """```python
def hello():
print("world")
"""
text_with_newlines = """
some code here
more code
"""
text_no_fence = "just plain text"
# ARGS maps every parameter to a value
ARGS = {
"text": text_with_sparql_fence
}
- 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
|
| validate_sample |
Ran ran; our contract draft was wrong, not the code |
ad-freiburg/wikidata-query-logs/utils.py code served (permissive licence) · get_code("71843c1f8c14be0e") 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.
# Setup code for validate_sample function
import torch
import numpy as np
# Define valid sample data that passes all checks
ARGS = {
'data': {
'type': 'output',
'error': None,
'output': {
'type': 'normal',
'questions': ['What is the capital of France?'],
'formatted': 'Paris is the capital of France.'
}
}
}
- 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 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
|
| search_params_cls |
Not yet run unverified (harvested, no recorded run) |
ad-freiburg/grasp/src/grasp/search_params.py code served (permissive licence) · get_code("c405220a4a2ea822") How it ran |