| arr |
Ran ran, violated the contract we drafted |
emre1998/fastgrnn-har/analyze_best_route.py code served (permissive licence) · get_code("4efeadb2e29309c1") 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 ndarray, ndim 1, dtype family int, shape (5,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
def arr(vals):
return np.array(vals)
# The function arr() takes a single parameter 'vals' and converts it to a numpy array
# We need to provide a valid input that can be converted to a numpy array
ARGS = {
"vals": [1, 2, 3, 4, 5]
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ndarray, ndim 1, dtype family int, shape (5,) — shape (5,) 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
|
| dense |
Ran ran, honoured the contract we drafted |
emre1998/fastgrnn-har/analyze_ablation.py code served (permissive licence) · get_code("0341425cb85fcd56") 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 ndarray, ndim 1, dtype family float, shape (0,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import tempfile
import json
import os
from pathlib import Path
# Create a temporary directory structure to simulate the experiments folder
temp_dir = tempfile.mkdtemp()
exp_dir = Path(temp_dir) / 'experiments'
exp_dir.mkdir(exist_ok=True)
# Create sample JSON files matching the expected patterns
# For 'hapt' dataset
for seed in [1, 2, 3]:
hapt_file = exp_dir / f'baseline_fastgrnn_h16_s{seed}_e120.json'
with open(hapt_file, 'w') as f:
json.dump({'test_macro_f1': 0.85 + seed * 0.01}, f)
# For other datasets (e.g., 'activity')
for seed in [1, 2, 3]:
activity_file = exp_dir / f'baseline_activity_fastgrnn_h16_s{seed}_e120.json'
with open(activity_file, 'w') as f:
json.dump({'test_macro_f1': 0.80 + seed * 0.01}, f)
# Monkey-patch the EXP variable in the module scope
import sys
import types
# Create a module with the patched EXP path
code = f"""
import glob
import json
import numpy as np
from pathlib import Path
EXP = Path('{temp_dir}') / 'experiments'
def load_f1(pattern, key=None):
vals = []
for f in sorted(glob.glob(str(EXP / pattern))):
r = json.load(open(f))
vals.append(r[key] if key else r['test_macro_f1'])
return np.array(vals)
def dense(ds):
pat = 'baseline_fastgrnn_h16_s*_e120.json' if ds == 'hapt' else f'baseline_{{ds}}_fastgrnn_h16_s*_e120.json'
return load_f1(pat)
"""
exec(code)
ARGS = {
'ds': 'hapt'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ndarray, ndim 1, dtype family float, shape (0,) — shape (0,) 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
|
| fastgrnn_budget_seeds |
Ran ran, honoured the contract we drafted |
emre1998/fastgrnn-har/analyze_bootstrap.py code served (permissive licence) · get_code("3b4ca8c62daf5f9f") 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 ndarray, ndim 1, dtype family float, shape (0,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import tempfile
import json
from pathlib import Path
import numpy as np
# Create a temporary directory to act as the experiments folder
temp_dir = tempfile.mkdtemp()
EXP = Path(temp_dir)
# Create sample experiment files with the expected structure
for seed_idx in range(3):
file_path = EXP / f'deploy_mnist_s{seed_idx}.json'
data = {
'fastgrnn': {
'q15_f1': float(0.85 + seed_idx * 0.02)
}
}
with open(file_path, 'w', encoding='utf-8') as f:
json.dump(data, f)
# Define ARGS
ARGS = {
'ds': 'mnist'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ndarray, ndim 1, dtype family float, shape (0,) — shape (0,) 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
|
| fastgrnn_step |
Ran ran, violated the contract we drafted |
emre1998/fastgrnn-har/fastgrnn_numpy.py code served (permissive licence) · get_code("488a82fc1daf0672") 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 ndarray, ndim 1, dtype family float, shape (3,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
# Set random seed for reproducibility
np.random.seed(0)
# Define dimensions
D = 4 # input dimension
H = 3 # hidden dimension
# Create random input vector
x_t = np.random.randn(D).astype(np.float32)
# Create random hidden state
h_prev = np.random.randn(H).astype(np.float32)
# Create weight matrices
W = np.random.randn(H, D).astype(np.float32)
U = np.random.randn(H, H).astype(np.float32)
# Create bias vectors
b_z = np.random.randn(H).astype(np.float32)
b_h = np.random.randn(H).astype(np.float32)
# Create scalar parameters in [0, 1]
zeta = 0.5
nu = 0.3
ARGS = {
"x_t": x_t,
"h_prev": h_prev,
"W": W,
"U": U,
"b_z": b_z,
"b_h": b_h,
"zeta": zeta,
"nu": nu,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ndarray, ndim 1, dtype family float, shape (3,) — shape (3,) 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
|
| fp32_of |
Ran ran, honoured the contract we drafted |
emre1998/fastgrnn-har/analyze_deploy_budget.py code served (permissive licence) · get_code("b4cf7c1fad47f312") 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)
# The function fp32_of takes a cell_res parameter and calls .get() on it twice
# with string keys 'sparse_fp32_f1' and 'fp32_f1', so it expects a dict-like object
# Create a minimal cell_res dict that satisfies the function's usage
cell_res = {
'sparse_fp32_f1': 0.95,
'fp32_f1': 0.90
}
ARGS = {
'cell_res': cell_res
}
- 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
|
| load |
Ran ran, honoured the contract we drafted |
emre1998/fastgrnn-har/analyze_deploy_budget.py code served (permissive licence) · get_code("23f107197e9436ff") 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 glob
import json
import tempfile
from pathlib import Path
# Create a temporary directory to serve as the experiments folder
temp_dir = tempfile.mkdtemp()
EXP = Path(temp_dir)
# Create some sample JSON files matching the pattern deploy_{ds}_s*.json
ds = "test_dataset"
for i in range(3):
file_path = EXP / f'deploy_{ds}_s{i}.json'
data = {
"run_id": i,
"metrics": {"accuracy": 0.85 + i * 0.01},
"config": {"batch_size": 32}
}
with open(file_path, 'w') as f:
json.dump(data, f)
ARGS = {
"ds": "test_dataset"
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| load_f1 |
Ran ran, honoured the contract we drafted |
emre1998/fastgrnn-har/analyze_ablation.py code served (permissive licence) · get_code("5063afef902ba042") 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 ndarray, ndim 1, dtype family float, shape (0,) 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 glob
import json
import numpy as np
from pathlib import Path
import tempfile
import os
# Create a temporary directory to serve as the experiments folder
temp_dir = tempfile.mkdtemp()
EXP = Path(temp_dir)
# Create sample JSON files matching the pattern
os.makedirs(EXP / 'results', exist_ok=True)
# Create test JSON files with F1 scores
for i in range(3):
data = {
'test_macro_f1': 0.85 + i * 0.05,
'other_metric': 0.75
}
with open(EXP / 'results' / f'result_{i}.json', 'w') as f:
json.dump(data, f)
# Also create a file with a custom key
custom_data = {
'test_macro_f1': 0.90,
'custom_f1': 0.92
}
with open(EXP / 'results' / f'result_custom.json', 'w') as f:
json.dump(custom_data, f)
# Define arguments for the function
ARGS = {
'pattern': 'results/result_*.json',
'key': None
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ndarray, ndim 1, dtype family float, shape (0,) — shape (0,) 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
|
| make_loader |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
emre1998/fastgrnn-har/train_fastgrnn.py code served (permissive licence) · get_code("502d786e4b2355b6") 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 DataLoader. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
from torch.utils.data import DataLoader, TensorDataset
torch.manual_seed(0)
# Create small dummy data
X = np.random.randn(2, 4).astype(np.float32) # 2 samples, 4 features
y = np.array([0, 1], dtype=np.int64) # 2 class labels
ARGS = {
"X": X,
"y": y,
"batch_size": 64,
"shuffle": False,
}
- 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 DataLoader — a DataLoader output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataLoader 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
|
| pair |
Ran ran; our contract draft was wrong, not the code |
emre1998/fastgrnn-har/analyze_drift.py code served (permissive licence) · get_code("57a18eb12b46f21f") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import tempfile
import json
from pathlib import Path
import os
# Create a temporary directory structure to simulate the experiments folder
temp_dir = tempfile.mkdtemp()
exp_dir = Path(temp_dir) / 'experiments'
exp_dir.mkdir(exist_ok=True)
# Create some test JSON files with seed patterns in the filename
test_data_old_1 = {'value': 10, 'metric': 0.5}
test_data_new_1 = {'value': 20, 'metric': 0.7}
test_data_old_2 = {'value': 15, 'metric': 0.6}
test_data_new_2 = {'value': 25, 'metric': 0.8}
# Write test files with seed patterns
with open(exp_dir / 'old_model_s1.json', 'w') as f:
json.dump(test_data_old_1, f)
with open(exp_dir / 'new_model_s1.json', 'w') as f:
json.dump(test_data_new_1, f)
with open(exp_dir / 'old_model_s2.json', 'w') as f:
json.dump(test_data_old_2, f)
with open(exp_dir / 'new_model_s2.json', 'w') as f:
json.dump(test_data_new_2, f)
# Monkey-patch the EXP path in the module
import sys
import types
code = """
import glob
import json
from pathlib import Path
EXP = Path('""" + str(exp_dir) + """')
def jload(p):
with open(p, encoding='utf-8') as f:
return json.load(f)
def pair(old_pat, new_pat, field):
def collect(pat):
out = {}
for p in sorted(glob.glob(str(EXP / pat))):
s = p.split('_s')[-1].split('.')[0].split('_')[0]
try:
out[int(s)] = jload(p)
except (ValueError, json.JSONDecodeError):
pass
return out
o, n = (collect(old_pat), collect(new_pat))
res = {}
for s in sorted(set(o) & set(n)):
try:
res[s] = (field(o[s]), field(n[s]))
except KeyError:
pass
return res
"""
exec(code)
# Define the field function that extracts a value from the loaded JSON
def field_func(data):
return data.get('value', 0)
ARGS = {
'old_pat': 'old_model_s*.json',
'new_pat': 'new_model_s*.json',
'field': field_func
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| params_dense |
Ran ran, honoured the contract we drafted |
emre1998/fastgrnn-har/analyze_footprint.py code served (permissive licence) · get_code("7be47579340ddc69") 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
torch.manual_seed(0)
ARGS = {
'kind': 'fastgrnn',
'H': 8,
'C': 4
}
- 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
|
| perclass |
Ran ran; our contract draft was wrong, not the code |
emre1998/fastgrnn-har/analyze_perclass.py code served (permissive licence) · get_code("86cf602e4a2a7bea") 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 glob
import json
import numpy as np
from collections import defaultdict
from pathlib import Path
import tempfile
import os
# Create a temporary directory structure for experiments
tmpdir = tempfile.mkdtemp()
EXP = Path(tmpdir) / 'experiments'
EXP.mkdir(parents=True, exist_ok=True)
# Create sample experiment result files
cell_value = 'cell_type_1'
pattern = '{cell}/results_*.json'
# Create subdirectory for cell type
cell_dir = EXP / cell_value
cell_dir.mkdir(parents=True, exist_ok=True)
# Create sample JSON result files
sample_results_1 = {
'per_class_f1': {
'class_a': 0.85,
'class_b': 0.92,
'class_c': 0.78
}
}
sample_results_2 = {
'per_class_f1': {
'class_a': 0.87,
'class_b': 0.90,
'class_c': 0.80
}
}
with open(cell_dir / 'results_1.json', 'w') as f:
json.dump(sample_results_1, f)
with open(cell_dir / 'results_2.json', 'w') as f:
json.dump(sample_results_2, f)
# Patch the EXP path in the module's namespace
import sys
module = sys.modules[__name__]
module.EXP = EXP
ARGS = {
'cell': cell_value,
'pattern': '{cell}/results_*.json'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type 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
|
| run_sequence |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
emre1998/fastgrnn-har/fastgrnn_numpy.py code served (permissive licence) · get_code("e1054c18e8dbdcc6") 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 ndarray, ndim 1, dtype family float, shape (5,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
np.random.seed(0)
# Parameters for run_sequence
T = 3 # sequence length
D = 4 # input dimension
H = 5 # hidden dimension
# Create input sequence (T, D)
X = np.random.randn(T, D).astype(np.float32)
# Initial hidden state (H,)
h0 = np.zeros(H, dtype=np.float32)
# Weight matrices
W = np.random.randn(H, D).astype(np.float32) # (H, D)
U = np.random.randn(H, H).astype(np.float32) # (H, H)
# Biases
b_z = np.random.randn(H).astype(np.float32) # (H,)
b_h = np.random.randn(H).astype(np.float32) # (H,)
# Scalar parameters in [0, 1]
zeta = 0.7
nu = 0.3
# return_all parameter
return_all = False
ARGS = {
"X": X,
"h0": h0,
"W": W,
"U": U,
"b_z": b_z,
"b_h": b_h,
"zeta": zeta,
"nu": nu,
"return_all": return_all,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ndarray, ndim 1, dtype family float, shape (5,) — shape (5,) 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
|
| sigmoid |
Ran ran, honoured the contract we drafted |
emre1998/fastgrnn-har/fastgrnn_numpy.py code served (permissive licence) · get_code("156855983d880ed5") 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 float64, ndim 0, 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 numpy as np
# sigmoid takes one parameter: x
# which can be a scalar or NumPy array of any shape
# Let's create a few test cases to show it works with different inputs
# Scalar input
scalar_input = 0.5
# 1D array
array_1d = np.array([0.0, 1.0, -1.0, 2.0])
# 2D array
array_2d = np.array([[0.0, 1.0], [2.0, -1.0]])
# Multi-dimensional array
array_3d = np.array([[[0.1, 0.2], [0.3, 0.4]], [[0.5, 0.6], [0.7, 0.8]]])
# Define ARGS with the scalar input as the primary test case
ARGS = {
"x": scalar_input
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
- 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
|
| sparse_fp32 |
Ran ran, honoured the contract we drafted |
emre1998/fastgrnn-har/analyze_ablation.py code served (permissive licence) · get_code("3952718869a58a08") 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 ndarray, ndim 1, dtype family float, shape (0,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import tempfile
import json
import numpy as np
from pathlib import Path
import shutil
# Create a temporary directory to use as our experiments folder
temp_dir = tempfile.mkdtemp()
exp_path = Path(temp_dir) / 'experiments'
exp_path.mkdir(parents=True, exist_ok=True)
# Create sample JSON files matching the pattern deploy_{ds}_s*.json
# The function looks for these files and extracts 'fastgrnn']['sparse_fp32_f1' values
ds_name = 'mnist'
# Create a few sample experiment files
for i in range(3):
experiment_data = {
'fastgrnn': {
'sparse_fp32_f1': float(0.85 + i * 0.05)
}
}
file_path = exp_path / f'deploy_{ds_name}_s{i}.json'
with open(file_path, 'w') as f:
json.dump(experiment_data, f)
# Monkey-patch the EXP path in the module context
import sys
import types
# Create a module with the patched EXP path
module_code = f"""
import glob
import json
import numpy as np
from pathlib import Path
EXP = Path('{exp_path}')
def sparse_fp32(ds):
return np.array([json.load(open(f))['fastgrnn']['sparse_fp32_f1'] for f in sorted(glob.glob(str(EXP / f'deploy_{{ds}}_s*.json')))])
"""
# Execute the patched function definition
exec(module_code, globals())
# Define ARGS with the dataset name parameter
ARGS = {
'ds': 'mnist'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ndarray, ndim 1, dtype family float, shape (0,) — shape (0,) 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
|
| sram_working_set |
Ran ran, honoured the contract we drafted |
emre1998/fastgrnn-har/analyze_footprint.py code served (permissive licence) · get_code("0a60651079a87d84") 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)
D = 3
# Analyzing the function:
# - kind: string parameter, one of 'fastgrnn', 'gru', or other
# - H: integer, used in arithmetic operations for state and scratch calculations
# - C: integer, used for logits calculation
# The function performs simple arithmetic on H and C to compute SRAM working set
# No complex objects needed, just integers
ARGS = {
'kind': 'fastgrnn',
'H': 16,
'C': 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
|
| tier1_seeds |
Ran ran, honoured the contract we drafted |
emre1998/fastgrnn-har/analyze_bootstrap.py code served (permissive licence) · get_code("f333f0e394a1a6c6") 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 ndarray, ndim 1, dtype family float, shape (0,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import tempfile
import json
from pathlib import Path
import os
# Create a temporary directory structure to simulate the experiments folder
tmpdir = tempfile.mkdtemp()
exp_dir = Path(tmpdir) / 'experiments'
exp_dir.mkdir(parents=True, exist_ok=True)
# Create mock experiment JSON files for testing
# We'll create files matching the pattern: baseline_{pfx}{cell}_h16_s*_e120.json
for i in range(3):
filename = exp_dir / f'baseline_hapt_conv_h16_s{i}_e120.json'
with open(filename, 'w') as f:
json.dump({'test_macro_f1': 0.5 + i * 0.1}, f)
# Also create files for a non-hapt dataset
for i in range(2):
filename = exp_dir / f'baseline_uci_lstm_h16_s{i}_e120.json'
with open(filename, 'w') as f:
json.dump({'test_macro_f1': 0.6 + i * 0.05}, f)
# Mock the EXP global variable by patching it in the module
import sys
from types import ModuleType
# Create a mock module with the necessary functions and patched EXP
mock_module = ModuleType('mock_tier1')
mock_module.EXP = exp_dir
def jload(p):
with open(p, encoding='utf-8') as f:
return json.load(f)
def tier1_seeds(ds, cell):
import glob
import numpy as np
pfx = '' if ds == 'hapt' else f'{ds}_'
files = sorted(glob.glob(str(exp_dir / f'baseline_{pfx}{cell}_h16_s*_e120.json')))
return np.array([jload(f)['test_macro_f1'] for f in files])
ARGS = {
'ds': 'hapt',
'cell': 'conv'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ndarray, ndim 1, dtype family float, shape (0,) — shape (0,) 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
|
| jload |
Not yet run unverified (harvested, no recorded run) |
emre1998/fastgrnn-har/analyze_bootstrap.py code served (permissive licence) · get_code("2a1e46172a51de87") How it ran |