| collate_fn |
Ran ran on a synthesized input |
prs-eth/PCAccumulation/libs/dataloader.py code served (permissive licence) · get_code("401ef1c973780809") 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 numpy as np
from collections import defaultdict
torch.manual_seed(0)
# Create sample batch items
# Each example should have the keys that collate_fn expects
batch_item_1 = {
'coordinates': np.array([[0, 1], [2, 3], [4, 5]], dtype=np.float32), # shape (3, 2)
'time_indice': np.array([[10], [20]], dtype=np.int32), # shape (2, 1)
'ego_motion_gt': np.array([1.0, 2.0, 3.0, 4.0], dtype=np.float32), # shape (4,)
'shape': np.array([5, 6, 7], dtype=np.int32), # shape (3,)
'inst_motion_gt': np.array([[0.1, 0.2], [0.3, 0.4]], dtype=np.float32), # shape (2, 2)
'data_path': '/path/to/data1',
'num_points': np.array([3], dtype=np.int32), # shape (1,)
'num_voxels': np.array([2], dtype=np.int32), # shape (1,)
'point_to_voxel_map': np.array([0, 0, 1], dtype=np.int32), # shape (3,)
'some_feature': np.array([[1, 2], [3, 4], [5, 6]], dtype=np.float32), # shape (3, 2)
}
batch_item_2 = {
'coordinates': np.array([[7, 8]], dtype=np.float32), # shape (1, 2)
'time_indice': np.array([[30], [40], [50]], dtype=np.int32), # shape (3, 1)
'ego_motion_gt': np.array([5.0, 6.0, 7.0, 8.0], dtype=np.float32), # shape (4,)
'shape': np.array([9, 10, 11], dtype=np.int32), # shape (3,)
'inst_motion_gt': np.array([[0.5, 0.6]], dtype=np.float32), # shape (1, 2)
'data_path': '/path/to/data2',
'num_points': np.array([1], dtype=np.int32), # shape (1,)
'num_voxels': np.array([3], dtype=np.int32), # shape (1,)
'point_to_voxel_map': np.array([0], dtype=np.int32), # shape (1,)
'some_feature': np.array([[7, 8]], dtype=np.float32), # shape (1, 2)
}
batch = [batch_item_1, batch_item_2]
ARGS = {
'batch': batch
}
- 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 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
|
| compute_iou |
Ran ran on a synthesized input |
prs-eth/PCAccumulation/libs/loss.py code served (permissive licence) · get_code("f11d4fc544190a42") 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 numpy as np
torch.manual_seed(0)
# Create small tensors for predictions and ground truth
# The function expects [N] shaped tensors with class indices
# Let's create tensors with N=8 samples and classes in range [0, 4)
N = 8
n_class = 4
ignore_index = 0
# predictions: [N] tensor with class indices
predictions = torch.tensor([0, 1, 2, 3, 1, 2, 3, 1], dtype=torch.long)
# gt (ground truth): [N] tensor with class indices
gt = torch.tensor([0, 1, 1, 3, 2, 2, 3, 1], dtype=torch.long)
ARGS = {
'predictions': predictions,
'gt': gt,
'n_class': n_class,
'ignore_index': ignore_index
}
- 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 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
|
| conv1x1 |
Ran ran; our contract draft was wrong, not the code |
prs-eth/PCAccumulation/models/unet.py code served (permissive licence) · get_code("9200656a2a28834f") 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 Conv2d. 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
torch.manual_seed(0)
ARGS = {
"in_channels": 3,
"out_channels": 64,
"groups": 1,
}
- 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 Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
|
| conv3x3 |
Ran ran; our contract draft was wrong, not the code |
prs-eth/PCAccumulation/models/unet.py code served (permissive licence) · get_code("fe1bac001ffc64d5") 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 Conv2d. 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
torch.manual_seed(0)
ARGS = {
'in_channels': 3,
'out_channels': 16,
'stride': 1,
'padding': 1,
'bias': True,
'groups': 1,
}
- 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 Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
|
| inverse_scatter_point_pillar |
Ran ran on a synthesized input |
prs-eth/PCAccumulation/models/pillar_encoder.py code served (permissive licence) · get_code("cd43b06ed9a32ef1") 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 (10, 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)
# Analyze function usage:
# - voxel_features: tensor with .size(1), indexed with [batch_itt], .view(n_channels, -1)[:, indices].t()
# Shape: [n, c, nt, ny, nx] where n is number of voxels
# - coords: tensor indexed [batch_mask, :], [:, 0], [:, 4], [:, 2], [:, 3]
# Must have at least 5 columns (indices 0, 2, 3, 4)
# - batch_size: int, used in range()
# - input_shape: indexable with [3], [0], [1] - shape tuple/list
# Create small tensors with distinct dimensions
batch_size = 2
n_channels = 4
nt = 3
nx = 5
ny = 6
# voxel_features: [n, c, nt, ny, nx]
# n=8 voxels, c=4 channels, nt=3, ny=6, nx=5
voxel_features = torch.randn(8, n_channels, nt, ny, nx)
# coords: [num_points, 5] with columns [batch_idx, _, y_idx, x_idx, t_idx]
# Create 10 coordinate entries
coords = torch.tensor([
[0, 0, 2, 1, 0], # batch 0
[0, 0, 3, 2, 1], # batch 0
[0, 0, 4, 3, 2], # batch 0
[0, 0, 1, 4, 1], # batch 0
[0, 0, 5, 0, 0], # batch 0
[1, 0, 2, 1, 1], # batch 1
[1, 0, 3, 2, 2], # batch 1
[1, 0, 1, 3, 0], # batch 1
[1, 0, 4, 4, 1], # batch 1
[1, 0, 0, 2, 2], # batch 1
], dtype=torch.long)
# input_shape: [nx, ny, ?, nt] - indexed as [0], [1], [3]
input_shape = [nx, ny, 0, nt]
ARGS = {
"voxel_features": voxel_features,
"coords": coords,
"batch_size": batch_size,
"input_shape": input_shape,
}
- 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 (10, 4) — shape (10, 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
|
| scatter_point_pillar |
Ran ran on a synthesized input |
prs-eth/PCAccumulation/models/pillar_encoder.py code served (permissive licence) · get_code("6249c6519fc4b6bf") 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 5, dtype family float, shape (2, 4, 2, 5, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
torch.manual_seed(0)
# Construct valid arguments for scatter_point_pillar
# The function expects:
# - voxel_features: [M, C] tensor
# - coords: [M, 5] tensor with structure [batch_idx, _, z, y, x]
# - batch_size: integer
# - input_shape: [nx, ny, nz, nt]
# Set dimensions
batch_size = 2
num_pillars = 6 # M - number of pillars
num_channels = 4 # C - feature channels
nx = 3
ny = 5
nz = 7
nt = 2
# Create voxel_features: [M, C]
voxel_features = torch.randn(num_pillars, num_channels, dtype=torch.float32)
# Create coords: [M, 5]
# Structure: [batch_idx, unused, z, y, x]
coords = torch.zeros(num_pillars, 5, dtype=torch.long)
coords[:, 0] = torch.tensor([0, 0, 0, 1, 1, 1]) # batch indices
coords[:, 1] = 0 # unused dimension
coords[:, 2] = torch.tensor([0, 1, 2, 0, 1, 2]) % nz # z indices
coords[:, 3] = torch.tensor([0, 1, 2, 3, 4, 0]) % ny # y indices (x in the function logic)
coords[:, 4] = torch.tensor([0, 0, 1, 1, 1, 0]) % nt # t indices (z in the function logic)
# Create input_shape: [nx, ny, nz, nt]
input_shape = torch.tensor([nx, ny, nz, nt])
ARGS = {
"voxel_features": voxel_features,
"coords": coords,
"batch_size": batch_size,
"input_shape": input_shape
}
- 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 5, dtype family float, shape (2, 4, 2, 5, 3) — shape (2, 4, 2, 5, 3) as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| temporal_ungrid |
Ran ran on a synthesized input |
prs-eth/PCAccumulation/models/pillar_encoder.py code served (permissive licence) · get_code("f44a4e6fb71a46b8") 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 (10, 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)
# Build arguments for temporal_ungrid function
# feats: [B, T, C, H, W] tensor
B, T, C, H, W = 2, 3, 4, 5, 6
feats = torch.randn(B, T, C, H, W)
# points: [N, 3] tensor with (x, y, z) coordinates
N = 10
points = torch.randn(N, 3) * 50 # Scale up so they're in a reasonable range
# pc_range: [2] tensor representing range in x and y
pc_range = torch.tensor([100.0, 100.0])
# time_indice: [N, 2] tensor with [batch_idx, time_idx]
time_indice = torch.zeros(N, 2, dtype=torch.long)
# Distribute points across batches and time steps
for i in range(N):
time_indice[i, 0] = i % B # batch_idx cycles through B
time_indice[i, 1] = i % T # time_idx cycles through T
ARGS = {
"feats": feats,
"points": points,
"pc_range": pc_range,
"time_indice": time_indice,
}
- 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 (10, 4) — shape (10, 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
|
| upconv2x2 |
Ran ran; our contract draft was wrong, not the code |
prs-eth/PCAccumulation/models/unet.py code served (permissive licence) · get_code("87dc2e4625e5eb8c") 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 ConvTranspose2d. 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
torch.manual_seed(0)
ARGS = {
'in_channels': 3,
'out_channels': 16,
'mode': 'transpose'
}
- 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 ConvTranspose2d — a ConvTranspose2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ConvTranspose2d 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
|
| update_gt_inst_motion |
Ran ran on a synthesized input |
prs-eth/PCAccumulation/models/alignnet.py code served (permissive licence) · get_code("8f62130486460fb0") 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 torch
torch.manual_seed(0)
# Construct arguments for update_gt_inst_motion
# inst_motion_gt: list of [K, T, 4, 4] tensors
# ego_motion_gt: [B, T, 4, 4]
# ego_motion_est: [B, T, 4, 4]
B = 2 # batch size
T = 3 # time steps
K1 = 2 # number of instances in first batch
K2 = 3 # number of instances in second batch
# Create ego_motion_gt: [B, T, 4, 4] - identity-like matrices with small perturbations
ego_motion_gt = torch.eye(4).unsqueeze(0).unsqueeze(0).repeat(B, T, 1, 1)
ego_motion_gt = ego_motion_gt + torch.randn(B, T, 4, 4) * 0.01
# Create ego_motion_est: [B, T, 4, 4] - slightly different from gt
ego_motion_est = torch.eye(4).unsqueeze(0).unsqueeze(0).repeat(B, T, 1, 1)
ego_motion_est = ego_motion_est + torch.randn(B, T, 4, 4) * 0.01
# Create inst_motion_gt: list of [K, T, 4, 4] tensors
inst_motion_gt = []
# First batch with K1 instances
c_inst_motion_1 = torch.eye(4).unsqueeze(0).unsqueeze(0).repeat(K1, T, 1, 1)
c_inst_motion_1 = c_inst_motion_1 + torch.randn(K1, T, 4, 4) * 0.01
inst_motion_gt.append(c_inst_motion_1)
# Second batch with K2 instances
c_inst_motion_2 = torch.eye(4).unsqueeze(0).unsqueeze(0).repeat(K2, T, 1, 1)
c_inst_motion_2 = c_inst_motion_2 + torch.randn(K2, T, 4, 4) * 0.01
inst_motion_gt.append(c_inst_motion_2)
ARGS = {
"inst_motion_gt": inst_motion_gt,
"ego_motion_gt": ego_motion_gt,
"ego_motion_est": ego_motion_est,
}
- 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 — 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
|