| AJI |
Ran ran on a synthesized input |
okunator/Dippa/src/metrics/metrics.py code served (permissive licence) · get_code("70dfe5fac9f92989") 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
# Create simple labeled instance masks for testing AJI
# true: ground truth segmentation with instance IDs (0 = background)
# pred: predicted segmentation with instance IDs (0 = background)
# Create a 10x10 image with 2 instances in ground truth
true = np.zeros((10, 10), dtype=np.int32)
true[1:4, 1:4] = 1 # Instance 1
true[6:9, 6:9] = 2 # Instance 2
# Create a 10x10 predicted image with 2 instances (slightly different positions)
pred = np.zeros((10, 10), dtype=np.int32)
pred[1:5, 1:5] = 1 # Instance 1 (overlaps with true instance 1)
pred[6:8, 6:8] = 2 # Instance 2 (overlaps with true instance 2)
ARGS = {
"true": true,
"pred": pred,
}
- 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
|
| AJI_plus |
Ran ran on a synthesized input |
okunator/Dippa/src/metrics/metrics.py code served (permissive licence) · get_code("0ec0f8e9ea494c64") 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
from scipy.optimize import linear_sum_assignment
# Create sample ground truth and predicted masks
# Ground truth mask with 3 instances (labeled 1, 2, 3)
true_mask = np.zeros((10, 10), dtype=np.uint8)
true_mask[0:3, 0:3] = 1
true_mask[3:6, 3:6] = 2
true_mask[6:9, 6:9] = 3
# Predicted mask with 3 instances, with some overlap and some misalignment
pred_mask = np.zeros((10, 10), dtype=np.uint8)
pred_mask[0:4, 0:4] = 1 # Overlaps with true instance 1
pred_mask[3:7, 3:7] = 2 # Overlaps with true instances 2 and 3
pred_mask[7:10, 7:10] = 3 # Overlaps with true instance 3
ARGS = {
'true': true_mask,
'pred': pred_mask,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, scipy — 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
|
| DICE2 |
Ran ran on a synthesized input |
okunator/Dippa/src/metrics/metrics.py code served (permissive licence) · get_code("1942c4a97287927f") 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
# Create ground truth mask with labeled regions (H=4, W=3)
# Labels: 0 = background, 1 = first object, 2 = second object
true = np.array([
[0, 1, 1],
[0, 1, 2],
[2, 2, 2],
[0, 0, 0]
], dtype=np.uint8)
# Create predicted mask with similar but slightly different labeled regions
pred = np.array([
[0, 1, 1],
[0, 1, 1],
[2, 2, 2],
[0, 0, 0]
], dtype=np.uint8)
ARGS = {
"true": true,
"pred": pred,
}
- 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
|
| accuracy |
Ran ran on a synthesized input |
alexjfoote/reetoolbox/reetoolbox/metrics.py code served (permissive licence) · get_code("504d09c7575c571d") 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
from sklearn.metrics import accuracy_score
torch.manual_seed(0)
# The function expects a dict with 'labels' and 'outputs' keys
# - 'labels': ground truth labels (1D array-like)
# - 'outputs': model outputs (2D tensor, logits for each class)
# It uses torch.max(outputs, 1) to get predictions, so outputs should be 2D
# Create small tensors with batch size 2 and 4 classes
batch_size = 2
num_classes = 4
# Create random logits (outputs from model)
outputs = torch.randn(batch_size, num_classes)
# Create ground truth labels
labels = torch.tensor([1, 3])
# Construct the results dict
results = {
'labels': labels,
'outputs': outputs
}
ARGS = {
'results': results
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- sklearn, 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
|
| adversarial_accuracy |
Ran ran on a synthesized input |
alexjfoote/reetoolbox/reetoolbox/metrics.py code served (permissive licence) · get_code("f2adf71dc1102ec8") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
from sklearn.metrics import accuracy_score
torch.manual_seed(0)
# Construct a results dict with the required keys
batch_size = 2
num_classes = 4
# Create mock labels (integer class indices)
labels = np.array([0, 1])
# Create mock adversarial_outputs (logits before argmax)
# Shape: (batch_size, num_classes)
adversarial_outputs = torch.randn(batch_size, num_classes)
results = {
'labels': labels,
'adversarial_outputs': adversarial_outputs
}
ARGS = {
'results': results
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, sklearn, 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
|
| apply_transforms |
Ran ran on a synthesized input |
alexjfoote/reetoolbox/reetoolbox/trainer.py code served (permissive licence) · get_code("e45684da05f7df4a") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
import random
torch.manual_seed(0)
# Define a minimal model
class SimpleModel(nn.Module):
def __init__(self):
super().__init__()
self.linear = nn.Linear(4, 2)
def forward(self, x):
return self.linear(x)
# Define a minimal adversarial optimizer
class SimpleAdvOptimizer:
def __init__(self):
self.model = None
def optimise(self, inputs, targets, reset_weights=True):
# Return dummy loss and modified inputs
loss = torch.tensor(0.1)
modified_inputs = inputs + 0.01 * torch.randn_like(inputs)
return loss, modified_inputs
# Construct arguments
model = SimpleModel()
inputs = torch.randn(2, 4) # batch_size=2, input_dim=4
labels = torch.randint(0, 2, (2,)) # batch_size=2, 2 classes
adv_optimisers = [SimpleAdvOptimizer() for _ in range(5)]
k = 3
reset_weights = True
ARGS = {
"model": model,
"inputs": inputs,
"labels": labels,
"adv_optimisers": adv_optimisers,
"k": k,
"reset_weights": reset_weights,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| binarize |
Ran ran on a synthesized input |
okunator/Dippa/src/utils/mask_utils.py code served (permissive licence) · get_code("df537567c64fea4a") 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 int, shape (4, 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 numpy as np
# Create a small instance map with some labeled regions
# Instance maps typically contain integer labels where 0 is background
# and positive integers represent different instances/objects
inst_map = np.array([
[0, 0, 1, 1],
[0, 2, 2, 1],
[3, 2, 0, 0],
[3, 3, 0, 0]
], dtype=np.int32)
ARGS = {
"inst_map": inst_map
}
- 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 int, shape (4, 4) — shape (4, 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
|
| binary_focal_loss |
Ran ran on a synthesized input |
kaiseem/pointnu-net/losses/focal_loss.py code served (permissive licence) · get_code("241b293cb3a3c43d") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn.functional as F
torch.manual_seed(0)
# Construct arguments for binary_focal_loss
x = torch.sigmoid(torch.randn(2, 4)) # Batch size 2, 4 outputs, sigmoid to get probabilities in [0,1]
y = torch.randint(0, 2, (2, 4)).float() # Binary targets, same shape as x
ARGS = {
'x': x,
'y': y,
'alpha': 0.25,
'gamma': 2.0,
'reduction': 'none'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| check_sha1 |
Ran ran on a synthesized input |
kaiseem/pointnu-net/models/download.py code served (permissive licence) · get_code("484859bf41155745") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import hashlib
import tempfile
import os
# Create a temporary file with known content
temp_dir = tempfile.mkdtemp()
test_file = os.path.join(temp_dir, "test_file.txt")
# Write some test content to the file
test_content = b"Hello, this is test content for SHA1 hashing."
with open(test_file, 'wb') as f:
f.write(test_content)
# Calculate the actual SHA1 hash of the content
sha1 = hashlib.sha1()
sha1.update(test_content)
expected_hash = sha1.hexdigest()
# Create arguments dictionary
ARGS = {
"filename": test_file,
"sha1_hash": expected_hash
}
- 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 bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| compute_edts_forPenalizedLoss |
Ran ran on a synthesized input |
kaiseem/pointnu-net/losses/dice_loss.py code served (permissive licence) · get_code("b53ea61df431b694") 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 float, shape (2, 4, 3, 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
from scipy.ndimage import distance_transform_edt
# Create a small binary segmentation ground truth array
# Shape: (batch_size, x, y, z)
batch_size = 2
x_dim = 4
y_dim = 3
z_dim = 5
GT = np.random.randint(0, 2, size=(batch_size, x_dim, y_dim, z_dim)).astype(bool)
ARGS = {
"GT": GT
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, scipy — 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 float, shape (2, 4, 3, 5) — shape (2, 4, 3, 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
|
| draw_stuff_contours |
Ran ran on a synthesized input |
okunator/Dippa/src/utils/viz_utils.py code served (permissive licence) · get_code("42361797de298480") 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 (10, 10, 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
import cv2
# Create a small instance segmentation map (H=10, W=10)
# with instance IDs 1, 2, 3 and background 0
inst_map = np.zeros((10, 10), dtype=np.uint8)
inst_map[1:4, 1:4] = 1 # instance 1
inst_map[5:8, 5:8] = 2 # instance 2
inst_map[2:5, 6:9] = 3 # instance 3
# Create a semantic segmentation map (H=10, W=10)
# with class labels matching the instances
type_map = np.zeros((10, 10), dtype=np.uint8)
type_map[1:4, 1:4] = 1 # class 1 (epithelial)
type_map[5:8, 5:8] = 2 # class 2 (neoplastic)
type_map[2:5, 6:9] = 3 # class 3 (spindle)
# Create original image (H=10, W=10, 3 channels BGR)
image = np.ones((10, 10, 3), dtype=np.uint8) * 200
# Create classes dictionary mapping class names to integers
classes = {
'background': 0,
'epithelial': 1,
'neoplastic': 2,
'spindle': 3,
'fibroblast': 4,
'muscle': 5,
'endothelial': 6,
'connective': 7,
'dead': 8
}
ARGS = {
'inst_map': inst_map,
'image': image,
'type_map': type_map,
'classes': classes,
'fill_contours': False,
'thickness': 2
}
- 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 ndarray, ndim 3, dtype family int, shape (10, 10, 3) — shape (10, 10, 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
|
| fix_duplicates |
Ran ran on a synthesized input |
okunator/Dippa/src/utils/mask_utils.py code served (permissive licence) · get_code("b8109b79acc64068") 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 int, shape (6, 6) 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 scipy import ndimage as ndi
# Create a simple instance map with some duplicated instances
# The map contains instance IDs, with 0 being background
# We'll create a scenario where after mirror padding, some instance IDs appear in disconnected regions
inst_map = np.array([
[1, 1, 2, 2, 0, 0],
[1, 1, 2, 2, 0, 0],
[3, 3, 0, 0, 1, 1],
[3, 3, 0, 0, 1, 1],
[0, 0, 4, 4, 0, 0],
[0, 0, 4, 4, 0, 0]
], dtype=np.uint8)
ARGS = {
"inst_map": inst_map
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, scipy — 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 int, shape (6, 6) — shape (6, 6) 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_dataloader |
Ran ran on a synthesized input |
alexjfoote/reetoolbox/reetoolbox/utils.py code served (permissive licence) · get_code("8fa7bbbf062a1aad") 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
torch.manual_seed(0)
# Create a minimal dataset-like object that supports indexing and len()
class MinimalDataset:
def __init__(self, X, y):
self.X = X
self.y = y
def __len__(self):
return len(self.X)
def __getitem__(self, idx):
return (self.X[idx], self.y[idx])
# Create small tensors: batch size 2, feature dim 4, label dim 3
X = torch.randn(2, 4)
y = torch.randn(2, 3)
# Create dataset
dataset = MinimalDataset(X, y)
ARGS = {
"dataset": dataset,
"n": 2,
"batch_size": 1,
"num_workers": 0,
"shuffle": False
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type 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
|
| get_model_file |
Ran ran on a synthesized input |
kaiseem/pointnu-net/models/model_store.py code served (permissive licence) · get_code("4bf53b623193a6f7") 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 os
import tempfile
import shutil
# Create a temporary directory to serve as the root
temp_dir = tempfile.mkdtemp()
# Create the models subdirectory
models_dir = os.path.join(temp_dir, '.torch', 'models')
os.makedirs(models_dir, exist_ok=True)
# Create a dummy model file
model_name = 'test_model'
model_file_path = os.path.join(models_dir, model_name + '.pth')
with open(model_file_path, 'w') as f:
f.write('')
ARGS = {
'name': 'test_model',
'root': os.path.join(temp_dir, '.torch', 'models')
}
- 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 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_resnet_file |
Ran ran on a synthesized input |
kaiseem/pointnu-net/models/model_store.py code served (permissive licence) · get_code("420ae9a3239bb203") 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 os
import zipfile
import tempfile
from unittest.mock import patch, MagicMock
# We need to mock the functions that would require network/file I/O
def mock_check_sha1(file_path, sha1_hash):
"""Mock function that always returns True"""
return True
def mock_download(url, path, overwrite):
"""Mock function that creates a dummy zip file"""
# Create a minimal valid .pth file
os.makedirs(os.path.dirname(path), exist_ok=True)
with zipfile.ZipFile(path, 'w') as zf:
# Create a dummy model file inside the zip
zf.writestr('resnet50-25c4b50.pth', b'dummy model content')
# Patch the functions before defining ARGS
import sys
current_module = sys.modules[__name__]
setattr(current_module, 'check_sha1', mock_check_sha1)
setattr(current_module, 'download', mock_download)
# Create a temporary directory for the model cache
temp_dir = tempfile.mkdtemp()
ARGS = {
'name': 'resnet50',
'root': temp_dir
}
- 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 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
|
| iou |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
kaiseem/pointnu-net/losses/lovasz_losses.py code served (permissive licence) · get_code("d94639b28b2134ff") 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 (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 numpy as np
import torch
torch.manual_seed(0)
# Construct valid arguments for the iou function
# preds: prediction array/tensor with class indices
# labels: ground truth array/tensor with class indices
# C: number of classes
# EMPTY: value to return for empty unions (default 1.0)
# ignore: class index to ignore (default None)
# per_image: whether to compute per-image IoU (default False)
# Create small prediction and label arrays
# Using shape (2, 4) - batch of 2, spatial dimension of 4
preds = np.array([[0, 1, 2, 3],
[1, 2, 0, 1]], dtype=np.int64)
labels = np.array([[0, 1, 1, 3],
[1, 2, 2, 1]], dtype=np.int64)
# Number of classes
C = 4
# EMPTY value for classes with no union
EMPTY = 1.0
# Class to ignore during computation
ignore = None
# Whether to compute per-image IoU
per_image = False
ARGS = {
"preds": preds,
"labels": labels,
"C": C,
"EMPTY": EMPTY,
"ignore": ignore,
"per_image": per_image
}
- 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 ndarray, ndim 1, dtype family float, shape (4,) — shape (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
|
| iou_binary |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
kaiseem/pointnu-net/losses/lovasz_losses.py code served (permissive licence) · get_code("1211530cd527bd0b") 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 numpy as np
def isnan(x):
return x != x
def mean(l, ignore_nan=False, empty=0):
"""
nanmean compatible with generators.
"""
l = iter(l)
if ignore_nan:
from itertools import filterfalse
l = filterfalse(isnan, l)
try:
n = 1
acc = next(l)
except StopIteration:
if empty == 'raise':
raise ValueError('Empty mean')
return empty
for n, v in enumerate(l, 2):
acc += v
if n == 1:
return acc
return acc / n
def iou_binary(preds, labels, EMPTY=1.0, ignore=None, per_image=True):
"""
IoU for foreground class
binary: 1 foreground, 0 background
"""
if not per_image:
preds, labels = ((preds,), (labels,))
ious = []
for pred, label in zip(preds, labels):
intersection = ((label == 1) & (pred == 1)).sum()
union = ((label == 1) | (pred == 1) & (label != ignore)).sum()
if not union:
iou = EMPTY
else:
iou = float(intersection) / float(union)
ious.append(iou)
iou = mean(ious)
return 100 * iou
# Setup code
np.random.seed(0)
# Create small prediction and label arrays for binary segmentation
# Shape: (height=4, width=3) for two images
preds_img1 = np.array([[0, 1, 1],
[1, 1, 0],
[0, 1, 1],
[1, 0, 0]], dtype=np.int32)
labels_img1 = np.array([[0, 1, 0],
[1, 1, 1],
[0, 1, 0],
[1, 0, 1]], dtype=np.int32)
preds_img2 = np.array([[1, 1, 0],
[0, 1, 1],
[1, 1, 0],
[0, 0, 1]], dtype=np.int32)
labels_img2 = np.array([[1, 0, 0],
[0, 1, 1],
[1, 0, 0],
[0, 1, 1]], dtype=np.int32)
# Arguments for iou_binary function
ARGS = {
'preds': np.array([preds_img1, preds_img2]),
'labels': np.array([labels_img1, labels_img2]),
'EMPTY': 1.0,
'ignore': 0,
'per_image': True,
}
- 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 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
|
| label_patch |
Ran ran on a synthesized input |
alexjfoote/reetoolbox/reetoolbox/utils.py code served (permissive licence) · get_code("9b00b93154e766c2") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
torch.manual_seed(0)
# Analyzing the function:
# - patch: used as-is, returned as first element of tuple. Could be any object.
# - count: accessed with count[0], compared with integers (>=5, ==0). Must be indexable.
# Creating valid arguments:
patch = torch.randn(2, 4) # Small tensor as patch
count = [7] # List with count[0] >= 5, will trigger first condition
ARGS = {
"patch": patch,
"count": count
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — a tuple output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| load_resnet |
Ran ran on a synthesized input |
alexjfoote/reetoolbox/reetoolbox/utils.py code served (permissive licence) · get_code("e7a3997691bd97d3") 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 ResNet. 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
from torchvision import models
import tempfile
import os
torch.manual_seed(0)
# Create a temporary model file to load from
temp_dir = tempfile.mkdtemp()
model_path = os.path.join(temp_dir, "test_model.pt")
# Create a dummy ResNet18 model with the expected structure
dummy_model = models.resnet18(pretrained=False)
dummy_model.fc = nn.Sequential(
nn.Linear(512, 2),
nn.LogSoftmax(dim=1)
)
# Save the model state dict
torch.save(dummy_model.state_dict(), model_path)
ARGS = {
'model_path': model_path,
'n_classes': 2,
'hidden_size': 512,
'pretrained': False,
'device': 'cpu'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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
|
| lovasz_grad |
Ran ran, violated the contract we drafted |
kaiseem/pointnu-net/losses/lovasz_losses.py code served (permissive licence) · get_code("e85b5d21dc5b8382") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 1, dtype family float, shape (4,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
torch.manual_seed(0)
# gt_sorted should be a 1D tensor of binary/boolean values
# representing ground truth sorted by some error metric
# The function expects a tensor with sum(), float(), cumsum() methods
gt_sorted = torch.tensor([0, 0, 1, 1], dtype=torch.long)
ARGS = {
"gt_sorted": gt_sorted
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Tensor, ndim 1, dtype family float, shape (4,) — shape (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
|
| make_one_hot |
Ran ran on a synthesized input |
kaiseem/pointnu-net/losses/dice_loss.py code served (permissive licence) · get_code("f93cd0d2bb2e4795") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (1, 4, 3, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
torch.manual_seed(0)
# Create a small input tensor of shape [N, 1, *]
# N=2 (batch size), 1 (channel dimension), and spatial dims [3, 4]
input_tensor = torch.tensor([[[[0, 1, 2, 1],
[3, 0, 1, 2],
[1, 2, 0, 3]]]], dtype=torch.long)
# num_classes: the maximum class index is 3, so we need at least 4 classes
num_classes = 4
ARGS = {
"input": input_tensor,
"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, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Tensor, ndim 4, dtype family float, shape (1, 4, 3, 4) — shape (1, 4, 3, 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
|
| normalize |
Ran ran on a synthesized input |
okunator/Dippa/src/utils/img_utils.py code served (permissive licence) · get_code("247e39ae4944e031") 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 float, shape (4, 3, 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 test image with HWC format
np.random.seed(0)
img_hwc = np.random.randn(4, 3, 2).astype(np.float32) * 10 + 50 # Height=4, Width=3, Channels=2
# Create a small test image with CHW format
img_chw = np.random.randn(2, 4, 3).astype(np.float32) * 10 + 50 # Channels=2, Height=4, Width=3
ARGS = {
"img": img_hwc,
"channels": "HWC",
"standardize": True
}
- 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 3, dtype family float, shape (4, 3, 2) — shape (4, 3, 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
|
| numericalSort |
Ran ran; our contract draft was wrong, not the code |
this paper's copy was not recorded; identical code first harvested from rr-learning/disentanglement_dataset pointer only; the stored copy get_code serves, from rr-learning/disentanglement_dataset, is pointer only (licence: CC-BY-4.0) · get_code("d39d1cd46009e948") How it ranThe body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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. |
| percentile_normalize |
Ran ran on a synthesized input |
okunator/Dippa/src/utils/img_utils.py code served (permissive licence) · get_code("dc269540663f3fb7") 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 float, shape (4, 3, 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
np.random.seed(0)
# Create a small test image with HWC format
# Height=4, Width=3, Channels=2
img_hwc = np.random.rand(4, 3, 2).astype(np.float32) * 255
ARGS = {
'img': img_hwc,
'channels': 'HWC'
}
- 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 3, dtype family float, shape (4, 3, 2) — shape (4, 3, 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
|
| percentile_normalize_and_clamp |
Ran ran on a synthesized input |
okunator/Dippa/src/utils/img_utils.py code served (permissive licence) · get_code("12218d17d813eb74") 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 float, shape (4, 3, 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 test image with shape (H, W, C)
# Using distinct dimensions: H=4, W=3, C=2
np.random.seed(0)
im = np.random.randn(4, 3, 2) * 100 # Scale up to have meaningful percentiles
ARGS = {
"im": im,
"a_min": -1,
"a_max": 1,
}
- 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 3, dtype family float, shape (4, 3, 2) — shape (4, 3, 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
|
| poly2mask |
Ran ran on a synthesized input |
okunator/Dippa/src/utils/save_utils.py code served (permissive licence) · get_code("ac05aad67c119188") 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 (20, 20) 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 simple polygon contour (exterior coordinates)
# This represents a simple square polygon with 5 points (closed polygon)
contour = np.array([
[0, 0],
[10, 0],
[10, 10],
[0, 10],
[0, 0]
], dtype=np.float64)
# Define the shape of the output mask (height, width)
shape = (20, 20)
# Define optional offsets
x_off = 0
y_off = 0
ARGS = {
"contour": contour,
"shape": shape,
"x_off": x_off,
"y_off": y_off,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, skimage — 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 (20, 20) — shape (20, 20) 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
|
| reduce_loss |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
kaiseem/pointnu-net/losses/generalise_focal_loss.py code served (permissive licence) · get_code("93358ba7aa223343") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn.functional as F
torch.manual_seed(0)
# Create a small elementwise loss tensor
loss = torch.randn(2, 4)
# Test with different reduction modes
ARGS = {
"loss": loss,
"reduction": "mean"
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Tensor, ndim 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
|
| remove_small_objects |
Ran ran on a synthesized input |
okunator/Dippa/src/utils/mask_utils.py code served (permissive licence) · get_code("15b380d239dc63a4") 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 (3, 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
from scipy import ndimage as ndi
# Create a simple labeled array with some small and large objects
ar = np.array([[0, 0, 0, 1, 0],
[1, 1, 1, 0, 0],
[1, 1, 1, 0, 1]], dtype=np.int32)
# Alternative: boolean array
ar_bool = np.array([[0, 0, 0, 1, 0],
[1, 1, 1, 0, 0],
[1, 1, 1, 0, 1]], dtype=bool)
# Create output array for out parameter
out_array = np.zeros_like(ar, dtype=np.int32)
ARGS = {
'ar': ar_bool,
'min_size': 64,
'connectivity': 1,
'in_place': False,
'out': None
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, scipy — 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 (3, 5) — shape (3, 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
|
| rmse |
Ran ran on a synthesized input |
alexjfoote/reetoolbox/reetoolbox/metrics.py code served (permissive licence) · get_code("30f91c811cbc554f") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 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 rmse function takes a single parameter 'a' which is used with:
# - torch.pow(a, 2) - element-wise squaring
# - torch.mean() - computing mean
# - torch.sqrt() - square root
# So 'a' should be a tensor
a = torch.randn(2, 4)
ARGS = {
"a": a
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Tensor, ndim 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
|
| run_val |
Ran ran on a synthesized input |
alexjfoote/reetoolbox/reetoolbox/trainer.py code served (permissive licence) · get_code("db1bae643c60dd31") 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. 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 and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
torch.manual_seed(0)
# Build a minimal model that works with the function
class SimpleClassifier(nn.Module):
def __init__(self, num_classes=3):
super().__init__()
self.linear = nn.Linear(4, num_classes)
def forward(self, x):
return self.linear(x)
# Build a minimal data loader (list of batches)
inputs_1 = torch.randn(2, 4)
labels_1 = torch.tensor([0, 1])
inputs_2 = torch.randn(2, 4)
labels_2 = torch.tensor([2, 0])
loader = [(inputs_1, labels_1), (inputs_2, labels_2)]
# Build model and criterion
model = SimpleClassifier(num_classes=3)
criterion = nn.CrossEntropyLoss()
ARGS = {
'model': model,
'loader': loader,
'criterion': criterion,
'device': 'cpu'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| short_hash |
Ran ran; our contract draft was wrong, not the code |
kaiseem/pointnu-net/models/model_store.py code served (permissive licence) · get_code("77bc65d2018e9d9e") 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
# The function short_hash takes a 'name' parameter and looks it up in _model_sha1
# It checks if the name exists in the dictionary, and if so, returns the first 8 characters of the checksum
ARGS = {
'name': 'resnet50'
}
- 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
|
| stack_prediction |
Ran ran on a synthesized input |
kaiseem/pointnu-net/infer_pannuke.py code served (permissive licence) · get_code("274a4c2795ca8dd4") 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 float, shape (256, 256, 6) 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
# Construct seg_masks: list of 2D numpy arrays (256x256), each representing a segmentation mask
# The function zips these with cate_labels, so we need matching lengths
seg_masks = [
np.random.rand(256, 256).astype(np.float32),
np.random.rand(256, 256).astype(np.float32),
np.random.rand(256, 256).astype(np.float32),
]
# Construct cate_labels: list of category labels (integers 0-4, NOT 5 as per assertion)
cate_labels = [0, 1, 2]
ARGS = {
"seg_masks": seg_masks,
"cate_labels": cate_labels,
}
- 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 3, dtype family float, shape (256, 256, 6) — shape (256, 256, 6) 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
|
| training_bout |
Ran ran on a synthesized input |
alexjfoote/reetoolbox/reetoolbox/trainer.py code served (permissive licence) · get_code("d6bd6ff6fe6aad52") 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 copy
torch.manual_seed(0)
# Define a minimal model
class SimpleModel(nn.Module):
def __init__(self):
super(SimpleModel, self).__init__()
self.fc = nn.Linear(4, 3)
def forward(self, x):
return self.fc(x)
# Define a minimal attack class
class SimpleAttack:
def __init__(self):
self.model = None
def optimise(self, inputs, targets, reset_weights=True):
# Return a tuple of (something, adversarial_inputs)
return (None, inputs.clone())
# Create data loaders as lists of (inputs, labels) tuples
def create_loader(num_batches=2, batch_size=2, input_dim=4, num_classes=3):
loader = []
for _ in range(num_batches):
inputs = torch.randn(batch_size, input_dim)
labels = torch.randint(0, num_classes, (batch_size,))
loader.append((inputs, labels))
return loader
# Instantiate components
model = SimpleModel()
train_loader = create_loader(num_batches=2, batch_size=2, input_dim=4, num_classes=3)
val_loader = create_loader(num_batches=2, batch_size=2, input_dim=4, num_classes=3)
criterion = nn.CrossEntropyLoss()
optimizer = torch.optim.SGD(model.parameters(), lr=0.01)
attack = SimpleAttack()
# Define arguments dictionary
ARGS = {
'model': model,
'train_loader': train_loader,
'val_loader': val_loader,
'optimizer': optimizer,
'criterion': criterion,
'adversarial': False,
'attacks': [],
'epochs': 2,
'm': 1,
'last_n': 1,
'k': 2,
'device': 'cpu'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — a tuple output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| untargeted_loss |
Ran ran on a synthesized input |
alexjfoote/reetoolbox/reetoolbox/optimisers.py code served (permissive licence) · get_code("432e211219845a2b") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 1, dtype family float, 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 torch
torch.manual_seed(0)
# outputs: a tensor that will be indexed with .gather(1, ...)
# The gather operation gathers values from dimension 1 using indices from labels
# outputs should have shape (batch_size, num_classes)
outputs = torch.randn(2, 4)
# labels: indices to gather from outputs along dimension 1
# labels should have shape (batch_size,) with values in range [0, num_classes)
labels = torch.tensor([0, 2])
ARGS = {
"outputs": outputs,
"labels": labels,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Tensor, ndim 1, dtype family float, 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
|
| weight_reduce_loss |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
kaiseem/pointnu-net/losses/generalise_focal_loss.py code served (permissive licence) · get_code("8553862254d49840") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn.functional as F
torch.manual_seed(0)
# Create tiny tensors for the function parameters
loss_tensor = torch.randn(2, 4) # Elementwise loss tensor
weight_tensor = torch.ones(2, 4) # Element-wise weights
ARGS = {
'loss': loss_tensor,
'weight': weight_tensor,
'reduction': 'mean',
'avg_factor': None
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Tensor, ndim 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
|
| download |
Not yet run unverified (harvested, no recorded run) |
kaiseem/pointnu-net/models/download.py code served (permissive licence) · get_code("8faa1b60508d7b44") How it ran |
| draw_thing_contours |
Not yet run unverified (harvested, no recorded run) |
okunator/Dippa/src/utils/viz_utils.py code served (permissive licence) · get_code("5c30f53f7cde0bda") How it ran |
| quality_focal_loss |
Not yet run unverified (harvested, no recorded run) |
kaiseem/pointnu-net/losses/generalise_focal_loss.py code served (permissive licence) · get_code("e5457e2f64864dd0") How it ran |
| targeted_loss |
Not yet run unverified (harvested, no recorded run) |
alexjfoote/reetoolbox/reetoolbox/optimisers.py code served (permissive licence) · get_code("21780435c6ca1913") How it ran |
| viz_patches |
Not yet run unverified (harvested, no recorded run) |
okunator/Dippa/src/patching/viz_patches.py code served (permissive licence) · get_code("86befdff7aeeaec4") How it ran |