| _as_float |
Ran ran, honoured the contract we drafted |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("9ec3449021d8b83f") 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 torch
import numpy as np
def _as_float(value, default):
if value is None:
return float(default)
return float(value)
# Construct arguments for _as_float
# Parameters: value, default
ARGS = {
"value": None,
"default": 42
}
- 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 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
|
| _backward_scores |
Ran ran; our contract draft was wrong, not the code |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("c6ce5a149e878df0") 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 3, 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 torch.nn as nn
torch.manual_seed(0)
class MockHarness:
def __init__(self):
self.mask_id = 0
class MockTask:
def locked_positions(self, example, state, harness):
return [1]
class MockExample:
pass
# Create small tensors with distinct sizes
batch_size = 2
seq_len = 4
vocab_size = 8
task = MockTask()
harness = MockHarness()
examples = [MockExample(), MockExample()]
states = [[0, 1, 2, 3], [0, 0, 1, 2]]
logit_tensor = torch.randn(batch_size, seq_len, vocab_size)
config = {'backward_selection': 'low_conf'}
state_tensor = torch.tensor(states, dtype=torch.long)
editable = None
ARGS = {
'task': task,
'harness': harness,
'examples': examples,
'states': states,
'logit_tensor': logit_tensor,
'config': config,
'state_tensor': state_tensor,
'editable': editable
}
- 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 3, 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
|
| _block_size |
Ran ran, honoured the contract we drafted |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("b62a33fa3c2ae5c2") 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 torch
import torch.nn as nn
# Construct a config dict with a 'B' key
# The function calls config.get('B', 1) and converts to int
# Testing with a valid block size value
config = {
'B': 8
}
ARGS = {
'config': config
}
- 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 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
|
| _candidate_context |
Ran ran; our contract draft was wrong, not the code |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("0d166c77488570f5") 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 3, 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
torch.manual_seed(0)
# Stand-in Task class with locked_positions method
class Task:
def locked_positions(self, example, state, harness):
# Return a set of locked position indices
# For this example, lock positions 0 and 2 for certain examples
return {0, 2}
# Stand-in Harness class (minimalist)
class Harness:
pass
# Construct the arguments
task = Task()
harness = Harness()
# examples: list of example objects (can be simple dicts or objects)
examples = [
{'id': 0},
{'id': 1}
]
# states: list of state sequences (2D array-like, batch_size x sequence_length)
states = [
[1, 2, 3, 4],
[5, 6, 7, 8]
]
device = 'cpu'
ARGS = {
'task': task,
'harness': harness,
'examples': examples,
'states': states,
'device': device
}
- 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 3, 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
|
| _chunks |
Ran ran; our contract draft was wrong, not the code |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("d0da3d92a9e7492e") 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 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
torch.manual_seed(0)
# The function _chunks takes a list/sequence of items and chunks it into
# blocks of a given size, only keeping full blocks.
# It uses: len(items), items[start:start + size], len(block), and append()
# Simple test case: list of integers
items = [1, 2, 3, 4, 5, 6, 7]
size = 3
ARGS = {
"items": items,
"size": size
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 2, 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
|
| _cleanup_log_weight_groups |
Ran ran; our contract draft was wrong, not the code |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("b17f5484220b3d9a") 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. 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)
# The function iterates through groups (a list/iterable of groups)
# Each group is iterable and contains items
# Each item is a dict-like object with a pop method
# The function pops '_log_weight' key from each item
# Create a realistic structure: list of groups, where each group is a list of dicts
groups = [
[
{'weight': torch.randn(2, 4), '_log_weight': 0.5, 'bias': torch.randn(4)},
{'weight': torch.randn(3, 4), '_log_weight': 1.2, 'other': 'data'}
],
[
{'_log_weight': -0.3, 'param': torch.randn(2, 3)},
{'data': [1, 2, 3]} # This one doesn't have '_log_weight'
],
[
{'weight': torch.randn(4, 2), '_log_weight': 2.1}
]
]
ARGS = {
'groups': groups
}
- 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 — a list 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
|
| _comb |
Ran ran, honoured the contract we drafted |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("128f6ea93ce540c6") 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 math
def _comb(n, r):
if r < 0 or r > n:
return 0
return math.comb(n, r)
ARGS = {
"n": 5,
"r": 2
}
- 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
|
| _edge_stats |
Ran ran on a synthesized input |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("a3cc472a713a50fa") 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
torch.manual_seed(0)
ARGS = {}
- 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
|
| _editable_mask |
Ran ran, violated the contract we drafted |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("db81a416391f0c32") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
torch.manual_seed(0)
# Create a minimal task class with locked_positions method
class MinimalTask:
def locked_positions(self, example, state, harness):
# Return some locked positions (e.g., position 1 and 2)
return [1, 2]
# Create a minimal harness class (not used in _editable_mask but passed through)
class MinimalHarness:
pass
# Create minimal example and state objects
class MinimalExample:
pass
class MinimalState:
pass
# Set up the arguments
task = MinimalTask()
harness = MinimalHarness()
examples = [MinimalExample(), MinimalExample()]
states = [MinimalState(), MinimalState()]
# state_tensor: shape (batch_size=2, seq_len=4)
state_tensor = torch.ones((2, 4), dtype=torch.float32)
ARGS = {
'task': task,
'harness': harness,
'examples': examples,
'states': states,
'state_tensor': state_tensor,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| _finite_top_positions |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("deb2ef70d51e5b6d") 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 math
torch.manual_seed(0)
# Create a small scores tensor with finite and infinite values
scores = torch.tensor([1.5, float('inf'), 3.2, 2.1, float('-inf'), 0.5], dtype=torch.float32)
# Set limit to a positive integer
limit = 4
ARGS = {
"scores": scores,
"limit": limit,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family 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
|
| _gamma |
Ran ran, honoured the contract we drafted |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("8eaac50364b9b094") 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 torch
import numpy as np
def _as_float(value, default):
if value is None:
return float(default)
return float(value)
def _gamma(config):
return _as_float(config.get('gamma'), 1.0)
ARGS = {
'config': {'gamma': 0.99}
}
- 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 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
|
| _geometric_lambda |
Ran ran, honoured the contract we drafted |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("b3ead7e55564f8d3") 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 torch
import torch.nn as nn
torch.manual_seed(0)
# The function _geometric_lambda takes a config parameter
# and calls config.get('lambda', 0.0) on it, then converts to float
# So config needs to be a dict-like object with a get method
config = {
'lambda': 0.5
}
ARGS = {
'config': config
}
- 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 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
|
| _handle_edge_walk_leaves |
Ran ran; our contract draft was wrong, not the code |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("358693a4f27d3467") 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 torch.nn as nn
torch.manual_seed(0)
# Stand-in Task class
class StandInTask:
EXACT_LEAF_VALUE = True
def reward(self, example, text):
return 1.0
def terminal_accept(self, example, text):
return True
def locked_positions(self, example, state, harness):
return set()
# Stand-in Tokenizer
class StandInTokenizer:
eos_token_id = 50256
# Stand-in Harness
class StandInHarness:
def __init__(self):
self.mask_id = 0
self.eos_id = 50256
self.tokenizer = StandInTokenizer()
def decode_state(self, state):
return "decoded text from state"
# Create instances
task = StandInTask()
harness = StandInHarness()
# Create examples (batch size 2)
examples = ["example 1", "example 2"]
# Create states (batch size 2, sequence length 4)
# Use mask_id=0 for masked positions, other tokens for revealed
states = [
[1, 2, 3, 4],
[1, 0, 3, 4]
]
# Finished flags (batch size 2)
finished = [False, False]
# Stats per example
stats = [
{'forward': 0, 'backward': 0, 'leaf_backtrack': 0, 'nfe': 0, 'leaf_reached': False, 'full_leaf_reached': False, 'accepted': False},
{'forward': 0, 'backward': 0, 'leaf_backtrack': 0, 'nfe': 0, 'leaf_reached': False, 'full_leaf_reached': False, 'accepted': False}
]
# Active indices (which examples to process)
active = [0, 1]
# Config
config = {
'B': 1,
'stop_on_eos': True,
'terminal_value': 'exact',
'terminal_accept_without_exact': True
}
# Max steps
max_steps = 10
ARGS = {
'task': task,
'harness': harness,
'examples': examples,
'states': states,
'finished': finished,
'stats': stats,
'active': active,
'config': config,
'max_steps': max_steps
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family 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
|
| _k_tokens |
Ran ran, honoured the contract we drafted |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("ede3ba5f2becfaa6") 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 torch
import numpy as np
torch.manual_seed(0)
ARGS = {
'config': {'K': 8}
}
- 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 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
|
| _log_mdm_coeff |
Ran ran, honoured the contract we drafted |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("784ecf9cea27250b") 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 math
def _log_mdm_coeff(k, n, r):
if r <= 0 or k < 0 or k > n - r:
return -float('inf')
return -(math.lgamma(n - r + 1) - math.lgamma(k + 1) - math.lgamma(n - r - k + 1))
# Set up valid arguments for the function
# The function computes a log coefficient based on three integers: k, n, r
# Valid case: r > 0, k >= 0, k <= n - r
k = 3
n = 10
r = 5
ARGS = {
'k': k,
'n': n,
'r': r
}
- 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
|
| _move_count |
Ran ran, honoured the contract we drafted |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("f8a3566fe8540fdf") 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 torch
import numpy as np
torch.manual_seed(0)
# Analyzing the function:
# _move_count(stats) expects a dict-like object 'stats'
# It calls stats.get(key, 0) for keys: 'forward', 'backward', 'leaf_backtrack'
# It converts values to int and sums them
# The values can be None (handled by "or 0")
stats = {
'forward': 5,
'backward': 3,
'leaf_backtrack': 2
}
ARGS = {
'stats': stats
}
- 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 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
|
| _position_blocks |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("4fc7519f6708b0f4") 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 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 math
torch.manual_seed(0)
# Create a scores tensor with finite and some infinite values
scores = torch.tensor([1.5, 2.3, float('inf'), 0.8, -1.2, 3.1, float('-inf'), 0.5], dtype=torch.float32)
# available: number of positions available
available = 6
# limit: maximum number of positions to select
limit = 4
# r: chunk size for creating blocks
r = 2
ARGS = {
"scores": scores,
"available": available,
"limit": limit,
"r": r,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 2, 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
|
| _relative_coeff |
Ran ran, honoured the contract we drafted |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("f01501c75e209261") 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 math
torch_seed = 0
# Analyze the function _relative_coeff:
# It takes parameters: k, n, r, ref
# - k: used in _log_mdm_coeff(k, n, r) - appears to be an integer
# - n: used in _log_mdm_coeff(k, n, r) - appears to be an integer
# - r: used in _log_mdm_coeff(k, n, r) - appears to be an integer/float
# - ref: compared with math.isfinite() and used in math.exp(log_coeff - ref)
# so it should be a float
# The function performs mathematical operations on these values
# We need valid inputs that produce finite results
# Let's construct arguments that satisfy the condition in _log_mdm_coeff:
# r > 0 and k >= 0 and k <= n - r
k = 2
n = 5
r = 1.5
ref = 1.0
ARGS = {
"k": k,
"n": n,
"r": r,
"ref": ref
}
- 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
|
| _rescale_log_weight_groups |
Ran ran; our contract draft was wrong, not the code |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("9a2e428b8779b641") 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 math
# Create sample groups with _log_weight items
# Each group contains lists of forward and backward items
# Each item is a dict with '_log_weight' key
fwd_groups = [
[
{'_log_weight': 0.5, 'id': 'f1_1'},
{'_log_weight': 1.2, 'id': 'f1_2'},
],
[
{'_log_weight': -0.3, 'id': 'f2_1'},
{'_log_weight': 2.1, 'id': 'f2_2'},
],
]
bwd_groups = [
[
{'_log_weight': 0.8, 'id': 'b1_1'},
{'_log_weight': 0.2, 'id': 'b1_2'},
],
[
{'_log_weight': 1.5, 'id': 'b2_1'},
{'_log_weight': 0.9, 'id': 'b2_2'},
],
]
ARGS = {
'fwd_groups': fwd_groups,
'bwd_groups': bwd_groups,
}
- 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
|
| _sample_block_assignments |
Ran ran on a synthesized input |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("cb53b0d4bcc28d63") 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
import itertools
torch.manual_seed(0)
# row_logits: a tensor of shape (sequence_length, vocab_size)
# The function indexes into it with positions from block, so we need enough positions
# and a reasonable vocab_size
row_logits = torch.randn(8, 5) # 8 positions, vocab_size of 5
# block: a list/tuple of positions to sample from
block = [0, 2, 4]
# K: number of samples (can be int or 'all')
K = 10
# temperature: controls sampling randomness (positive float)
temperature = 1.0
ARGS = {
"row_logits": row_logits,
"block": block,
"K": K,
"temperature": temperature,
}
- 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
|
| _sample_block_assignments_logq |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("2b3c40f6d37cda84") 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. 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 math
torch.manual_seed(0)
# Create row_logits: a tensor of shape (sequence_length, vocab_size)
# The function indexes into this with positions from the block parameter
row_logits = torch.randn(5, 8) # 5 positions, 8 vocab items
# Create block: a list of positions to sample from
block = [0, 2, 4]
# Create num_candidates: controls number of samples K
num_candidates = 10
# Create temperature: controls sampling randomness
temperature = 1.0
ARGS = {
'row_logits': row_logits,
'block': block,
'num_candidates': num_candidates,
'temperature': temperature
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list — a list 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
|
| _sample_forward_choices |
Ran ran; our contract draft was wrong, not the code |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("f7ffdffdad255b61") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
torch.manual_seed(0)
# The function _sample_forward_choices takes 'groups' as parameter
# Looking at the body:
# - groups is iterated over
# - each group is iterated over
# - each item in group is a dict with 'weight' and potentially other keys
# - groups[idx] is accessed to check if it's truthy
# So groups should be a list of lists of dicts
# Create sample groups with items that have 'weight' key
groups = [
[
{'weight': 0.5, 'id': 1},
{'weight': 0.3, 'id': 2},
{'weight': 0.2, 'id': 3},
],
[
{'weight': 0.7, 'id': 4},
{'weight': 0.3, 'id': 5},
],
[
# Empty group to test the fallback logic
],
[
{'weight': 1.0, 'id': 6},
],
]
ARGS = {
'groups': groups,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| _state_log_ref |
Ran ran, honoured the contract we drafted |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("3268803c80b0b210") 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 math
def _log_mdm_coeff(k, n, r):
if r <= 0 or k < 0 or k > n - r:
return -float('inf')
return -(math.lgamma(n - r + 1) - math.lgamma(k + 1) - math.lgamma(n - r - k + 1))
def _state_log_ref(k, n, r):
logs = []
if k + r <= n:
logs.append(_log_mdm_coeff(k, n, r))
if k - r >= 0:
logs.append(_log_mdm_coeff(k - r, n, r))
return max(logs) if logs else 0.0
ARGS = {
"k": 3,
"n": 10,
"r": 2
}
- 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
|
| _top_confidence_positions |
Ran ran; our contract draft was wrong, not the code |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("4d5a0ee4c7f5cf71") 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
torch.manual_seed(0)
# Create a logit tensor with shape (5, 4) - 5 positions, 4 logit values each
logit_tensor = torch.randn(5, 4)
# Create a list of positions to score
positions = [0, 2, 4, 1]
# Set a limit for how many top positions to return
limit = 2
ARGS = {
"logit_tensor": logit_tensor,
"positions": positions,
"limit": limit,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family 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
|
| _top_margin_positions |
Ran ran; our contract draft was wrong, not the code |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("bac78b4e4bb0cb73") 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
torch.manual_seed(0)
# Create a small logit tensor with shape (3, 15)
# - 3 positions to sample from
# - 15 logit values per position (enough to test row[1:10] slicing)
logit_tensor = torch.randn(3, 15)
# Define positions to evaluate
positions = [0, 1, 2]
# Define limit for top results
limit = 2
ARGS = {
"logit_tensor": logit_tensor,
"positions": positions,
"limit": limit,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family 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
|
| _top_tokens |
Ran ran; our contract draft was wrong, not the code |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("0807a83c2421643c") 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 torch
torch.manual_seed(0)
# Create a small logits tensor
# Shape: (batch_size=2, vocab_size=4)
logits_tensor = torch.randn(2, 4)
# Test with different parameter combinations
ARGS = {
'logits': logits_tensor[0], # Single logits vector of shape (4,)
'k': 2, # Top 2 tokens
'temperature': 1.0 # Standard temperature
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 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
|
| _value_lambda |
Ran ran, honoured the contract we drafted |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("2a970770236fbc4a") 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 torch
import numpy as np
torch.manual_seed(0)
# _value_lambda expects a config parameter
# The function calls config.get('lambda') with a default of 0.0
# So config needs to be a dict-like object with a get method
ARGS = {
'config': {
'lambda': 0.5
}
}
- 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 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
|
| active_batch |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("cd0b167f22768eb9") 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 torch
import numpy as np
torch.manual_seed(0)
# Construct examples - list of simple data items
examples = [
{"id": 0, "text": "example_0"},
{"id": 1, "text": "example_1"},
{"id": 2, "text": "example_2"},
{"id": 3, "text": "example_3"},
]
# Construct prompts - list of strings
prompts = [
"prompt_0",
"prompt_1",
"prompt_2",
"prompt_3",
]
# Construct states - list of tensors or state dicts
states = [
torch.randn(4, 3),
torch.randn(4, 3),
torch.randn(4, 3),
torch.randn(4, 3),
]
# Construct indices - list of valid indices to select from the lists
indices = [0, 2, 3]
ARGS = {
"examples": examples,
"prompts": prompts,
"states": states,
"indices": indices,
}
- 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 — 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
|
| budgeted_max_steps |
Ran ran, honoured the contract we drafted |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("3290f945b03b4ce1") 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 torch.nn as nn
torch.manual_seed(0)
# Build a minimal task with locked_positions method
class MinimalTask(nn.Module):
def __init__(self):
super().__init__()
def locked_positions(self, example, state, harness):
# Return a small set of locked positions
return {0, 1}
task = MinimalTask()
# Build a minimal example (can be any object, function just passes it around)
example = {"text": "hello world"}
# Build states as lists (function checks len(state) and iterates with range)
states = [
[1, 2, 3, 4, 5],
[10, 20, 30]
]
# Build a minimal harness (not actually used in the function body)
class MinimalHarness:
pass
harness = MinimalHarness()
# Build config dict with various keys that the function checks
config = {
'max_steps': None,
'max_steps_multiplier': 8,
'budget_unit': 'length'
}
# Create examples list matching states
examples = [
{"text": "example1"},
{"text": "example2"}
]
ARGS = {
'config': config,
'task': task,
'examples': examples,
'states': states,
'harness': harness
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family 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
|
| choose_positions |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("1c6b3005c203f8e3") 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 random
torch.manual_seed(0)
# Create a small logit tensor: shape [2, 4] means 2 positions, 4 logit values each
logit_tensor = torch.randn(2, 4)
# Create a list of valid positions (indices into the logit tensor)
positions = [0, 1]
# Set a limit for how many positions to select
limit = 1
# Set a mode for selection strategy
mode = 'high_conf'
ARGS = {
'logit_tensor': logit_tensor,
'positions': positions,
'limit': limit,
'mode': mode
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family 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
|
| clamp_state_value |
Ran ran, honoured the contract we drafted |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("73542a948ddb98c8") 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 torch
class Task:
"""Stand-in task class with optional HARD_ZERO_STATE_VALUE attribute"""
def __init__(self, hard_zero_state_value=False):
self.HARD_ZERO_STATE_VALUE = hard_zero_state_value
# Test case 1: Basic task without HARD_ZERO_STATE_VALUE, with a positive value
task_basic = Task(hard_zero_state_value=False)
# Test case 2: Task with HARD_ZERO_STATE_VALUE enabled, testing zero clamping
task_hard_zero = Task(hard_zero_state_value=True)
ARGS = {
"task": task_basic,
"value": 0.5
}
- 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 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
|
| clamp_value |
Ran ran, honoured the contract we drafted |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("ad9cfa7349767083") 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 torch
import numpy as np
torch.manual_seed(0)
# Analyzing the function:
# - It takes a single parameter `value`
# - It checks if value is None
# - It converts value to float and compares with 1e-08
# - Returns either 1.0 or max(float(value), 1e-08)
# Test with a numeric value
ARGS = {
"value": 0.5
}
- 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 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
|
| decoded_terminal_value |
Ran ran; our contract draft was wrong, not the code |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("1a507ffaafe18583") 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 torch
import torch.nn as nn
torch.manual_seed(0)
# Create a minimal task class
class MinimalTask:
def __init__(self, use_terminal_accept=True):
self.use_terminal_accept = use_terminal_accept
def terminal_accept(self, example, text):
# Called when hasattr(task, 'terminal_accept') is True
return "correct" in text.lower()
def reward(self, example, text):
# Fallback reward function
return 0.5
# Create a minimal harness class
class MinimalHarness:
def decode_state(self, state):
# Returns decoded text from state
return "The answer is correct"
# Create a minimal example
example = {"question": "What is 2+2?", "expected": "4"}
# Create state (can be any object that decode_state accepts)
state = torch.tensor([1, 2, 3, 4])
# Create instances
task = MinimalTask(use_terminal_accept=True)
harness = MinimalHarness()
ARGS = {
"task": task,
"harness": harness,
"example": example,
"state": state
}
- 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 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
|
| directed_choices |
Ran ran; our contract draft was wrong, not the code |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("8f0890721e28bcd9") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
torch.manual_seed(0)
# Construct arguments for directed_choices function
direction = 'down'
state = {'position': 0, 'value': 1.5}
fwd = [
{'kind': 'forward_1', 'weight': 0.5},
{'kind': 'forward_2', 'weight': 0.3}
]
f_mass = 2.0
bwd = [
{'kind': 'backward_1', 'weight': 0.4},
{'kind': 'backward_2', 'weight': 0.2}
]
b_mass = 1.5
chi = 0.7
ARGS = {
'direction': direction,
'state': state,
'fwd': fwd,
'f_mass': f_mass,
'bwd': bwd,
'b_mass': b_mass,
'chi': chi
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| eos_token_ids |
Ran ran; our contract draft was wrong, not the code |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("06ed5b21f8e58213") 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 set. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
class MockTokenizer:
def __init__(self, eos_token_id=None):
self.eos_token_id = eos_token_id
class MockHarness:
def __init__(self, eos_id=None, tokenizer=None, mask_id=None):
self.eos_id = eos_id
self.tokenizer = tokenizer
self.mask_id = mask_id
# Create test harness with various attributes
harness = MockHarness(
eos_id=2,
tokenizer=MockTokenizer(eos_token_id=3),
mask_id=None
)
ARGS = {
'harness': harness
}
- 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 set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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
|
| force_complete |
Ran ran; our contract draft was wrong, not the code |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("2df5313cdbfe9bdb") 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 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 random
torch.manual_seed(0)
# Build a minimal harness object with required attributes/methods
class MinimalHarness:
def __init__(self):
self.mask_id = 0
self.eos_id = 2
self.tokenizer = None
def logits_batch(self, prompts, states):
# Return logits tensor: shape (batch_size, seq_len, vocab_size)
batch_size = len(states)
seq_len = max(len(state) for state in states) if states else 1
vocab_size = 5
return torch.randn(batch_size, seq_len, vocab_size)
def logits(self, prompt, state):
# Single state logits
seq_len = len(state) if state else 1
vocab_size = 5
return torch.randn(seq_len, vocab_size)
harness = MinimalHarness()
# Build states - lists containing token IDs, with some mask_id (0) tokens to fill
state1 = [0, 1, 0, 3] # mask at positions 0, 2
state2 = [0, 0, 1, 0] # mask at positions 0, 1, 3
states = [state1, state2]
# Build configs - list of dicts with configuration per state
config1 = {
'prompt': 'test prompt 1',
'stop_on_eos': True,
'forward_selection': 'high_conf',
'temperature': 1.0
}
config2 = {
'prompt': 'test prompt 2',
'stop_on_eos': False,
'forward_selection': 'random',
'temperature': 0.8
}
configs = [config1, config2]
ARGS = {
'harness': harness,
'states': states,
'configs': configs,
'return_counts': False,
'return_trace': 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 list, ndim 2, 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
|
| force_complete_value |
Ran ran; our contract draft was wrong, not the code |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("28fedfad53a52581") 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 torch
import torch.nn as nn
torch.manual_seed(0)
# Stand-in harness with required attributes and methods
class StandInHarness:
def __init__(self):
self.eos_id = 2
self.mask_id = 0
self.tokenizer = StandInTokenizer()
def logits(self, prompt, state):
# Returns logits tensor of shape (vocab_size,)
return torch.randn(10)
def logits_batch(self, prompts, states):
# Returns logits tensor of shape (batch_size, vocab_size)
return torch.randn(len(prompts), 10)
class StandInTokenizer:
def __init__(self):
self.eos_token_id = 2
# Stand-in verifier (not used in force_complete_value but passed as argument)
class StandInVerifier:
pass
# Stand-in forward_candidates function
def forward_candidates_fn(task, harness, verifier, examples, states, logit_tensor, config):
# Returns (fwd_groups, _)
# fwd_groups is a list of groups, each group is a list of dicts with 'weight' and 'state'
batch_size = len(states)
fwd_groups = []
for _ in range(batch_size):
group = [
{'weight': 0.7, 'state': [1, 2, 3]},
{'weight': 0.3, 'state': [1, 3, 4]}
]
fwd_groups.append(group)
return (fwd_groups, None)
# Set up arguments
harness = StandInHarness()
verifier = StandInVerifier()
task = "test_task"
examples = [
{"text": "example1"},
{"text": "example2"}
]
states = [
[0, 1, 2, 3], # state with mask token (0) that needs filling
[0, 1, 3, 4] # state with mask token (0) that needs filling
]
prompts = [
"prompt1",
"prompt2"
]
config = {
'stop_on_eos': True
}
forward_candidates = forward_candidates_fn
ARGS = {
'task': task,
'harness': harness,
'verifier': verifier,
'examples': examples,
'states': states,
'prompts': prompts,
'config': config,
'forward_candidates': forward_candidates
}
- 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 — 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
|
| initial_state |
Ran ran, honoured the contract we drafted |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("cd8ee7dd8b3b6643") 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 torch.nn as nn
torch.manual_seed(0)
# Create a task with an initial_state method
class Task:
def initial_state(self, example, harness):
return [harness.mask_id, harness.mask_id, harness.mask_id]
# Create a harness with mask_id attribute
class Harness:
def __init__(self):
self.mask_id = 999
# Create minimal example object
class Example:
pass
task = Task()
example = Example()
harness = Harness()
length = 5
ARGS = {
"task": task,
"example": example,
"harness": harness,
"length": length
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family 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
|
| is_eos_choice |
Ran ran, violated the contract we drafted |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("0067a4544b799b69") 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 torch
import numpy as np
# Build a minimal harness object with the attributes the function uses
class MinimalHarness:
def __init__(self, eos_id=None, tokenizer=None, mask_id=None):
self.eos_id = eos_id
self.tokenizer = tokenizer
self.mask_id = mask_id
# Build a minimal tokenizer with eos_token_id
class MinimalTokenizer:
def __init__(self, eos_token_id=None):
self.eos_token_id = eos_token_id
# Create test instances
torch.manual_seed(0)
# Harness with eos_id and tokenizer
tokenizer = MinimalTokenizer(eos_token_id=2)
harness = MinimalHarness(eos_id=1, tokenizer=tokenizer, mask_id=None)
# Config dict with stop_on_eos flag
config = {'stop_on_eos': True}
# Choice dict with a token
choice = {'token': 2}
ARGS = {
'harness': harness,
'config': config,
'choice': choice
}
- 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 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
|
| is_leaf |
Ran ran; our contract draft was wrong, not the code |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("f94688ec8e960f65") 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 torch
import numpy as np
torch.manual_seed(0)
# The function is_leaf checks if all tokens in state are not equal to mask_id
# state is iterable (used in a for loop with int() conversion)
# mask_id is converted to int for comparison
# state can be a list, tuple, tensor, or any iterable of token values
state = [1, 2, 3, 4] # List of tokens (distinct from mask_id)
# mask_id is a single value that gets converted to int
mask_id = 0
ARGS = {
"state": state,
"mask_id": mask_id
}
- 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 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
|
| is_leaf_accept |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("771d87651d68e46d") 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 torch
import torch.nn as nn
torch.manual_seed(0)
# Create a minimal task class
class MinimalTask:
EXACT_LEAF_VALUE = True
def terminal_accept(self, example, text):
return "success" in text.lower()
def reward(self, example, text):
if "success" in text.lower():
return 1.0
return 0.0
def reward_state(self, example, state, harness):
text = harness.decode_state(state)
return self.reward(example, text)
# Create a minimal tokenizer
class MinimalTokenizer:
eos_token_id = 2
# Create a minimal harness
class MinimalHarness:
def __init__(self):
self.eos_id = 2
self.tokenizer = MinimalTokenizer()
self.mask_id = None
def decode_state(self, state):
# Convert state tokens to simple text
token_to_char = {0: 'h', 1: 'i', 2: ' ', 3: 's'}
return ''.join(token_to_char.get(int(t), '?') for t in state)
# Create task, harness, and example
task = MinimalTask()
harness = MinimalHarness()
example = {"text": "test example"}
# Create state as a list/tensor of token ids
state = [0, 1, 3] # will decode to "his"
# Create config
config = {
'stop_on_eos': True,
'terminal_value': 'exact',
'terminal_accept_without_exact': True
}
ARGS = {
'task': task,
'harness': harness,
'example': example,
'state': state,
'config': config
}
- 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 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
|
| leaf_backtrack |
Ran ran; our contract draft was wrong, not the code |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("641f3f190db7c283") 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 torch
torch.manual_seed(0)
# Minimal task class with locked_positions method
class MinimalTask:
def locked_positions(self, example, state, harness):
# Return a set of locked position indices
return {0} # Lock position 0
# Minimal harness class (can be empty or minimal)
class MinimalHarness:
pass
# Config dict
config = {
'B': 2 # block_size parameter
}
# Example input (can be any object, not used in the function body)
example = None
# State - a list/tensor of token IDs where some are masks and some are revealed
# Using mask_id = 0, so we have a mix of 0s (masked) and non-zero values (revealed)
mask_id = 0
state = torch.tensor([0, 5, 0, 7, 3, 0], dtype=torch.long)
# Task instance
task = MinimalTask()
# Harness instance
harness = MinimalHarness()
ARGS = {
'task': task,
'harness': harness,
'example': example,
'state': state,
'mask_id': mask_id,
'config': config
}
- 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 — 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
|
| length_max_steps |
Ran ran, honoured the contract we drafted |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("c99743bb81f5abda") 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 torch
import numpy as np
torch.manual_seed(0)
# Analyze the function:
# - config: dict with .get() method calls for 'max_steps', 'max_steps_multiplier'
# - states: iterable of objects where len() is called on each
# Create a valid config dict
config = {
'max_steps': None,
'max_steps_multiplier': 8
}
# Create states - list of objects that support len()
# Using simple lists as states, with different lengths
states = [
[1, 2, 3, 4, 5], # len = 5
[1, 2, 3], # len = 3
[1, 2, 3, 4, 5, 6, 7] # len = 7
]
ARGS = {
'config': config,
'states': states
}
- 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 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
|
| locked_positions |
Ran ran; our contract draft was wrong, not the code |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("5db397377c9c388f") 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 set. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
torch.manual_seed(0)
# Create a minimal task class with locked_positions method
class MinimalTask:
def locked_positions(self, example, state, harness):
# Return a set of position indices that are locked
return {0, 2, 5}
# Create a minimal example (can be a dict, list, or simple object)
example = {"input_ids": torch.tensor([[1, 2, 3, 4]])}
# Create a minimal state object
class MinimalState:
def __init__(self):
self.step = 0
state = MinimalState()
# Create a minimal harness object
class MinimalHarness:
def __init__(self):
self.config = {}
harness = MinimalHarness()
# Create the task instance
task = MinimalTask()
# Define arguments for the function
ARGS = {
"task": task,
"example": example,
"state": state,
"harness": harness
}
- 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 set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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
|
| logits |
Ran ran; our contract draft was wrong, not the code |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("a0f5767d02fdcf3e") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (2, 1, 1, 8) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
torch.manual_seed(0)
# Create a minimal harness with logits method
class MinimalHarness(nn.Module):
def __init__(self):
super().__init__()
self.linear = nn.Linear(4, 8)
def logits(self, prompt, state):
# Simulate processing a single prompt with a state
# Return a tensor of logits
batch_size = 1
return self.linear(prompt).unsqueeze(0)
# Alternative harness with logits_batch method
class HarnessWithBatch(nn.Module):
def __init__(self):
super().__init__()
self.linear = nn.Linear(4, 8)
def logits_batch(self, prompts, states):
# Process batch of prompts and states
return self.linear(prompts)
# Create instances
harness = MinimalHarness()
# Create prompts: list of tensors, batch size 2, each prompt dim 4
prompts = [
torch.randn(1, 4),
torch.randn(1, 4)
]
# Create states: list of simple state objects (can be tensors or None)
states = [
torch.randn(2, 3),
torch.randn(2, 3)
]
ARGS = {
"harness": harness,
"prompts": prompts,
"states": states
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Tensor, ndim 4, dtype family float, shape (2, 1, 1, 8) — shape (2, 1, 1, 8) 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
|
| masked_positions |
Ran ran; our contract draft was wrong, not the code |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("54aab174c10f63eb") 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)
# The function takes a state (which it iterates over) and compares each element
# to mask_id using int() conversion. It returns indices where the token equals mask_id.
# state should be an iterable of token-like values (could be ints, or convertible to int)
# mask_id should be something convertible to int
state = torch.tensor([1, 5, 3, 5, 2], dtype=torch.long)
mask_id = 5
ARGS = {
"state": state,
"mask_id": mask_id
}
- 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
|
| normalize_backward_mode |
Ran ran; our contract draft was wrong, not the code |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("eecdc883303df955") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
torch.manual_seed(0)
ARGS = {
'mode': 'random'
}
- 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
|
| normalize_forward_mode |
Ran ran; our contract draft was wrong, not the code |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("73933ca536f55e77") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
torch.manual_seed(0)
# The function normalize_forward_mode takes a single parameter 'mode'
# It accepts None, 'random', 'high_conf', or 'top_margin'
# If mode is None, it defaults to 'random'
# Otherwise it validates that mode is one of the three allowed strings
ARGS = {
'mode': 'random'
}
- 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
|
| positive_mass |
Ran ran, honoured the contract we drafted |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("66352e9ac49240a1") 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 torch
torch.manual_seed(0)
ARGS = {
"value": 5.2
}
- 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 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
|
| sample_grouped_choices |
Ran ran; our contract draft was wrong, not the code |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("53de0a968e6b19f3") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
torch.manual_seed(0)
# The function expects 'groups' which is an iterable of groups
# Each group is an iterable of items (dicts)
# Each item dict has a 'weight' key with a numeric value
groups = [
# First group: 3 items with weights
[
{'weight': 0.5, 'name': 'item_0_0'},
{'weight': 1.0, 'name': 'item_0_1'},
{'weight': 2.0, 'name': 'item_0_2'},
],
# Second group: 2 items with weights
[
{'weight': 1.5, 'name': 'item_1_0'},
{'weight': 0.8, 'name': 'item_1_1'},
],
# Third group: empty after filtering (all zero weights)
[
{'weight': 0.0, 'name': 'item_2_0'},
{'weight': 0.0, 'name': 'item_2_1'},
],
# Fourth group: single item
[
{'weight': 3.0, 'name': 'item_3_0'},
],
]
ARGS = {
'groups': groups,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| sampler_outputs |
Ran ran; our contract draft was wrong, not the code |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("3ebc14da9a8d6069") 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 torch.nn as nn
torch.manual_seed(0)
class MockHarness(nn.Module):
def __init__(self):
super().__init__()
def decode_state(self, state):
# The function calls harness.decode_state(state)
# Return a simple decoded representation
return f"decoded_{state}"
harness = MockHarness()
# Create sample states - using strings for simplicity since decode_state just processes them
states = ["state_0", "state_1"]
# Create stats - one per state, can be any object
stats = [
{"metric": 0.5, "value": 100},
{"metric": 0.7, "value": 200}
]
# Create trajectories - one per state, optional parameter
trajectories = [
{"steps": [1, 2, 3], "reward": 10},
{"steps": [4, 5, 6], "reward": 20}
]
ARGS = {
"harness": harness,
"states": states,
"stats": stats,
"trajectories": trajectories
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| score_terminal_state |
Ran ran; our contract draft was wrong, not the code |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("7ad0bab6be911c97") 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 torch
import torch.nn as nn
torch.manual_seed(0)
# Stand-in Task class with both reward_state and reward methods
class StandInTask:
def reward_state(self, example, state, harness):
return 0.5
def reward(self, example, text):
return 0.3
# Stand-in Harness class
class StandInHarness:
def decode_state(self, state):
return "decoded text from state"
# Stand-in Example class
class StandInExample:
def __init__(self):
self.data = "example data"
# Config dict
config = {
'value_eps': 0.0001
}
# Create instances
task = StandInTask()
harness = StandInHarness()
example = StandInExample()
state = torch.tensor([1, 2, 3, 4], dtype=torch.float32)
ARGS = {
'task': task,
'harness': harness,
'example': example,
'state': state,
'config': config
}
- 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 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
|
| state_has_eos |
Ran ran, violated the contract we drafted |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("aaf9a1b08192e167") 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 torch
import numpy as np
torch.manual_seed(0)
class MockTokenizer:
def __init__(self, eos_token_id):
self.eos_token_id = eos_token_id
class MockHarness:
def __init__(self, eos_id=None, tokenizer=None, mask_id=None):
self.eos_id = eos_id
self.tokenizer = tokenizer
self.mask_id = mask_id
# Create a harness with various eos token configurations
tokenizer = MockTokenizer(eos_token_id=2)
harness = MockHarness(eos_id=1, tokenizer=tokenizer, mask_id=None)
# Create a state tensor with some token ids
state = torch.tensor([0, 1, 3, 5], dtype=torch.long)
ARGS = {
'harness': harness,
'state': state
}
- 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 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
|
| state_value_fn |
Ran ran, honoured the contract we drafted |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("a52c3ef7ff02e93e") 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 torch
torch.manual_seed(0)
class TaskWithStateValue:
def __init__(self):
self.state_value = 42.0
class TaskWithoutStateValue:
def __init__(self):
pass
task = TaskWithStateValue()
ARGS = {
'task': task
}
- 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 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
|
| state_value_stats |
Ran ran on a synthesized input |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("380cfc26d3493a06") 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 as nn
torch.manual_seed(0)
ARGS = {}
- 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
|
| switch_mass |
Ran ran, honoured the contract we drafted |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("6a0962f67d5d2d3a") 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 torch
import numpy as np
torch.manual_seed(0)
# Analyzing the function switch_mass:
# - opposite_mass: converted to float via positive_mass()
# - same_mass: converted to float via positive_mass()
# - chi: converted to float, clamped to [0, 1], defaults to 1.0 if None
# All parameters are numeric (int, float, or None)
ARGS = {
"opposite_mass": 5.0,
"same_mass": 3.0,
"chi": 0.7
}
- 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 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
|
| terminal_candidate_exact_value_enabled |
Ran ran, violated the contract we drafted |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("cf124b44936818c4") 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 torch
import torch.nn as nn
torch.manual_seed(0)
class MockTask:
"""Mock task object with EXACT_LEAF_VALUE attribute"""
def __init__(self, exact_leaf_value=True):
self.EXACT_LEAF_VALUE = exact_leaf_value
# Test case 1: task with EXACT_LEAF_VALUE=True, no config
task1 = MockTask(exact_leaf_value=True)
config1 = None
# Test case 2: task with EXACT_LEAF_VALUE=False, config with terminal_candidate_value='exact'
task2 = MockTask(exact_leaf_value=False)
config2 = {'terminal_candidate_value': 'exact'}
# Test case 3: task with EXACT_LEAF_VALUE=True, config with terminal_value='exact'
task3 = MockTask(exact_leaf_value=True)
config3 = {'terminal_value': 'exact', 'terminal_candidate_value': 'approximate'}
# Use the first test case for ARGS
ARGS = {
'task': task1,
'config': config1
}
- 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 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
|
| terminal_exact_value_enabled |
Ran ran, violated the contract we drafted |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("b00206b5e5650be4") 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 torch
import torch.nn as nn
torch.manual_seed(0)
class MockTask:
"""Stand-in task class with EXACT_LEAF_VALUE attribute"""
def __init__(self, exact_leaf_value=True):
self.EXACT_LEAF_VALUE = exact_leaf_value
# Test case 1: task with EXACT_LEAF_VALUE=True, no config
task1 = MockTask(exact_leaf_value=True)
config1 = None
# Test case 2: task with EXACT_LEAF_VALUE=False, no config
task2 = MockTask(exact_leaf_value=False)
config2 = None
# Test case 3: task with any EXACT_LEAF_VALUE, config overrides with 'exact'
task3 = MockTask(exact_leaf_value=False)
config3 = {'terminal_value': 'exact'}
# Test case 4: task with any EXACT_LEAF_VALUE, config overrides with non-'exact'
task4 = MockTask(exact_leaf_value=True)
config4 = {'terminal_value': 'approximate'}
# Use the first case for ARGS
ARGS = {
'task': task1,
'config': config1
}
- 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 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
|
| terminal_on_eos |
Ran ran, violated the contract we drafted |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("75ab1853c1b6031a") 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 torch
import torch.nn as nn
torch.manual_seed(0)
# The function expects a config dict (or None) and calls config.get('stop_on_eos', True)
# So we need to provide a dict with optional 'stop_on_eos' key
ARGS = {
'config': {'stop_on_eos': 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 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
|
| terminal_state |
Ran ran; our contract draft was wrong, not the code |
KraitGit/MDM-VGB/src/algorithms/vgb.py code served (permissive licence) · get_code("1b6690366ece0d41") 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 torch
import torch.nn as nn
torch.manual_seed(0)
class StandInTokenizer:
def __init__(self, eos_token_id=None):
self.eos_token_id = eos_token_id
class StandInHarness:
def __init__(self, eos_id=None, tokenizer=None, mask_id=None):
self.eos_id = eos_id
self.tokenizer = tokenizer
self.mask_id = mask_id
harness = StandInHarness(
eos_id=2,
tokenizer=StandInTokenizer(eos_token_id=2),
mask_id=0
)
state = torch.tensor([1, 2, 3, 4], dtype=torch.long)
config = {'stop_on_eos': True}
ARGS = {
'harness': harness,
'state': state,
'config': config
}
- 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 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
|