| data_load |
Ran ran on a synthesized input |
avivne/bilinear-transduction/utils/util.py code served (permissive licence) · get_code("96ba47411fab30f0") 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 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 os
import tempfile
import pickle
# Create a temporary directory with the required pickle files
tmpdir = tempfile.mkdtemp()
# Create sample data structures
demos = [
{"observation": [1, 2, 3], "action": [0.1, 0.2]},
{"observation": [4, 5, 6], "action": [0.3, 0.4]}
]
in_dist_eval_goals = [
{"goal": [1, 1, 1]},
{"goal": [2, 2, 2]}
]
ood_eval_goals = [
{"goal": [10, 10, 10]},
{"goal": [20, 20, 20]}
]
# Write pickle files to the temporary directory
with open(os.path.join(tmpdir, 'demos.pkl'), 'wb') as f:
pickle.dump(demos, f)
with open(os.path.join(tmpdir, 'in_dist_goals.pkl'), 'wb') as f:
pickle.dump(in_dist_eval_goals, f)
with open(os.path.join(tmpdir, 'ood_goals.pkl'), 'wb') as f:
pickle.dump(ood_eval_goals, f)
ARGS = {
"loaddir": tmpdir
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple, ndim 2, dtype family float — a tuple output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| extract_composition |
Ran ran on a synthesized input |
learningmatter-mit/matex/data_modules/data_process.py code served (permissive licence) · get_code("8fdc56dd2cb6731a") 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
class Container:
def __init__(self):
self.composition = {
"layer1": torch.tensor([[1.0, 2.0, 3.0, 4.0]]),
"layer2": torch.tensor([[5.0, 6.0, 7.0, 8.0]])
}
torch.manual_seed(0)
container = Container()
ARGS = {
"container": container
}
- 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
|
| get_prop_labels |
Ran ran on a synthesized input |
learningmatter-mit/matex/blt/plot_maker/props_utils.py code served (permissive licence) · get_code("1378650b374b3a86") 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 numpy as np
torch.manual_seed(0)
# The function get_prop_labels takes a single parameter 'prop' which is a string
# It returns a tuple of (x_label, title) based on the property name
# We need to provide valid arguments that will execute the function
ARGS = {
'prop': 'bulk_modulus'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_prop_rep |
Ran ran on a synthesized input |
learningmatter-mit/matex/blt/plot_maker/props_utils.py code served (permissive licence) · get_code("cf11fb6095bba44e") 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
import numpy as np
torch.manual_seed(0)
# The function takes a benchmark parameter and returns a string representation
# based on simple string matching. No complex objects needed.
ARGS = {
'benchmark': 'matbench'
}
- 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
|
| get_results_filename |
Ran ran on a synthesized input |
learningmatter-mit/matex/blt/plot_maker/props_utils.py code served (permissive licence) · get_code("085dae6797969122") 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
# Call get_prop_rep and get_results_filename with valid arguments
ARGS = {
'benchmark': 'aflow',
'prop': 'bulk_modulus_vrh',
'model_type': 'bilinear'
}
- 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
|
| get_split |
Ran ran on a synthesized input |
learningmatter-mit/matex/baselines/modnet/aflow_mp.py code served (permissive licence) · get_code("a26982da6e0216ef") 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 numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
# Create a simple targets object with a .values attribute that has .squeeze() method
targets = pd.Series([1.2, 3.4, 2.1, 5.6, 4.3, 1.9])
ARGS = {
'n_data': 6,
'test_size': 0.33,
'split_type': 'ood',
'targets': targets
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, pandas, sklearn — 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
|
| get_sym_dict |
Ran ran on a synthesized input |
learningmatter-mit/matex/data_modules/data_utils.py code served (permissive licence) · get_code("a655195cd9d3857f") 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 defaultdict. 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 collections
import re
class CompositionError(Exception):
"""Exception class for composition errors"""
pass
def get_sym_dict(f, factor):
sym_dict = collections.defaultdict(float)
regex = '([A-Z][a-z]*)\\s*([-*\\.\\d]*)'
r = re.compile(regex)
for m in re.finditer(r, f):
el = m.group(1)
amt = 1
if m.group(2).strip() != '':
amt = float(m.group(2))
sym_dict[el] += amt * factor
f = f.replace(m.group(), '', 1)
if f.strip():
raise CompositionError(f'{f} is an invalid formula!')
return sym_dict
ARGS = {
'f': 'H2O',
'factor': 2.5
}
- 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 defaultdict — a defaultdict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a defaultdict 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
|
| label_with_model_dist |
Ran ran on a synthesized input |
avivne/bilinear-transduction/render_videos.py code served (permissive licence) · get_code("99d97d743f9a2aac") 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 3, dtype family int, shape (48, 64, 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
from PIL import Image
import PIL.ImageDraw as ImageDraw
# Create a small frame (numpy array representing an image)
# Using a 64x48 RGB image with values in range [0, 255]
frame = np.random.randint(0, 256, size=(48, 64, 3), dtype=np.uint8)
# Create a tag string
tag = "demos_bc_biLinear"
ARGS = {
"frame": frame,
"tag": tag,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ndarray, ndim 3, dtype family int, shape (48, 64, 3) — shape (48, 64, 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
|
| load_eval_data |
Ran ran on a synthesized input |
learningmatter-mit/matex/blt/plot_maker/plots.py code served (permissive licence) · get_code("842c29ed353636df") 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 defaultdict. 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 pickle as pkl
import tempfile
import os
from collections import defaultdict
# Create a temporary directory for pickle files
temp_dir = tempfile.mkdtemp()
# Create sample evaluation data
sample_ood_data = {
'preds': [[0.1, 0.9], [0.8, 0.2]],
'gt': [1, 0]
}
sample_in_dist_data = {
'preds': [[0.2, 0.8], [0.7, 0.3]],
'gt': [1, 0]
}
# Write pickle files for bilinear method
bilinear_ood_file = os.path.join(temp_dir, 'bilinear_eval_ood.pkl')
bilinear_in_dist_file = os.path.join(temp_dir, 'bilinear_eval_in_dist.pkl')
with open(bilinear_ood_file, 'wb') as f:
pkl.dump(sample_ood_data, f)
with open(bilinear_in_dist_file, 'wb') as f:
pkl.dump(sample_in_dist_data, f)
# Define arguments for the function
ARGS = {
'prop': 'accuracy',
'path': temp_dir,
'method': 'bilinear'
}
- 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 defaultdict — a defaultdict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a defaultdict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| load_pkl |
Ran ran on a synthesized input |
avivne/bilinear-transduction/envs/adroit_wrapper.py code served (permissive licence) · get_code("d370d73ba78229f9") 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 pickle
import tempfile
import os
# Create a temporary pickle file with some test data
test_data = {
'model_weights': [1, 2, 3, 4],
'config': {'lr': 0.001, 'epochs': 10},
'results': [0.95, 0.97, 0.98]
}
# Write the pickle file to a temporary location
temp_dir = tempfile.gettempdir()
temp_pkl_path = os.path.join(temp_dir, 'test_load_pkl.pkl')
with open(temp_pkl_path, 'wb') as f:
pickle.dump(test_data, f)
ARGS = {
'logpath': temp_pkl_path
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| load_pkl |
Ran ran on a synthesized input |
avivne/bilinear-transduction/utils/util.py code served (permissive licence) · get_code("2b1c0d4b4deb30fb") 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 pickle
import tempfile
import os
# Create a temporary pickle file with some test data
test_data = {
'model_state': [1, 2, 3, 4],
'metrics': {'loss': 0.5, 'accuracy': 0.95},
'epoch': 10
}
# Create a temporary file and write pickle data to it
temp_file = tempfile.NamedTemporaryFile(mode='wb', delete=False, suffix='.pkl')
pickle.dump(test_data, temp_file)
temp_file.close()
logpath = temp_file.name
ARGS = {
'logpath': logpath
}
- 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
|
| mlp |
Ran ran; our contract draft was wrong, not the code |
avivne/bilinear-transduction/utils/networks.py pointer only (licence: MIT); the stored copy get_code serves, from tianyucodings/diffusion_trusted_q_learning, is pointer only (licence: NONE) · get_code("db00dda8b96201d3") How it ranThe body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from tianyucodings/diffusion_trusted_q_learning, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded. |
| mlp |
Ran ran; our contract draft was wrong, not the code |
learningmatter-mit/matex/blt/utils/networks.py code served (permissive licence) · get_code("ebb5e4d5764029a8") 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 Sequential. 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 = {
"input_dim": 4,
"hidden_dim": 8,
"output_dim": 3,
"hidden_depth": 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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| parse_formula |
Ran ran on a synthesized input |
learningmatter-mit/matex/data_modules/data_utils.py code served (permissive licence) · get_code("c6d7b87034c95886") 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 defaultdict. 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 collections
import re
class CompositionError(Exception):
"""Exception class for composition errors"""
pass
def get_sym_dict(f, factor):
sym_dict = collections.defaultdict(float)
regex = '([A-Z][a-z]*)\\s*([-*\\.\\d]*)'
r = re.compile(regex)
for m in re.finditer(r, f):
el = m.group(1)
amt = 1
if m.group(2).strip() != '':
amt = float(m.group(2))
sym_dict[el] += amt * factor
f = f.replace(m.group(), '', 1)
if f.strip():
raise CompositionError(f'{f} is an invalid formula!')
return sym_dict
def parse_formula(formula):
"""
Parameters
----------
formula: str
A string formula, e.g. Fe2O3, Li3Fe2(PO4)3.
Return
----------
sym_dict: dict
A dictionary recording the composition of that formula.
Notes
----------
In the case of Metallofullerene formula (e.g. Y3N@C80),
the @ mark will be dropped and passed to parser.
"""
formula = formula.replace('@', '')
formula = formula.replace('[', '(')
formula = formula.replace(']', ')')
regex = '\\(([^\\(\\)]+)\\)\\s*([\\.\\d]*)'
r = re.compile(regex)
m = re.search(r, formula)
if m:
factor = 1
if m.group(2) != '':
factor = float(m.group(2))
unit_sym_dict = get_sym_dict(m.group(1), factor)
expanded_sym = ''.join(['{}{}'.format(el, amt) for el, amt in unit_sym_dict.items()])
expanded_formula = formula.replace(m.group(), expanded_sym)
return parse_formula(expanded_formula)
sym_dict = get_sym_dict(formula, 1)
return sym_dict
# Test cases: simple formulas, formulas with numbers, formulas with parentheses
ARGS = {
"formula": "Fe2O3"
}
- 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 defaultdict — a defaultdict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a defaultdict 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
|
| train_policy |
Ran ran on a synthesized input |
avivne/bilinear-transduction/utils/trainer.py code served (permissive licence) · get_code("475650877c1f12d0") 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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
import numpy as np
import tempfile
torch.manual_seed(0)
np.random.seed(0)
# Create a temporary directory for logging
logdir = tempfile.gettempdir()
# Define a simple policy for 'bc' model type
class BCPolicy(nn.Module):
def __init__(self, state_dim=4, action_dim=3):
super().__init__()
self.fc = nn.Linear(state_dim, action_dim)
def forward(self, states):
return self.fc(states)
# Define a bilinear policy for 'bilinear' model type
class BilinearPolicy(nn.Module):
def __init__(self, state_dim=4, action_dim=3, delta_dim=4):
super().__init__()
self.fc_state = nn.Linear(state_dim, 16)
self.fc_delta = nn.Linear(delta_dim, 16)
self.fc_out = nn.Linear(16, action_dim)
def forward(self, states, deltas=None):
if deltas is None:
return self.fc_out(self.fc_state(states))
state_feat = self.fc_state(states)
delta_feat = self.fc_delta(deltas)
combined = state_feat * delta_feat
return self.fc_out(combined)
# Create demonstration data
state_dim = 4
action_dim = 3
horizon = 100
num_demos = 5
demos = []
for i in range(num_demos):
demo = {
'obs': np.random.randn(horizon, state_dim).astype(np.float32),
'action': np.random.randn(horizon, action_dim).astype(np.float32)
}
demos.append(demo)
# Create policies for both model types
bc_policy = BCPolicy(state_dim=state_dim, action_dim=action_dim)
bilinear_policy = BilinearPolicy(state_dim=state_dim, action_dim=action_dim, delta_dim=state_dim)
ARGS = {
'model_type': 'bc',
'demos': demos,
'policy': bc_policy,
'logdir': logdir,
'num_epochs': 2,
'batch_size': 2,
'horizon': horizon
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- matplotlib, 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
|
| trajectory2vid |
Ran ran on a synthesized input |
avivne/bilinear-transduction/render_videos.py code served (permissive licence) · get_code("a26a458b0dafceb3") 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 4, 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 numpy as np
import cv2
from PIL import Image
# Create a minimal mock environment that satisfies the function's usage
class MockEnv:
def __init__(self, env_name):
self.env_name = env_name
self.sim = self
def reset(self):
return np.zeros(10)
def reset_model_ood(self, goal_pos):
return np.zeros(10)
def set_goal(self, mass=None, goal_pos=None):
return np.zeros(10)
def step(self, action):
obs = np.zeros(10)
reward = 0.0
done = False
info = {}
return obs, reward, done, info
def render(self, width, height, mode='offscreen', camera_name=None):
# Return BGR image (HxWx3)
return np.random.randint(0, 256, (height, width, 3), dtype=np.uint8)
# Create a nested mock environment for adroit_scale case
class MockAdroitEnv:
def __init__(self):
self.env = self
self.sim = self
def reset(self):
return np.zeros(10)
def set_goal(self, goal_pos=None):
return np.zeros(10)
def step(self, action):
obs = np.zeros(10)
reward = 0.0
done = False
info = {}
return obs, reward, done, info
def render(self, width, height, mode='offscreen', camera_name=None):
# Return RGB image (HxWx3)
return np.random.randint(0, 256, (height, width, 3), dtype=np.uint8)
# Create trajectory dict with actions and observations
traj = {
'action': [np.array([0.1, 0.2, 0.3]) for _ in range(5)],
'obs': np.random.rand(6, 10) # 6 timesteps, 10-dim observation
}
# Create environment
env_reach = MockEnv('reach-v2')
# Define ARGS
ARGS = {
'env': env_reach,
'traj': traj,
'tag': 'demos_bc_biLinear',
'env_name': 'reach-v2',
'goal_idxs': [0, 1, 2],
'resolution': (560, 420),
'flip': False
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- PIL, cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 4, 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
|
| writer_for |
Ran ran on a synthesized input |
avivne/bilinear-transduction/render_videos.py code served (permissive licence) · get_code("91cfe51d6844f3a7") 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 VideoWriter. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import os
import tempfile
log_dir = tempfile.mkdtemp()
tag = "test_video"
fps = 30
res = (640, 480)
ARGS = {
"log_dir": log_dir,
"tag": tag,
"fps": fps,
"res": res
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- cv2 — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type VideoWriter — a VideoWriter output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a VideoWriter output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_cbfv |
Not yet run unverified (harvested, no recorded run) |
learningmatter-mit/matex/data_modules/data_utils.py code served (permissive licence) · get_code("4612728c27050322") How it ran |
| models_load |
Not yet run unverified (harvested, no recorded run) |
avivne/bilinear-transduction/utils/util.py code served (permissive licence) · get_code("92bf21f9ae623c70") How it ran |
| modnet_preprocess |
Not yet run unverified (harvested, no recorded run) |
learningmatter-mit/matex/data_modules/data_process.py code served (permissive licence) · get_code("4a1cb87336c382fe") How it ran |