| HelpfulnessRecord |
Ran ran on a synthesized input · constructed an object; no result was computed |
Hcnaeg/utility-mrag/utility_mrag/selection/surrogate_selector.py code served (permissive licence) · get_code("31ff4fd34bfd2a59") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, HelpfulnessRecord: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
from typing import Any, Dict, List, Optional
torch.manual_seed(0)
ARGS = {
"image_id": "img_001",
"image_path": "/path/to/image.jpg",
"score": 0.85,
"true_logit": 2.5,
"false_logit": -1.3,
"p_true": 0.9,
"p_false": 0.1,
"metadata": {
"model_name": "vision_model_v1",
"timestamp": 1234567890,
"tags": ["helpful", "accurate"],
"confidence": 0.95
}
}
- 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 HelpfulnessRecord — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a HelpfulnessRecord 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
|
| TrueFalseLogitExtractor |
Ran ran on a synthesized input · constructed an object; no result was computed |
Hcnaeg/utility-mrag/utility_mrag/selection/surrogate_selector.py code served (permissive licence) · get_code("8225b1b281174de8") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, TrueFalseLogitExtractor: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn.functional as F
from unittest.mock import MagicMock
torch.manual_seed(0)
# Create a minimal tokenizer mock
class MockTokenizer:
def encode(self, text, add_special_tokens=False):
# Simple mock: return different token ids based on text
if text == 'True' or text == ' True':
return [1234]
elif text == 'False' or text == ' False':
return [5678]
elif text == ' True':
return [1234]
elif text == ' False':
return [5678]
else:
return [999]
tokenizer = MockTokenizer()
# Create sample logits: 1-D tensor of vocab_size
vocab_size = 10000
first_step_logits = torch.randn(vocab_size)
# Ensure our token indices have reasonable logits
first_step_logits[1234] = 2.5 # True token logit
first_step_logits[5678] = 0.5 # False token logit
ARGS = {
'tokenizer': tokenizer,
'positive_token': 'True',
'negative_token': 'False',
}
- 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 TrueFalseLogitExtractor — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a TrueFalseLogitExtractor 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
|
| _TokenSpec |
Ran ran on a synthesized input · constructed an object; no result was computed |
Hcnaeg/utility-mrag/utility_mrag/selection/surrogate_selector.py code served (permissive licence) · get_code("613792c0f9e3ef94") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, _TokenSpec: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
from dataclasses import dataclass
torch.manual_seed(0)
@dataclass(frozen=True)
class _TokenSpec:
"""Resolved token-id information for a single positive/negative choice."""
token_str: str
token_ids: tuple[int, ...]
is_single_token: bool
@property
def primary_id(self) -> int:
return self.token_ids[0]
ARGS = {
"token_str": "hello",
"token_ids": (42, 43, 44),
"is_single_token": True,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type _TokenSpec — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a _TokenSpec 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_token_ids |
Ran ran; our contract draft was wrong, not the code |
Hcnaeg/utility-mrag/utility_mrag/selection/surrogate_selector.py code served (permissive licence) · get_code("cb7676ee7b716d41") 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 _TokenSpec. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
from typing import Any, Dict, List, Sequence
torch.manual_seed(0)
class MockTokenizer:
"""Mock tokenizer that simulates encode behavior."""
def encode(self, text: str, add_special_tokens: bool = False) -> List[int]:
"""Simulate tokenizer encoding with different behaviors for different inputs."""
if text == "hello":
# Single token encoding
return [101]
elif text == " hello":
# Leading space version - also single token but different
return [2572]
elif text == "world":
# Multi-token encoding
return [1045, 2572, 1997]
elif text == " world":
# Leading space multi-token
return [1997, 2572, 1045]
elif text == "rare":
# Token that only encodes with leading space
return []
elif text == " rare":
# Encodes when space is added
return [3088]
else:
# Default single token
return [999]
ARGS = {
"tokenizer": MockTokenizer(),
"token_str": "hello",
}
- 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 _TokenSpec — a _TokenSpec output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a _TokenSpec 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
|
| _to_dict |
Ran ran; our contract draft was wrong, not the code |
Hcnaeg/utility-mrag/utility_mrag/selection/surrogate_selector.py code served (permissive licence) · get_code("afacca0ff36570a0") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
from dataclasses import dataclass
from typing import Any, Dict, Mapping
torch.manual_seed(0)
# Test case 1: Mapping (dict)
mapping_record = {"key1": "value1", "key2": 42, "key3": [1, 2, 3]}
# Test case 2: Dataclass
@dataclass
class SampleDataclass:
field1: str
field2: int
field3: list
dataclass_record = SampleDataclass(field1="test", field2=100, field3=[1, 2, 3])
# The function accepts a single parameter 'record' which can be either a Mapping or a dataclass
# We'll test with a Mapping first
ARGS = {
"record": mapping_record
}
- 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
|
| _to_id_list |
Ran ran; our contract draft was wrong, not the code |
Hcnaeg/utility-mrag/utility_mrag/selection/surrogate_selector.py code served (permissive licence) · get_code("9393cb82bcdae676") 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 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 torch
import numpy as np
torch.manual_seed(0)
# Test case 1: None value
test_none = None
# Test case 2: numpy array
test_numpy = np.array([1, 2, 3, 4])
# Test case 3: torch tensor
test_tensor = torch.tensor([5, 6, 7, 8])
# Test case 4: list
test_list = [9, 10, 11, 12]
# Test case 5: tuple (has no tolist but is iterable)
test_tuple = (13, 14, 15, 16)
# We'll test with the tensor case as the primary argument
ARGS = {
"value": test_tensor
}
- 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 int — 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
|
| extract_true_false_logits |
Ran ran; our contract draft was wrong, not the code |
Hcnaeg/utility-mrag/utility_mrag/selection/surrogate_selector.py code served (permissive licence) · get_code("7498fba67251113c") 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 torch.nn.functional as F
torch.manual_seed(0)
class MockTokenizer:
"""Minimal tokenizer stand-in that encodes strings to token IDs."""
def encode(self, text, add_special_tokens=False):
# Simple mock: map common strings to token sequences
# "True" -> [1234], "False" -> [5678], " True" -> [1234], " False" -> [5678]
text_stripped = text.lstrip()
if text_stripped == "True":
return [1234] # single token
elif text_stripped == "False":
return [5678] # single token
else:
return [999] # fallback single token
tokenizer = MockTokenizer()
# Create a 1-D logits tensor with vocab size 8000
# Ensure the True (1234) and False (5678) token IDs have distinct logit values
vocab_size = 8000
first_step_logits = torch.randn(vocab_size)
# Set specific logit values at the token positions we'll query
first_step_logits[1234] = 2.5 # True token gets high logit
first_step_logits[5678] = -1.0 # False token gets low logit
ARGS = {
'first_step_logits': first_step_logits,
'tokenizer': tokenizer,
'positive_token': 'True',
'negative_token': 'False',
}
- 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 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_choices |
Ran ran; our contract draft was wrong, not the code |
Hcnaeg/utility-mrag/utility_mrag/selection/surrogate_selector.py code served (permissive licence) · get_code("de1b067a8004f0e3") 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)
# Test case 1: choices is None
choices_none = None
# Test case 2: choices is a dict
choices_dict = {'A': 'First option', 'B': 'Second option', 'C': 'Third option'}
# Test case 3: choices is a list of strings
choices_list = ['First option', 'Second option', 'Third option', 'Fourth option']
# We'll test with the dict version as the primary argument
ARGS = {
'choices': choices_dict
}
- 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
|
| format_helpfulness_prompt |
Ran ran; our contract draft was wrong, not the code |
Hcnaeg/utility-mrag/utility_mrag/selection/surrogate_selector.py code served (permissive licence) · get_code("8c68e198bea7a172") 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
from typing import Optional
# Test case 1: mrag_bench dataset with dict choices
ARGS_1 = {
'dataset': 'mrag_bench',
'question': 'What color is the car in the image?',
'choices': {'A': 'red', 'B': 'blue', 'C': 'green', 'D': 'yellow'},
'template': 'helpfulness'
}
# Test case 2: mrag_bench dataset with list choices
ARGS_2 = {
'dataset': 'mrag_bench',
'question': 'Which animal is shown?',
'choices': ['dog', 'cat', 'bird', 'fish'],
'template': 'relevance'
}
# Test case 3: visual_rag dataset with None choices
ARGS_3 = {
'dataset': 'visual_rag',
'question': 'Does the organism have spots?',
'choices': None,
'template': 'helpfulness'
}
# Test case 4: visual_rag with relevance template
ARGS_4 = {
'dataset': 'visual_rag',
'question': 'What is the shape of the leaf?',
'choices': None,
'template': 'relevance'
}
# Test case 5: mrag_bench with no choices parameter specified (defaults to None)
ARGS_5 = {
'dataset': 'mrag_bench',
'question': 'Is this a landscape?',
'template': 'helpfulness'
}
ARGS = ARGS_1
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| select_top_k |
Ran ran; our contract draft was wrong, not the code |
Hcnaeg/utility-mrag/utility_mrag/selection/surrogate_selector.py code served (permissive licence) · get_code("7f9678feae9448fe") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
from dataclasses import dataclass
from typing import Any, Dict, List, Sequence
# Create test records as dicts
dict_records = [
{'name': 'record_1', 'score': 0.95},
{'name': 'record_2', 'score': 0.87},
{'name': 'record_3', 'score': 0.92},
{'name': 'record_4', 'score': 0.87},
]
# Create test records as dataclasses
@dataclass
class Record:
name: str
score: float
dataclass_records = [
Record(name='record_a', score=0.85),
Record(name='record_b', score=0.91),
Record(name='record_c', score=0.88),
]
# Test with mixed records
mixed_records = dict_records + dataclass_records
ARGS = {
'records': mixed_records,
'k': 3,
'score_key': 'score',
}
- 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
|
| sort_records_descending |
Ran ran; our contract draft was wrong, not the code |
Hcnaeg/utility-mrag/utility_mrag/selection/surrogate_selector.py code served (permissive licence) · get_code("ec7f414894e471c6") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
from dataclasses import dataclass
from typing import Any, Dict, List, Iterable
@dataclass
class Record:
"""Simple dataclass record with score and other fields."""
score: float
name: str
value: int
# Test case 1: List of dicts (Mapping)
dict_records = [
{'score': 10.5, 'name': 'first', 'value': 1},
{'score': 8.2, 'name': 'second', 'value': 2},
{'score': 10.5, 'name': 'third', 'value': 3},
]
# Test case 2: List of dataclass instances
dataclass_records = [
Record(score=7.3, name='alpha', value=10),
Record(score=9.1, name='beta', value=20),
Record(score=7.3, name='gamma', value=30),
]
# Test case 3: Mixed iterable (generator)
def record_generator() -> Iterable[Dict[str, Any]]:
yield {'score': 5.5, 'name': 'one'}
yield {'score': 12.0, 'name': 'two'}
yield {'score': 5.5, 'name': 'three'}
ARGS = {
'records': dict_records,
'score_key': 'score',
}
- 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
|
| HelpfulnessScorer |
Not yet run unverified (harvested, no recorded run) |
Hcnaeg/utility-mrag/utility_mrag/selection/surrogate_selector.py code served (permissive licence) · get_code("bf4d7c4e32aed522") How it ran |
| SurrogateSelector |
Not yet run unverified (harvested, no recorded run) |
Hcnaeg/utility-mrag/utility_mrag/selection/surrogate_selector.py code served (permissive licence) · get_code("58ebd6e8331d78fe") How it ran |