| cache_json |
Ran ran on a synthesized input |
namhoonlee/spp-public/spp/helpers.py code served (permissive licence) · get_code("a5829b43dc01b183") 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 json
import os
import tempfile
# Create a temporary directory for testing
temp_dir = tempfile.mkdtemp()
# Define a simple zero-argument function that returns JSON-serializable data
def sample_func():
return {"key": "value", "number": 42, "list": [1, 2, 3]}
# Construct the arguments
filename = os.path.join(temp_dir, "test_cache.json")
func = sample_func
makedir = True
allow_load = True
ARGS = {
"filename": filename,
"func": func,
"makedir": makedir,
"allow_load": allow_load,
}
- 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
|
| dense_to_one_hot |
Ran ran on a synthesized input |
namhoonlee/spp-public/spp/mnist.py code served (permissive licence) · get_code("b757a2b89740842b") 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 2, dtype family float, shape (5, 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
# Create valid arguments for dense_to_one_hot function
labels_dense = np.array([0, 1, 2, 1, 0], dtype=np.int64)
num_classes = 3
ARGS = {
"labels_dense": labels_dense,
"num_classes": num_classes,
}
- 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 2, dtype family float, shape (5, 3) — shape (5, 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
|
| extract_images |
Ran ran on a synthesized input |
namhoonlee/spp-public/spp/mnist.py code served (permissive licence) · get_code("dc6a20f23af74deb") 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 4, dtype family int, shape (2, 4, 3, 1) 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 gzip
import numpy as np
import io
import struct
# Create a minimal valid MNIST-format gzipped file
def create_mock_mnist_file():
"""Create a minimal valid MNIST image file in gzip format."""
# MNIST format:
# [offset] [type] [value]
# 0000 32 bit integer 0x00000803 (2051) - magic number
# 0004 32 bit integer num_images
# 0008 32 bit integer num_rows
# 0012 32 bit integer num_cols
# Rest unsigned bytes pixel data
num_images = 2
rows = 4
cols = 3
buffer = io.BytesIO()
# Write magic number (2051 in big-endian)
buffer.write(struct.pack('>I', 2051))
# Write num_images
buffer.write(struct.pack('>I', num_images))
# Write rows
buffer.write(struct.pack('>I', rows))
# Write cols
buffer.write(struct.pack('>I', cols))
# Write pixel data (num_images * rows * cols bytes)
pixel_data = np.random.randint(0, 256, size=(num_images, rows, cols), dtype=np.uint8)
buffer.write(pixel_data.tobytes())
# Compress with gzip
buffer.seek(0)
compressed = io.BytesIO()
with gzip.GzipFile(fileobj=compressed, mode='wb') as gz:
gz.write(buffer.read())
# Write to temporary file path
import tempfile
temp_file = tempfile.NamedTemporaryFile(delete=False, suffix='.gz')
compressed.seek(0)
temp_file.write(compressed.read())
temp_file.close()
return temp_file.name
# Create the mock file
mock_filename = create_mock_mnist_file()
ARGS = {
'filename': mock_filename
}
- 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 4, dtype family int, shape (2, 4, 3, 1) — shape (2, 4, 3, 1) 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
|
| extract_labels |
Ran ran on a synthesized input |
namhoonlee/spp-public/spp/mnist.py code served (permissive licence) · get_code("57f1bd325f3272fb") 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 gzip
import numpy as np
import io
import struct
# Create a minimal valid MNIST label file in gzip format
def create_valid_mnist_label_file():
"""Create a minimal valid gzip-compressed MNIST label file."""
buffer = io.BytesIO()
with gzip.GzipFile(fileobj=buffer, mode='wb') as gz:
# Write magic number (2049 in big-endian)
gz.write(struct.pack('>I', 2049))
# Write number of items (5 labels)
gz.write(struct.pack('>I', 5))
# Write 5 label bytes (values 0-4)
gz.write(bytes([0, 1, 2, 3, 4]))
buffer.seek(0)
return buffer
# Create the gzip file as bytes
gzip_buffer = create_valid_mnist_label_file()
gzip_bytes = gzip_buffer.getvalue()
# Write to a temporary file-like object that can be opened
import tempfile
import os
temp_file = tempfile.NamedTemporaryFile(delete=False, suffix='.gz')
temp_file.write(gzip_bytes)
temp_file.close()
ARGS = {
'filename': temp_file.name,
'one_hot': False,
}
- 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
|
| for_loop |
Ran ran on a synthesized input |
namhoonlee/spp-public/spp/model.py code served (permissive licence) · get_code("78dc5962d5d666ac") 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 EagerTensor, ndim 3, dtype family float, shape (3, 1, 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 tensorflow as tf
import numpy as np
# Simple loop function that returns a tensor
def simple_loop_fn(i):
"""Returns a tensor based on iteration number"""
return tf.constant([[1.0, 2.0, 3.0, 4.0]], dtype=tf.float32) * tf.cast(i, tf.float32)
# Nested loop function that returns multiple tensors
def nested_loop_fn(i):
"""Returns a nested structure (dict) of tensors"""
val = tf.cast(i, tf.float32)
return {
'a': tf.constant([[1.0, 2.0, 3.0, 4.0]], dtype=tf.float32) * val,
'b': tf.constant([[5.0, 6.0]], dtype=tf.float32) * val
}
# Define dtypes for simple case
simple_dtypes = tf.float32
# Define dtypes for nested case
nested_dtypes = {
'a': tf.float32,
'b': tf.float32
}
ARGS = {
'loop_fn': simple_loop_fn,
'loop_fn_dtypes': simple_dtypes,
'iters': 3,
'parallel_iterations': None
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type EagerTensor, ndim 3, dtype family float, shape (3, 1, 4) — shape (3, 1, 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
|
| get_activation |
Ran ran on a synthesized input |
namhoonlee/spp-public/spp/network.py code served (permissive licence) · get_code("66d9542e7fc1cb71") 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 function. 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 tensorflow as tf
ARGS = {
'activation': 'relu'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
|
| read_data_sets |
Ran ran on a synthesized input |
namhoonlee/spp-public/spp/tiny_imagenet.py code served (permissive licence) · get_code("4793e5a1bc03daaf") 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 os
import tempfile
import shutil
import numpy as np
import cv2
# Create a temporary directory structure mimicking the Tiny ImageNet dataset format
temp_dir = tempfile.mkdtemp()
# Create wnids.txt with class labels
wnids_path = os.path.join(temp_dir, 'wnids.txt')
with open(wnids_path, 'w') as f:
f.write('n00000001\n')
f.write('n00000002\n')
# Create train directory structure
train_dir = os.path.join(temp_dir, 'train')
os.makedirs(train_dir)
# Create training images for class 1
train_class1_dir = os.path.join(train_dir, 'n00000001', 'images')
os.makedirs(train_class1_dir)
img1 = np.random.randint(0, 256, (64, 64, 3), dtype=np.uint8)
cv2.imwrite(os.path.join(train_class1_dir, 'img_1.JPEG'), img1)
img2 = np.random.randint(0, 256, (64, 64, 3), dtype=np.uint8)
cv2.imwrite(os.path.join(train_class1_dir, 'img_2.JPEG'), img2)
# Create training images for class 2
train_class2_dir = os.path.join(train_dir, 'n00000002', 'images')
os.makedirs(train_class2_dir)
img3 = np.random.randint(0, 256, (64, 64, 3), dtype=np.uint8)
cv2.imwrite(os.path.join(train_class2_dir, 'img_3.JPEG'), img3)
# Create val directory structure
val_dir = os.path.join(temp_dir, 'val')
val_images_dir = os.path.join(val_dir, 'images')
os.makedirs(val_images_dir)
# Create validation images
img4 = np.random.randint(0, 256, (64, 64, 3), dtype=np.uint8)
cv2.imwrite(os.path.join(val_images_dir, 'val_img_1.JPEG'), img4)
img5 = np.random.randint(0, 256, (64, 64, 3), dtype=np.uint8)
cv2.imwrite(os.path.join(val_images_dir, 'val_img_2.JPEG'), img5)
# Create val_annotations.txt
val_annotations_path = os.path.join(val_dir, 'val_annotations.txt')
with open(val_annotations_path, 'w') as f:
f.write('val_img_1.JPEG\tn00000001\n')
f.write('val_img_2.JPEG\tn00000002\n')
ARGS = {
'path_dataset': temp_dir
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- cv2, 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
|
| read_data_sets |
Ran ran on a synthesized input |
namhoonlee/spp-public/spp/cifar.py code served (permissive licence) · get_code("183b71f2551de460") 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 os
import pickle
import numpy as np
import tempfile
import shutil
# Create a temporary directory structure with mock CIFAR-10 data
temp_dir = tempfile.mkdtemp()
# Create mock data batches
for batch_num in range(1, 6):
batch_data = {
b'data': np.random.randint(0, 256, (2, 3072), dtype=np.uint8),
b'labels': np.random.randint(0, 10, (2,), dtype=np.int32)
}
filename = os.path.join(temp_dir, f'data_batch_{batch_num}')
with open(filename, 'wb') as f:
pickle.dump(batch_data, f)
# Create mock test batch
test_batch_data = {
b'data': np.random.randint(0, 256, (2, 3072), dtype=np.uint8),
b'labels': np.random.randint(0, 10, (2,), dtype=np.int32)
}
test_filename = os.path.join(temp_dir, 'test_batch')
with open(test_filename, 'wb') as f:
pickle.dump(test_batch_data, f)
ARGS = {
'path_dataset': temp_dir
}
- 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
|
| read_data_sets |
Ran ran on a synthesized input |
namhoonlee/spp-public/spp/fashion_mnist.py code served (permissive licence) · get_code("44bd5219b1a3f018") 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 os
import numpy as np
import gzip
import tempfile
# Create temporary directory and mock MNIST files
temp_dir = tempfile.mkdtemp()
# Helper function to create mock gzip files
def create_mock_mnist_file(path, num_samples, is_labels=False):
"""Create a mock MNIST gzip file with proper headers."""
with gzip.open(path, 'wb') as f:
if is_labels:
# Label file header: magic number (2 bytes) + version (2 bytes) + num_items (4 bytes)
header = np.array([0, 0, 0, 1, 0, 0, 0, num_samples], dtype=np.uint8)
data = np.random.randint(0, 10, num_samples, dtype=np.uint8)
else:
# Image file header: magic number (2 bytes) + version (2 bytes) + num_items (4 bytes) + rows (4 bytes) + cols (4 bytes)
header = np.array([0, 0, 0, 3, 0, 0, 0, num_samples, 0, 0, 0, 28, 0, 0, 0, 28], dtype=np.uint8)
data = np.random.randint(0, 256, num_samples * 28 * 28, dtype=np.uint8)
f.write(header.tobytes())
f.write(data.tobytes())
# Create mock training files
num_train = 100
num_test = 50
create_mock_mnist_file(os.path.join(temp_dir, 'train-labels-idx1-ubyte.gz'), num_train, is_labels=True)
create_mock_mnist_file(os.path.join(temp_dir, 'train-images-idx3-ubyte.gz'), num_train, is_labels=False)
create_mock_mnist_file(os.path.join(temp_dir, 't10k-labels-idx1-ubyte.gz'), num_test, is_labels=True)
create_mock_mnist_file(os.path.join(temp_dir, 't10k-images-idx3-ubyte.gz'), num_test, is_labels=False)
ARGS = {
'path_dataset': temp_dir,
'one_hot': False
}
- 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
|
| static_size |
Ran ran on a synthesized input |
namhoonlee/spp-public/spp/helpers.py code served (permissive licence) · get_code("75427fd93ad6afdd") 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
from unittest.mock import Mock
torch.manual_seed(0)
# The function expects an object x with a .shape attribute
# that has an .as_list() method (TensorFlow-style shape)
# We need to mock this since we're in PyTorch
class MockTFShape:
def __init__(self, shape_list):
self.shape_list = shape_list
def as_list(self):
return self.shape_list
class MockTFTensor:
def __init__(self, shape_list):
self.shape = MockTFShape(shape_list)
# Test case 1: valid shape with no None values
x = MockTFTensor([2, 4, 3])
ARGS = {
"x": x
}
- 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
|
| batch_jacobian |
Not yet run unverified (harvested, no recorded run) |
namhoonlee/spp-public/spp/model.py code served (permissive licence) · get_code("c621a9782d26e315") How it ran |
| get_initializer |
Not yet run unverified (harvested, no recorded run) |
namhoonlee/spp-public/spp/network.py code served (permissive licence) · get_code("b532f60f30000832") How it ran |
| reinitialize |
Not yet run unverified (harvested, no recorded run) |
namhoonlee/spp-public/spp/model.py code served (permissive licence) · get_code("03d261d081e3c32d") How it ran |