| compute_accuracy |
Ran ran on a synthesized input |
viniciusguigo/kairos_minerl_basalt/kairos_minerl/src/kairos_minerl/behavior_cloner.py code served (permissive licence) · get_code("481210e6f5732a32") 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 as th
import torch.nn as nn
from torch.utils.data import TensorDataset, DataLoader
th.manual_seed(0)
# Build a minimal model that satisfies the function's usage
class SimpleModel(nn.Module):
def __init__(self, lstm=False):
super().__init__()
self.lstm = lstm
if lstm:
self.lstm_layer = nn.LSTM(input_size=4, hidden_size=8, batch_first=True)
self.fc = nn.Linear(8, 3)
else:
self.fc = nn.Linear(4, 3)
def init_hidden(self, batch_size, device):
# Return initial hidden and cell state for LSTM
return (th.zeros(1, batch_size, 8, device=device),
th.zeros(1, batch_size, 8, device=device))
def forward(self, x, hidden=None):
if self.lstm:
lstm_out, hidden = self.lstm_layer(x.unsqueeze(1), hidden)
out = self.fc(lstm_out[:, -1, :])
return out, hidden
else:
return self.fc(x)
# Create model for non-LSTM case
model = SimpleModel(lstm=False)
# Create a simple dataset with 2 samples
# Each sample: input of shape (4,), label as integer
inputs = th.randn(2, 4) # batch_size=2, feature_dim=4
labels = th.tensor([0, 1]) # 2 labels
dataset_tensor = TensorDataset(inputs, labels)
# Create a dataloader
dataset = DataLoader(dataset_tensor, batch_size=2, shuffle=False)
# Loss function
loss_function = nn.CrossEntropyLoss()
# Device
device = 'cpu'
# Flags
is_val = True
lstm = False
ARGS = {
'model': model,
'dataset': dataset,
'loss_function': loss_function,
'device': device,
'is_val': is_val,
'lstm': lstm
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch, tqdm — 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
|
| compute_accuracy |
Ran ran on a synthesized input |
viniciusguigo/kairos_minerl_basalt/kairos_minerl/src/kairos_minerl/state_classifier.py code served (permissive licence) · get_code("9fd4e3706a238d72") 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 as th
from torch import nn
th.manual_seed(0)
# Create a simple model that takes inputs and outputs predictions
class SimpleModel(nn.Module):
def __init__(self):
super(SimpleModel, self).__init__()
self.fc = nn.Linear(4, 5)
def forward(self, x):
return self.fc(x)
# Create a simple dataset as a list of (inputs, labels) tuples
class SimpleDataset:
def __init__(self):
self.data = []
for _ in range(3):
inputs = th.randn(2, 4)
labels = th.randn(2, 5)
self.data.append((inputs, labels))
def __iter__(self):
return iter(self.data)
def __len__(self):
return len(self.data)
@property
def dataset(self):
# Return self so that len(dataset.dataset) works
return self
model = SimpleModel()
dataset = SimpleDataset()
loss_function = nn.MSELoss()
device = 'cpu'
is_val = True
ARGS = {
'model': model,
'dataset': dataset,
'loss_function': loss_function,
'device': device,
'is_val': is_val
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch, tqdm — 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
|
| load_training_data |
Ran ran on a synthesized input |
viniciusguigo/kairos_minerl_basalt/kairos_minerl/src/kairos_minerl/behavior_cloner.py code served (permissive licence) · get_code("79b2380705eacafd") 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 numpy as np
import os
import tempfile
import shutil
# Create temporary directories with dummy data files
temp_dirs = []
for i in range(2):
temp_dir = tempfile.mkdtemp()
temp_dirs.append(temp_dir)
# Create dummy images.npy and actions.npy
# Images: (batch_size, height, width, channels) format before transpose
images = np.random.rand(2, 32, 32, 3).astype(np.float32)
actions = np.random.rand(2, 4).astype(np.float32)
np.save(os.path.join(temp_dir, 'images.npy'), images)
np.save(os.path.join(temp_dir, 'actions.npy'), actions)
ARGS = {
'data_paths': temp_dirs
}
- 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 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
|
| load_training_data |
Ran ran on a synthesized input |
viniciusguigo/kairos_minerl_basalt/kairos_minerl/src/kairos_minerl/state_classifier.py code served (permissive licence) · get_code("7e9df6464fd9a23c") 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 numpy as np
# Create small stand-in data
# all_images_np: should be a 4D numpy array (batch, height, width, channels)
# The function transposes it to (batch, channels, height, width)
batch_size = 2
height = 4
width = 3
channels = 3
all_images_np = np.random.randint(0, 256, size=(batch_size, height, width, channels), dtype=np.uint8)
# all_labels_np: should be a 2D numpy array (batch, num_labels)
# There are 13 possible labels in data_label_names
# We need enough labels with counts >= class_threshold
num_labels = 13
all_labels_np = np.zeros((batch_size, num_labels), dtype=np.int32)
# Set some labels to have occurrences >= threshold
# Column 0: 2 occurrences
# Column 1: 1 occurrence (will be filtered if threshold > 1)
# Column 2: 2 occurrences
all_labels_np[0, 0] = 1
all_labels_np[1, 0] = 1
all_labels_np[0, 2] = 1
all_labels_np[1, 2] = 1
# class_threshold: integer threshold for minimum label occurrences
class_threshold = 2
ARGS = {
'all_images_np': all_images_np,
'all_labels_np': all_labels_np,
'class_threshold': class_threshold
}
- 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 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
|
| load_training_data_old |
Ran ran on a synthesized input |
viniciusguigo/kairos_minerl_basalt/kairos_minerl/src/kairos_minerl/state_classifier.py code served (permissive licence) · get_code("824a62d38a67639d") 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 numpy as np
import tempfile
import os
# Create temporary directories with mock data files
temp_dir1 = tempfile.mkdtemp()
temp_dir2 = tempfile.mkdtemp()
# Create mock image data: (num_samples, height, width, channels)
# Using shape (2, 4, 5, 3) for first directory
images1 = np.random.randint(0, 256, (2, 4, 5, 3), dtype=np.uint8)
labels1 = np.array([
[1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0],
[0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1]
], dtype=np.int32)
np.save(os.path.join(temp_dir1, 'images.npy'), images1)
np.save(os.path.join(temp_dir1, 'labels.npy'), labels1)
# Create mock image data for second directory: (2, 4, 5, 3)
images2 = np.random.randint(0, 256, (2, 4, 5, 3), dtype=np.uint8)
labels2 = np.array([
[1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1],
[0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0]
], dtype=np.int32)
np.save(os.path.join(temp_dir2, 'images.npy'), images2)
np.save(os.path.join(temp_dir2, 'labels.npy'), labels2)
ARGS = {
'data_paths': [temp_dir1, temp_dir2],
'class_threshold': 2
}
- 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 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
|
| processed_actions_to_wrapper_actions_Animalpen |
Ran ran on a synthesized input |
viniciusguigo/kairos_minerl_basalt/kairos_minerl/src/kairos_minerl/gail_wrapper.py code served (permissive licence) · get_code("91730314fc5f688e") 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 (2,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
# Create dataset_actions with proper shape
# The function accesses columns 0-10+, so we need at least 11 columns
# Shape: (batch_size, num_action_columns)
batch_size = 2
num_columns = 12 # columns 0-10 plus camera (at least 2 values in columns 10+)
dataset_actions = np.zeros((batch_size, num_columns), dtype=object)
# Populate with realistic action values
# Column structure based on function indexing:
# 0: attack, 1: back, 2: equip, 3: forward, 4: jump, 5: left, 6: right, 7: sneak, 8: sprint, 9: use, 10+: camera
for i in range(batch_size):
dataset_actions[i, 0] = 0.0 # attack_actions
dataset_actions[i, 1] = 0.0 # back_actions
dataset_actions[i, 2] = 'none' # equip_actions (string)
dataset_actions[i, 3] = 1.0 # forward_actions
dataset_actions[i, 4] = 0.0 # jump_actions
dataset_actions[i, 5] = 0.0 # left_actions
dataset_actions[i, 6] = 0.0 # right_actions
dataset_actions[i, 7] = 0.0 # sneak_actions
dataset_actions[i, 8] = 0.0 # sprint_actions
dataset_actions[i, 9] = 0.0 # use_actions
dataset_actions[i, 10] = 0.0 # camera yaw
dataset_actions[i, 11] = 0.0 # camera pitch
# Convert numeric columns to float for proper type handling
dataset_actions_numeric = np.zeros((batch_size, num_columns))
for i in range(batch_size):
for j in range(num_columns):
if j == 2: # equip column
dataset_actions_numeric[i, j] = 0 # will be handled separately
else:
dataset_actions_numeric[i, j] = float(dataset_actions[i, j])
# Create properly typed array with equip as strings
dataset_actions_final = np.empty((batch_size, num_columns), dtype=object)
for i in range(batch_size):
for j in range(num_columns):
if j == 2:
dataset_actions_final[i, j] = 'none'
else:
dataset_actions_final[i, j] = dataset_actions_numeric[i, j]
ARGS = {
'dataset_actions': dataset_actions_final,
'camera_margin': 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 (2,) — shape (2,) 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
|
| processed_actions_to_wrapper_actions_FindCave |
Ran ran on a synthesized input |
viniciusguigo/kairos_minerl_basalt/kairos_minerl/src/kairos_minerl/gail_wrapper.py code served (permissive licence) · get_code("e8355439c3ca041d") 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 (2,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
# Create a small batch of dataset actions
# The function expects actions with at least 11 columns (indices 0-10)
# Column structure: [attack, back, equip, forward, jump, left, right, sneak, sprint, use, camera_x, camera_y, ...]
batch_size = 2
num_action_dims = 12
# Create dataset_actions with the expected structure
# Columns: 0=attack, 1=back, 2=equip, 3=forward, 4=jump, 5=left, 6=right, 7=sneak, 8=sprint, 9=use, 10+=camera
dataset_actions = np.zeros((batch_size, num_action_dims), dtype=np.float32)
# Set up some sample actions
# First sample: forward action without jump or attack
dataset_actions[0, 3] = 1.0 # forward
# Second sample: attack action
dataset_actions[1, 0] = 1.0 # attack
# Add camera inputs (columns 10 onwards)
# Camera margin default is 5, so values outside [-5, 5] trigger camera actions
dataset_actions[0, 10] = 0.0 # camera x
dataset_actions[0, 11] = 0.0 # camera y
dataset_actions[1, 10] = 0.0 # camera x
dataset_actions[1, 11] = 0.0 # camera y
ARGS = {
"dataset_actions": dataset_actions,
"camera_margin": 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 (2,) — shape (2,) 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
|
| processed_actions_to_wrapper_actions_Waterfall |
Ran ran on a synthesized input |
viniciusguigo/kairos_minerl_basalt/kairos_minerl/src/kairos_minerl/gail_wrapper.py code served (permissive licence) · get_code("14b6914a84600356") 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 (2,) 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
# The function expects dataset_actions to be a numpy array
# Looking at the function body:
# - It indexes columns 0-9 and 10: onwards
# - Column 0: attack_actions
# - Column 1: back_actions
# - Column 2: equip_actions (strings)
# - Column 3: forward_actions
# - Column 4: jump_actions
# - Column 5: left_actions
# - Column 6: right_actions
# - Column 7: sneak_actions
# - Column 8: sprint_actions
# - Column 9: use_actions
# - Columns 10+: camera_actions (2D, needs at least 2 elements)
# Create a small batch of 2 samples with 12 columns (0-11, where 10-11 are camera x,y)
dataset_actions = np.array([
# attack, back, equip, forward, jump, left, right, sneak, sprint, use, camera_x, camera_y
[0, 0, 'none', 1, 0, 0, 0, 0, 0, 0, 2.0, 1.0],
[1, 0, 'water_bucket', 0, 1, 0, 0, 0, 0, 1, -10.0, 0.0],
], dtype=object)
# Convert numeric columns to appropriate types for the actual execution
dataset_actions_numeric = np.zeros((2, 12), dtype=object)
for i in range(2):
dataset_actions_numeric[i, 0] = float(dataset_actions[i, 0]) # attack
dataset_actions_numeric[i, 1] = float(dataset_actions[i, 1]) # back
dataset_actions_numeric[i, 2] = dataset_actions[i, 2] # equip (string)
dataset_actions_numeric[i, 3] = float(dataset_actions[i, 3]) # forward
dataset_actions_numeric[i, 4] = float(dataset_actions[i, 4]) # jump
dataset_actions_numeric[i, 5] = float(dataset_actions[i, 5]) # left
dataset_actions_numeric[i, 6] = float(dataset_actions[i, 6]) # right
dataset_actions_numeric[i, 7] = float(dataset_actions[i, 7]) # sneak
dataset_actions_numeric[i, 8] = float(dataset_actions[i, 8]) # sprint
dataset_actions_numeric[i, 9] = float(dataset_actions[i, 9]) # use
dataset_actions_numeric[i, 10] = float(dataset_actions[i, 10]) # camera_x
dataset_actions_numeric[i, 11] = float(dataset_actions[i, 11]) # camera_y
ARGS = {
"dataset_actions": dataset_actions_numeric,
"camera_margin": 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 (2,) — shape (2,) 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
|
| dataset_action_batch_to_actions |
Not yet run unverified (harvested, no recorded run) |
viniciusguigo/kairos_minerl_basalt/basalt_baselines/anssi_bc.py code served (permissive licence) · get_code("336562bd9a96072a") How it ran |