| compute_roc_curve |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
hanlinm2/projective-geometry/prequalifier/prequalifier_test_helpers.py code served (permissive licence) · get_code("a026c2d9978681cf") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
# Construct arguments for compute_roc_curve
# The function expects:
# - all_labels: binary labels (0 or 1)
# - all_generated_probs: probability scores for the positive class
# Create small binary classification data
np.random.seed(0)
# Binary labels: array of 0s and 1s
all_labels = np.array([0, 1, 1, 0, 1, 0, 1, 1])
# Generated probabilities: scores between 0 and 1
all_generated_probs = np.array([0.1, 0.9, 0.8, 0.2, 0.7, 0.3, 0.6, 0.85])
ARGS = {
"all_labels": all_labels,
"all_generated_probs": all_generated_probs,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, sklearn — 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
|
| create_model |
Ran ran; our contract draft was wrong, not the code |
hanlinm2/projective-geometry/line_segment/lines_model.py code served (permissive licence) · get_code("a945396ca0b16803") 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 ClassificationPointNet. 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
torch.manual_seed(0)
ARGS = {
"target_device": torch.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 ClassificationPointNet — a ClassificationPointNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ClassificationPointNet 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
|
| create_model |
Ran ran; our contract draft was wrong, not the code |
hanlinm2/projective-geometry/perspective_fields/fields_model.py code served (permissive licence) · get_code("f3c36d02045cfbc2") 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 FieldsClassifier. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
from torchvision.models import resnet50
torch.manual_seed(0)
target_device = torch.device('cpu')
ARGS = {
'target_device': target_device
}
- 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 FieldsClassifier — a FieldsClassifier output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a FieldsClassifier 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
|
| evaluate_on_dataloader |
Ran ran; our contract draft was wrong, not the code |
hanlinm2/projective-geometry/prequalifier/prequalifier_test_helpers.py code served (permissive licence) · get_code("949786004f8eb80c") 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
torch.manual_seed(0)
# Create a simple binary classification model
class SimpleClassifier(nn.Module):
def __init__(self, input_dim=4, num_classes=2):
super(SimpleClassifier, self).__init__()
self.fc = nn.Linear(input_dim, num_classes)
def forward(self, x):
return self.fc(x)
# Instantiate the model
model = SimpleClassifier(input_dim=4, num_classes=2)
# Create a simple dataloader as a list of (images, labels) tuples
# Each image is a tensor of shape (batch_size, 4)
# Each labels tensor contains class indices (0 or 1)
test_dataloader = [
(torch.randn(2, 4), torch.tensor([0, 1])),
(torch.randn(2, 4), torch.tensor([1, 0])),
]
ARGS = {
'model': model,
'test_dataloader': test_dataloader,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — 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
|
| get_recent_timestamp_dataloaders |
Ran ran; our contract draft was wrong, not the code |
hanlinm2/projective-geometry/prequalifier/prequalifier_dataset.py code served (permissive licence) · get_code("eb72ead7b49746e2") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torchvision.transforms as transforms
import math
from PIL import Image
import io
import numpy as np
from torch.utils.data import Dataset, DataLoader
import random
import tempfile
import os
torch.manual_seed(0)
np.random.seed(0)
# Create temporary test images
temp_dir = tempfile.mkdtemp()
# Create a simple test image
test_image = Image.new('RGB', (256, 256), color=(73, 109, 137))
# Create directory structure for dataset
real_dir = os.path.join(temp_dir, 'real')
fake_dir = os.path.join(temp_dir, 'fake')
os.makedirs(real_dir, exist_ok=True)
os.makedirs(fake_dir, exist_ok=True)
# Save test images
for i in range(2):
test_image.save(os.path.join(real_dir, f'img_{i}.jpg'))
test_image.save(os.path.join(fake_dir, f'img_{i}.jpg'))
# Prepare paths and class mapping
recent_timestamp_paths = {
'timestamp_1': [
os.path.join(real_dir, 'img_0.jpg'),
os.path.join(real_dir, 'img_1.jpg'),
],
'timestamp_2': [
os.path.join(fake_dir, 'img_0.jpg'),
os.path.join(fake_dir, 'img_1.jpg'),
]
}
class_to_idx = {
'real': 0,
'fake': 1
}
ARGS = {
'recent_timestamp_paths': recent_timestamp_paths,
'class_to_idx': class_to_idx
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- PIL, numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_test_dataloaders |
Ran ran; our contract draft was wrong, not the code |
hanlinm2/projective-geometry/line_segment/lines_dataset.py code served (permissive licence) · get_code("7240b9840ca5e27e") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
from torch.utils.data import Dataset, DataLoader
torch.manual_seed(0)
np.random.seed(0)
# Create minimal test data
class_to_idx = {'class_a': 0, 'class_b': 1}
# Create image paths with class structure (mimics "path/to/class_name/image.jpg")
test_image_paths = [
'path/to/class_a/img1.jpg',
'path/to/class_a/img2.jpg',
'path/to/class_b/img3.jpg',
'path/to/class_b/img4.jpg',
'path/to/class_a/img5.jpg',
]
unconfident_image_paths = [
'path/to/class_a/img1.jpg',
'path/to/class_b/img3.jpg',
]
misclassified_image_paths = [
'path/to/class_b/img4.jpg',
]
# Create image_path_to_lines mapping
# Each entry should have shape (N, 4) where N is number of line segments
image_path_to_lines = {
'path/to/class_a/img1.jpg': np.random.rand(10, 4).astype(np.float32),
'path/to/class_a/img2.jpg': np.random.rand(15, 4).astype(np.float32),
'path/to/class_b/img3.jpg': np.random.rand(8, 4).astype(np.float32),
'path/to/class_b/img4.jpg': np.random.rand(12, 4).astype(np.float32),
'path/to/class_a/img5.jpg': np.random.rand(20, 4).astype(np.float32),
}
ARGS = {
'test_image_paths': test_image_paths,
'unconfident_image_paths': unconfident_image_paths,
'misclassified_image_paths': misclassified_image_paths,
'image_path_to_lines': image_path_to_lines,
'class_to_idx': class_to_idx,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_test_dataloaders |
Ran ran; our contract draft was wrong, not the code |
hanlinm2/projective-geometry/perspective_fields/fields_dataset.py code served (permissive licence) · get_code("a52857a6650be07a") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
from torch.utils.data import Dataset, DataLoader
torch.manual_seed(0)
# Create mock field data that will be "loaded" from paths
mock_fields = {}
def create_mock_field():
return {
'pred_latitude_original': torch.randn(4, 3),
'pred_gravity_original': torch.randn(5, 4, 3)
}
# Patch torch.load to return mock fields
original_load = torch.load
def mock_load(path):
if path not in mock_fields:
mock_fields[path] = create_mock_field()
return mock_fields[path]
torch.load = mock_load
# Create test image paths with proper structure
test_image_paths = [
"../dataset/test_Images/dir1/class_a/0.jpg",
"../dataset/test_Images/dir1/class_a/1.jpg",
"../dataset/test_Images/dir1/class_b/2.jpg",
"../dataset/test_Images/dir1/class_b/3.jpg",
"../dataset/test_Images/dir1/class_a/4.jpg",
]
unconfident_image_paths = [
"../dataset/test_Images/dir1/class_a/0.jpg",
"../dataset/test_Images/dir1/class_b/2.jpg",
]
misclassified_image_paths = [
"../dataset/test_Images/dir1/class_a/4.jpg",
]
class_to_idx = {
"class_a": 0,
"class_b": 1,
}
ARGS = {
"test_image_paths": test_image_paths,
"unconfident_image_paths": unconfident_image_paths,
"misclassified_image_paths": misclassified_image_paths,
"class_to_idx": class_to_idx,
}
- 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
|
| get_test_dataloaders |
Ran ran; our contract draft was wrong, not the code |
hanlinm2/projective-geometry/prequalifier/prequalifier_dataset.py code served (permissive licence) · get_code("627f7f54e5d786a4") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
from PIL import Image
import io
import random
import tempfile
import os
torch.manual_seed(0)
np.random.seed(0)
random.seed(0)
# Create temporary directory with minimal test images
temp_dir = tempfile.mkdtemp()
# Create minimal RGB images and save them
def create_test_image(path):
"""Create a minimal 256x256 RGB image"""
img_array = np.random.randint(0, 255, (256, 256, 3), dtype=np.uint8)
img = Image.fromarray(img_array, 'RGB')
img.save(path)
# Create directory structure for test images
real_dir = os.path.join(temp_dir, 'real')
fake_dir = os.path.join(temp_dir, 'fake')
os.makedirs(real_dir, exist_ok=True)
os.makedirs(fake_dir, exist_ok=True)
# Create test images
test_image_paths = []
unconfident_image_paths = []
misclassified_image_paths = []
for i in range(20):
if i < 10:
path = os.path.join(real_dir, f'img_{i}.jpg')
test_image_paths.append(path)
elif i < 15:
path = os.path.join(real_dir, f'img_{i}.jpg')
unconfident_image_paths.append(path)
else:
path = os.path.join(real_dir, f'img_{i}.jpg')
misclassified_image_paths.append(path)
create_test_image(path)
for i in range(20, 25):
path = os.path.join(fake_dir, f'img_{i}.jpg')
test_image_paths.append(path)
create_test_image(path)
# Class mapping
class_to_idx = {
'real': 0,
'fake': 1
}
ARGS = {
'test_image_paths': test_image_paths,
'unconfident_image_paths': unconfident_image_paths,
'misclassified_image_paths': misclassified_image_paths,
'class_to_idx': class_to_idx
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- PIL, numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_train_dataloaders |
Ran ran; our contract draft was wrong, not the code |
hanlinm2/projective-geometry/line_segment/lines_dataset.py code served (permissive licence) · get_code("6e612f3f3508395b") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
torch.manual_seed(0)
np.random.seed(0)
# Create small mock data
num_train_images = 2
num_val_images = 2
num_classes = 3
# Create image paths with class labels embedded in the path
train_image_paths = [
"data/class_0/train_img_0.jpg",
"data/class_1/train_img_1.jpg",
]
val_image_paths = [
"data/class_2/val_img_0.jpg",
"data/class_0/val_img_1.jpg",
]
# Create class to index mapping
class_to_idx = {
"class_0": 0,
"class_1": 1,
"class_2": 2,
}
# Create image_path_to_lines dictionary
# Each image maps to a numpy array of line segments (shape: [num_lines, 4])
# 4 represents line endpoints (x1, y1, x2, y2)
image_path_to_lines = {}
for path in train_image_paths:
num_lines = np.random.randint(100, 200)
image_path_to_lines[path] = np.random.randn(num_lines, 4).astype(np.float32)
for path in val_image_paths:
num_lines = np.random.randint(100, 200)
image_path_to_lines[path] = np.random.randn(num_lines, 4).astype(np.float32)
ARGS = {
"train_image_paths": train_image_paths,
"val_image_paths": val_image_paths,
"image_path_to_lines": image_path_to_lines,
"class_to_idx": class_to_idx,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_train_dataloaders |
Ran ran; our contract draft was wrong, not the code |
hanlinm2/projective-geometry/perspective_fields/fields_dataset.py code served (permissive licence) · get_code("59469a924d17ca67") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
from torch.utils.data import Dataset, DataLoader
torch.manual_seed(0)
# Create mock image paths that match the expected directory structure
# The function expects paths like: ../dataset/{dataset_type}/{directory}/{identifier}/{number}.{ext}
train_image_paths = [
"../dataset/train/dir1/class_A/image_0.jpg",
"../dataset/train/dir1/class_A/image_1.jpg",
]
val_image_paths = [
"../dataset/val/dir1/class_B/image_0.jpg",
"../dataset/val/dir1/class_B/image_1.jpg",
]
# Class mapping
class_to_idx = {
"class_A": 0,
"class_B": 1,
}
# Mock the torch.load to return field data with the expected structure
import os
import tempfile
# Create temporary directory structure and mock field files
temp_dir = tempfile.mkdtemp()
def create_mock_field_file(field_path):
os.makedirs(os.path.dirname(field_path), exist_ok=True)
field_data = {
'pred_latitude_original': torch.randn(1, 4, 3), # (1, 4, 3)
'pred_gravity_original': torch.randn(2, 4, 3), # (2, 4, 3) - 2 gravity maps
}
torch.save(field_data, field_path)
# Patch torch.load to return mock data
original_load = torch.load
def mock_load(path, *args, **kwargs):
if path.endswith('.pt'):
return {
'pred_latitude_original': torch.randn(1, 4, 3),
'pred_gravity_original': torch.randn(2, 4, 3),
}
return original_load(path, *args, **kwargs)
torch.load = mock_load
ARGS = {
"train_image_paths": train_image_paths,
"val_image_paths": val_image_paths,
"class_to_idx": class_to_idx,
}
- 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
|
| load_all_paths |
Ran ran; our contract draft was wrong, not the code |
hanlinm2/projective-geometry/line_segment/lines_path_helpers.py code served (permissive licence) · get_code("f6bbfd4b67f32c83") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import os
import tempfile
import glob
from pandas.core.common import flatten
# Create a temporary directory structure that mimics the expected layout
temp_dir = tempfile.mkdtemp()
# Create mock directory structure
base_path = temp_dir + "/"
data_subdir = "dataset1/"
full_data_path = os.path.join(base_path, data_subdir)
# Create train/val/test subdirectories with sample files
os.makedirs(os.path.join(full_data_path, "train", "class1"), exist_ok=True)
os.makedirs(os.path.join(full_data_path, "train", "class2"), exist_ok=True)
os.makedirs(os.path.join(full_data_path, "val", "class1"), exist_ok=True)
os.makedirs(os.path.join(full_data_path, "val", "class2"), exist_ok=True)
os.makedirs(os.path.join(full_data_path, "test", "class1"), exist_ok=True)
os.makedirs(os.path.join(full_data_path, "test", "class2"), exist_ok=True)
# Create dummy files
open(os.path.join(full_data_path, "train", "class1", "file1.txt"), "w").close()
open(os.path.join(full_data_path, "train", "class2", "file2.txt"), "w").close()
open(os.path.join(full_data_path, "val", "class1", "file3.txt"), "w").close()
open(os.path.join(full_data_path, "val", "class2", "file4.txt"), "w").close()
open(os.path.join(full_data_path, "test", "class1", "file5.txt"), "w").close()
open(os.path.join(full_data_path, "test", "class2", "file6.txt"), "w").close()
ARGS = {
"base_path": base_path,
"data_paths": [data_subdir]
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- pandas — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple, ndim 2, dtype family float — a tuple output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| load_model |
Ran ran; our contract draft was wrong, not the code |
hanlinm2/projective-geometry/line_segment/lines_model.py code served (permissive licence) · get_code("6b419f2ecfa7997a") 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 ClassificationPointNet. 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 tempfile
import os
torch.manual_seed(0)
# Create a temporary checkpoint file with a valid state dict
temp_dir = tempfile.mkdtemp()
checkpoint_path = os.path.join(temp_dir, "model_checkpoint.pt")
# Create a dummy model and save its state dict
dummy_model = nn.Linear(256, 10)
torch.save(dummy_model.state_dict(), checkpoint_path)
# However, we need to save a ClassificationPointNet state dict instead
# Let's create the correct model and save it
model_to_save = nn.Module() # Create a minimal state dict compatible with load_model expectations
# Actually, let's just create an empty dict that won't cause issues
torch.save({}, checkpoint_path)
ARGS = {
'target_device': 'cpu',
'path_to_checkpoint': checkpoint_path
}
- 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 ClassificationPointNet — a ClassificationPointNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ClassificationPointNet output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| load_model |
Ran ran; our contract draft was wrong, not the code |
hanlinm2/projective-geometry/perspective_fields/fields_model.py code served (permissive licence) · get_code("bde9121fab9d6344") 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 FieldsClassifier. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
from torchvision.models import resnet50
import tempfile
import os
torch.manual_seed(0)
# Create a temporary checkpoint file
temp_dir = tempfile.gettempdir()
checkpoint_path = os.path.join(temp_dir, "test_checkpoint.pth")
# Create and save a minimal model state dict
model = nn.Module()
model_state = {
'resnet.conv1.weight': torch.randn(64, 3, 7, 7),
'resnet.bn1.weight': torch.randn(64),
'resnet.bn1.bias': torch.randn(64),
'resnet.bn1.running_mean': torch.randn(64),
'resnet.bn1.running_var': torch.randn(64),
'resnet.bn1.num_batches_tracked': torch.tensor(0),
'resnet.fc.weight': torch.randn(2, 2048),
'resnet.fc.bias': torch.randn(2),
}
torch.save(model_state, checkpoint_path)
ARGS = {
'target_device': 'cpu',
'path_to_checkpoint': checkpoint_path,
}
- 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 FieldsClassifier — a FieldsClassifier output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a FieldsClassifier output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| load_outdoor_problem_paths |
Ran ran; our contract draft was wrong, not the code |
hanlinm2/projective-geometry/line_segment/lines_path_helpers.py code served (permissive licence) · get_code("c56c6c235242c726") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import os
import pickle
import tempfile
# Create a temporary directory and a mock pickle file
temp_dir = tempfile.mkdtemp()
mock_problem_paths = [
'/path/to/problem1.txt',
'/path/to/problem2.txt',
'/path/to/problem3.txt'
]
pickle_file_path = os.path.join(temp_dir, 'all_outdoor_problem_paths.pkl')
with open(pickle_file_path, 'wb') as f:
pickle.dump(mock_problem_paths, f)
ARGS = {
'base_path': 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 list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| load_recent_timestamp_paths |
Ran ran; our contract draft was wrong, not the code |
hanlinm2/projective-geometry/prequalifier/prequalifier_path_helpers.py code served (permissive licence) · get_code("f372edd1805aaa57") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import glob
import tempfile
import os
# Create a temporary directory structure to simulate the data paths
temp_dir = tempfile.mkdtemp()
# Create mock directory structure for indoor data
indoor_dir = os.path.join(temp_dir, 'indoor_dataset1', 'test', 'subdir1', 'subdir2')
os.makedirs(indoor_dir, exist_ok=True)
# Create a dummy file
open(os.path.join(indoor_dir, 'file1.txt'), 'w').close()
# Create mock directory structure for outdoor data
outdoor_dir = os.path.join(temp_dir, 'outdoor_dataset1', 'test', 'subdir1', 'subdir2')
os.makedirs(outdoor_dir, exist_ok=True)
# Create a dummy file
open(os.path.join(outdoor_dir, 'file2.txt'), 'w').close()
# Set up arguments for the function
ARGS = {
'base_path': temp_dir,
'recent_timestamp_data_paths': ['indoor_dataset1', 'outdoor_dataset1'],
'category': 'indoor'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- pandas — 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
|
| remove_problem_paths |
Ran ran; our contract draft was wrong, not the code |
hanlinm2/projective-geometry/line_segment/lines_path_helpers.py code served (permissive licence) · get_code("45dd68d819a5dbf6") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import os
import pickle
import tempfile
# Create a temporary directory and pickle file for testing
temp_dir = tempfile.mkdtemp()
all_problem_paths = [
'path/to/outdoor/problem/1.txt',
'path/to/outdoor/problem/2.txt',
'path/to/outdoor/problem/3.txt'
]
pkl_path = os.path.join(temp_dir, 'all_outdoor_problem_paths.pkl')
with open(pkl_path, 'wb') as f:
pickle.dump(all_problem_paths, f)
# Define test arguments
list_of_paths = [
['path/to/outdoor/problem/1.txt', 'path/to/problem/4.txt', 'path/to/problem/5.txt'],
['path/to/outdoor/problem/2.txt', 'path/to/problem/6.txt'],
['path/to/problem/7.txt', 'path/to/outdoor/problem/3.txt']
]
ARGS = {
'list_of_paths': list_of_paths,
'base_path': temp_dir,
'category': 'outdoor'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list — a list output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| timestamp_paths_from_data_paths |
Ran ran; our contract draft was wrong, not the code |
hanlinm2/projective-geometry/prequalifier/prequalifier_path_helpers.py code served (permissive licence) · get_code("4ba2962f643eb701") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import glob
import tempfile
import os
from pathlib import Path
# Create temporary directory structure that mimics what the function expects
temp_dir = tempfile.mkdtemp()
base_path = temp_dir + "/"
# Create mock directory structure
# The function expects: base_path + data_path to be globbable
# Then it globs path + '/test/*/*'
data_path_1 = "recent1_dataset1"
data_path_2 = "recent2_dataset2"
# Create directories that will be found by glob
dir1 = os.path.join(temp_dir, data_path_1)
dir2 = os.path.join(temp_dir, data_path_2)
os.makedirs(dir1, exist_ok=True)
os.makedirs(dir2, exist_ok=True)
# Create subdirectories for the test/*/* pattern
test_subdir1 = os.path.join(dir1, "test", "subdir1", "file1.txt")
test_subdir2 = os.path.join(dir1, "test", "subdir2", "file2.txt")
test_subdir3 = os.path.join(dir2, "test", "subdir3", "file3.txt")
os.makedirs(os.path.dirname(test_subdir1), exist_ok=True)
os.makedirs(os.path.dirname(test_subdir2), exist_ok=True)
os.makedirs(os.path.dirname(test_subdir3), exist_ok=True)
Path(test_subdir1).touch()
Path(test_subdir2).touch()
Path(test_subdir3).touch()
# Define arguments
ARGS = {
'base_path': base_path,
'data_paths': [data_path_1, data_path_2]
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- pandas — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| load_model |
Not yet run unverified (harvested, no recorded run) |
hanlinm2/projective-geometry/prequalifier/prequalifier_model.py code served (permissive licence) · get_code("f9e6838b930e3168") How it ran |