| create_output_dir_and_save_config |
Ran ran; our contract draft was wrong, not the code |
htcr/sam_road/utils.py code served (permissive licence) · get_code("eace594ace06c68f") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
import os
import tempfile
from datetime import datetime
# Create a small stand-in config class that has a to_dict() method
class Config:
def __init__(self):
self.model_name = "test_model"
self.learning_rate = 0.001
self.batch_size = 32
self.epochs = 10
def to_dict(self):
return {
'model_name': self.model_name,
'learning_rate': self.learning_rate,
'batch_size': self.batch_size,
'epochs': self.epochs
}
# Create temporary directory for output
temp_dir = tempfile.mkdtemp()
output_dir_prefix = os.path.join(temp_dir, 'experiment_output')
# Create config instance
config = Config()
# Create the ARGS dictionary
ARGS = {
'output_dir_prefix': output_dir_prefix,
'config': config,
'specified_dir': None
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch, yaml — 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
|
| crop_img_patch |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
htcr/sam_road/inferencer.py code served (permissive licence) · get_code("9847c4aa680f7f58") 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 (4, 3, 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 torch
import numpy as np
torch.manual_seed(0)
# Create a small image tensor with shape (height, width, channels)
# Using distinct dimensions: 8 height, 6 width, 3 channels (RGB)
img = torch.randint(0, 256, (8, 6, 3), dtype=torch.uint8).numpy()
# Define crop coordinates
x0 = 1
y0 = 2
x1 = 4
y1 = 6
ARGS = {
"img": img,
"x0": x0,
"y0": y0,
"x1": x1,
"y1": y1
}
- 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 3, dtype family int, shape (4, 3, 3) — shape (4, 3, 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
|
| draw_line_segments_on_image |
Ran ran; our contract draft was wrong, not the code |
htcr/sam_road/spacenet/generate_labels.py code served (permissive licence) · get_code("62990ee83bc6c9e9") 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 (100, 100) 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
ARGS = {
"size": 100,
"line_segments": [
((10, 20), (50, 60)),
((30, 40), (80, 90)),
((5, 5), (95, 95))
],
"width": 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 2, dtype family int, shape (100, 100) — shape (100, 100) 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_points_on_image |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
htcr/sam_road/graph_extraction.py code served (permissive licence) · get_code("2f135d04199d9188") 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 (100, 100, 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 cv2
import numpy as np
# Create a simple square image (100x100 pixels, 3 channels for BGR)
image = np.ones((100, 100, 3), dtype=np.uint8) * 255
# Create a list of points as (x, y) tuples in pixel coordinates
points = [(25, 25), (50, 50), (75, 75), (30, 70)]
# Radius for the circles
radius = 5
ARGS = {
"image": image,
"points": points,
"radius": radius
}
- 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 (100, 100, 3) — shape (100, 100, 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
|
| draw_points_on_image |
Ran ran; our contract draft was wrong, not the code |
htcr/sam_road/spacenet/generate_labels.py code served (permissive licence) · get_code("998429d0ff5eb4a1") 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 (100, 100) 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
# Construct arguments for draw_points_on_image
size = 100 # Square image of 100x100 pixels
points = [
(25, 25), # First point at (25, 25)
(50, 50), # Second point at (50, 50)
(75, 75), # Third point at (75, 75)
]
radius = 5 # Radius of circles in pixels
ARGS = {
"size": size,
"points": points,
"radius": radius,
}
- 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 2, dtype family int, shape (100, 100) — shape (100, 100) 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
|
| edge_list_to_adj_table |
Ran ran; our contract draft was wrong, not the code |
htcr/sam_road/graph_utils.py code served (permissive licence) · get_code("43d91f90853adbd0") 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 torch
torch.manual_seed(0)
# The function takes edges as input
# It expects edges to be an iterable of edge objects where each edge has indices accessible as edge[0] and edge[1]
# The function builds an adjacency table (list of sets) from the edge list
edges = [
(0, 1),
(0, 2),
(1, 2),
(2, 3),
]
ARGS = {
"edges": edges
}
- 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 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
|
| edge_list_to_adj_table |
Ran ran; our contract draft was wrong, not the code |
htcr/sam_road/graph_utils.py code served (permissive licence) · get_code("0bf072401f5943d4") 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 torch
import numpy as np
torch.manual_seed(0)
# Analyze the function:
# - nodes: used only for len(nodes), so can be a list or any sequence
# - edges: iterated over, each element indexed as edge[0] and edge[1]
# so needs to be a list of tuples/lists with at least 2 elements
# Build small test data
nodes = [0, 1, 2, 3] # 4 nodes
edges = [
(0, 1),
(0, 2),
(1, 3),
(2, 3),
]
ARGS = {
"nodes": nodes,
"edges": edges,
}
- 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 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
|
| filter_nodes |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
htcr/sam_road/graph_utils.py code served (permissive licence) · get_code("68ccab6be670bfc4") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
# Create node array: shape (5, 3) - 5 nodes with 3 features each
node_array = np.array([
[1.0, 2.0, 3.0],
[4.0, 5.0, 6.0],
[7.0, 8.0, 9.0],
[10.0, 11.0, 12.0],
[13.0, 14.0, 15.0]
], dtype=np.float32)
# Create edge array: shape (4, 2) - 4 edges, each edge connects 2 nodes
edge_array = np.array([
[0, 1],
[1, 2],
[2, 3],
[3, 4]
], dtype=np.int32)
# Create keep_node boolean array: keep nodes 0, 2, 3 (filter out 1 and 4)
keep_node = np.array([True, False, True, True, False], dtype=bool)
ARGS = {
"node_array": node_array,
"edge_array": edge_array,
"keep_node": keep_node
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — a tuple output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_img_paths |
Ran ran; our contract draft was wrong, not the code |
htcr/sam_road/inferencer.py code served (permissive licence) · get_code("53810f783e40cd12") 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 tempfile
# Create a temporary directory to serve as root_dir
temp_dir = tempfile.mkdtemp()
# Define the arguments
ARGS = {
'root_dir': temp_dir,
'image_indices': [0, 1, 2, 5]
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type 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
|
| get_patch_info_one_img |
Ran ran; our contract draft was wrong, not the code |
htcr/sam_road/dataset.py code served (permissive licence) · get_code("e65200eaf5162974") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
ARGS = {
"image_index": 0,
"image_size": 256,
"sample_margin": 10,
"patch_size": 32,
"patches_per_edge": 4
}
- 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 list — a list output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_points_and_scores_from_mask |
Ran ran; our contract draft was wrong, not the code |
htcr/sam_road/graph_extraction.py code served (permissive licence) · get_code("dff7a9d2d4290664") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
# Create a small 2D mask array with values between 0 and 1
# Shape: 4x3 (height x width) with some values above and below threshold
mask = np.array([
[0.1, 0.6, 0.2],
[0.7, 0.3, 0.8],
[0.4, 0.9, 0.5],
[0.2, 0.1, 0.75]
], dtype=np.float32)
threshold = 0.5
ARGS = {
"mask": mask,
"threshold": threshold
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — a tuple output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| graph_collate_fn |
Ran ran; our contract draft was wrong, not the code |
htcr/sam_road/dataset.py code served (permissive licence) · get_code("49fc6bdb42872104") 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
torch.manual_seed(0)
# The function expects a batch which is a list of dicts
# Each dict should have:
# - 'graph_points': a tensor of shape (num_points, 2)
# - other keys with tensors that can be stacked
batch = [
{
'graph_points': torch.randn(3, 2),
'label': torch.tensor([1.0]),
'id': torch.tensor([0])
},
{
'graph_points': torch.randn(5, 2),
'label': torch.tensor([2.0]),
'id': torch.tensor([1])
}
]
ARGS = {
'batch': batch
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| rasterize_graph |
Ran ran; our contract draft was wrong, not the code |
htcr/sam_road/triage.py code served (permissive licence) · get_code("c4b20ca211d254a0") 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 (256, 256, 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 cv2
import numpy as np
# Create small test data
nodes = np.array([
[0.2, 0.3],
[0.5, 0.6],
[0.8, 0.9]
], dtype=np.float32)
edges = np.array([
[0, 1],
[1, 2]
], dtype=np.int32)
viz_img_size = 256
dilation_radius = 5
ARGS = {
"nodes": nodes,
"edges": edges,
"viz_img_size": viz_img_size,
"dilation_radius": dilation_radius
}
- 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 (256, 256, 3) — shape (256, 256, 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
|
| read_rgb_img |
Ran ran, honoured the contract we drafted |
htcr/sam_road/dataset.py code served (permissive licence) · get_code("787e3dce7cf3f6a1") 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 (4, 3, 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 cv2
import numpy as np
import tempfile
import os
# Create a temporary image file
temp_dir = tempfile.mkdtemp()
temp_path = os.path.join(temp_dir, "test_image.png")
# Create a simple RGB image and save it as BGR (since cv2.imread reads as BGR)
# Create a small 4x3 image with some color variation
img_array = np.zeros((4, 3, 3), dtype=np.uint8)
img_array[0, 0] = [255, 0, 0] # Red in RGB, will be BGR
img_array[1, 1] = [0, 255, 0] # Green
img_array[2, 2] = [0, 0, 255] # Blue
img_array[3, 0] = [255, 255, 0] # Yellow
# Convert RGB to BGR for saving
bgr_array = cv2.cvtColor(img_array, cv2.COLOR_RGB2BGR)
cv2.imwrite(temp_path, bgr_array)
ARGS = {
"path": temp_path
}
- 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 (4, 3, 3) — shape (4, 3, 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
|
| visualize_image_and_graph |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
htcr/sam_road/triage.py code served (permissive licence) · get_code("acad5f61c59c85f5") 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 (512, 512, 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 cv2
import numpy as np
# Create a small RGB image (512x512x3)
img = np.random.randint(0, 256, (512, 512, 3), dtype=np.uint8)
# Create nodes as normalized coordinates (num_nodes x 2)
# Each node has [x, y] normalized to [0, 1]
nodes = np.array([
[0.2, 0.3],
[0.5, 0.5],
[0.8, 0.7],
[0.1, 0.9]
], dtype=np.float32)
# Create edges as pairs of node indices
edges = np.array([
[0, 1],
[1, 2],
[2, 3],
[0, 3]
], dtype=np.int32)
ARGS = {
"img": img,
"nodes": nodes,
"edges": edges,
"viz_img_size": 512
}
- 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 (512, 512, 3) — shape (512, 512, 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
|
| visualize_pred_gt_pair |
Ran ran, honoured the contract we drafted |
htcr/sam_road/triage.py code served (permissive licence) · get_code("b7d7f725d4dc325c") 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 (512, 1024, 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 cv2
import numpy as np
import tempfile
import os
# Create a temporary image file for testing
# Create a small RGB image (100x100x3)
temp_img = np.random.randint(0, 255, (100, 100, 3), dtype=np.uint8)
temp_img_rgb = cv2.cvtColor(temp_img, cv2.COLOR_BGR2RGB)
# Create a temporary file to save the image
with tempfile.NamedTemporaryFile(suffix='.png', delete=False) as f:
temp_img_path = f.name
cv2.imwrite(temp_img_path, temp_img)
# Create sample nodes (normalized coordinates between 0 and 1)
# Shape: (num_nodes, 2) - coordinates in (y, x) format after reversal
pred_nodes = np.array([
[0.2, 0.3],
[0.5, 0.5],
[0.8, 0.7],
[0.1, 0.9]
], dtype=np.float32)
gt_nodes = np.array([
[0.25, 0.35],
[0.55, 0.45],
[0.75, 0.65],
[0.15, 0.85]
], dtype=np.float32)
# Create sample edges (pairs of node indices)
pred_edges = np.array([
[0, 1],
[1, 2],
[2, 3]
], dtype=np.int32)
gt_edges = np.array([
[0, 1],
[1, 2],
[2, 3]
], dtype=np.int32)
# Construct the result dictionary
result = {
'img_path': temp_img_path,
'pred_nodes': pred_nodes,
'pred_edges': pred_edges,
'gt_nodes': gt_nodes,
'gt_edges': gt_edges
}
ARGS = {
'result': result
}
- 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 (512, 1024, 3) — shape (512, 1024, 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
|
| within_margin |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
htcr/sam_road/spacenet_metrics/spacenet_convert.py code served (permissive licence) · get_code("0b3109c04bded2ae") 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 torch
import numpy as np
torch.manual_seed(0)
# The function takes a parameter 'v' and checks if v[0] and v[1] are within certain bounds
# v needs to be indexable with [0] and [1], so it can be a list, tuple, or array
# Create a valid argument that satisfies the condition (within margin)
v_within = [100, 100] # v[0]=100 > 24 and < 376, v[1]=100 > 24 and < 376
ARGS = {
"v": v_within
}
- 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 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
|
| get_batch_img_patches |
Not yet run unverified (harvested, no recorded run) |
htcr/sam_road/inferencer.py code served (permissive licence) · get_code("9666fa4a61dfac77") How it ran |