| add_node_attr |
Ran ran on a synthesized input |
borgwardtlab/anfm/anfm/models/robust_rwpe.py code served (permissive licence) · get_code("ae336c57495df41b") 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 Data. 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
from torch_geometric.data import Data
torch.manual_seed(0)
# Test case 1: Adding a node attribute when data.x exists (1D case)
data_1d = Data()
data_1d.x = torch.randn(2) # 1D tensor with 2 nodes
value_1d = torch.randn(2, 1) # Value to concatenate
# Test case 2: Adding a node attribute when data.x exists (2D case)
data_2d = Data()
data_2d.x = torch.randn(2, 4) # 2D tensor with 2 nodes, 4 features
value_2d = torch.randn(2, 3) # Value to concatenate
# Test case 3: Adding a named attribute
data_named = Data()
data_named.x = torch.randn(2, 4)
value_named = torch.randn(2, 5)
# Use the 1D case as the primary test
ARGS = {
"data": data_1d,
"value": value_1d,
"attr_name": None
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch, torch_geometric — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Data — a Data 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
|
| dense_to_sparse_adj |
Ran ran on a synthesized input |
borgwardtlab/anfm/anfm/utils.py code served (permissive licence) · get_code("1096411b9848920f") 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
from torch_geometric.utils import cumsum, scatter
torch.manual_seed(0)
# Create a small dense adjacency matrix: batch_size=2, num_nodes=4
# Shape: (batch_size, num_nodes, num_nodes)
dense_adj = torch.tensor([
[[0.0, 1.0, 0.0, 0.5],
[1.0, 0.0, 2.0, 0.0],
[0.0, 2.0, 0.0, 1.5],
[0.5, 0.0, 1.5, 0.0]],
[[0.0, 3.0, 0.0, 0.0],
[3.0, 0.0, 0.5, 0.0],
[0.0, 0.5, 0.0, 2.0],
[0.0, 0.0, 2.0, 0.0]]
], dtype=torch.float32)
# Create a mask: shape (batch_size, num_nodes) to selectively include nodes
mask = torch.tensor([
[True, True, True, False],
[True, True, False, True]
], dtype=torch.bool)
ARGS = {
"dense_adj": dense_adj,
"mask": mask,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch, torch_geometric — 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
|
| dense_to_sparse_batch |
Ran ran on a synthesized input |
borgwardtlab/anfm/anfm/utils.py code served (permissive licence) · get_code("dd3521a053c14bb8") 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 (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
from torch_geometric.utils import cumsum, scatter
torch.manual_seed(0)
# Create a dense batch tensor: bs=2, num_nodes=4, num_features=3
x = torch.randn(2, 4, 3)
# Create a mask tensor: bs=2, num_nodes=4
# First batch has 3 valid nodes, second batch has 2 valid nodes
mask = torch.tensor([
[True, True, True, False],
[True, True, False, False]
], dtype=torch.bool)
ARGS = {
"x": x,
"mask": mask
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch, torch_geometric — 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 (5, 3) — shape (5, 3) as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| entropy_lower_bound |
Ran ran on a synthesized input |
borgwardtlab/anfm/anfm/models/edge_predictor.py code served (permissive licence) · get_code("9bba061985b984f2") 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)
# Define small dimensions for each semantic dimension
t = 2 # time steps
num_components = 3
num_nodes = 4
num_edge_types = 5
# star_shape will be empty for simplicity
# Construct tensors with the required shapes
# mixture_logits: (t, num_components)
mixture_logits = torch.randn(t, num_components)
# logits: (t, num_components, num_nodes, num_nodes, num_edge_types)
logits = torch.randn(t, num_components, num_nodes, num_nodes, num_edge_types)
# mask: (t, num_nodes)
mask = torch.randint(0, 2, (t, num_nodes), dtype=torch.bool)
ARGS = {
"mixture_logits": mixture_logits,
"logits": logits,
"mask": mask,
}
- 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
|
| entropy_upper_bound |
Ran ran on a synthesized input |
borgwardtlab/anfm/anfm/models/edge_predictor.py code served (permissive licence) · get_code("115ae97400fcb695") 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)
# Define small tensor dimensions
t = 2 # time steps
num_components = 3
num_nodes = 4
num_edge_types = 5
# No star_shape (empty), so shapes are:
# mixture_logits: (t, num_components)
# logits: (t, num_components, num_nodes, num_nodes, num_edge_types)
# mask: (t, num_nodes)
mixture_logits = torch.randn(t, num_components)
logits = torch.randn(t, num_components, num_nodes, num_nodes, num_edge_types)
mask = torch.randint(0, 2, (t, num_nodes)).bool()
ARGS = {
"mixture_logits": mixture_logits,
"logits": logits,
"mask": mask,
}
- 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
|
| evaluate_discriminator |
Ran ran on a synthesized input |
borgwardtlab/anfm/anfm/train_gan.py code served (permissive licence) · get_code("d766e30cf076eca4") 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 torch.nn as nn
import numpy as np
torch.manual_seed(0)
class SimpleLightningFabric:
"""Stand-in for a Lightning Fabric object."""
def all_reduce(self, metrics, reduce_op='mean'):
"""Return metrics as-is for single-GPU simulation."""
return metrics
class SimpleDiscriminator(nn.Module):
"""Minimal discriminator that outputs logits."""
def __init__(self, input_dim=4):
super().__init__()
self.linear = nn.Linear(input_dim, 1)
def forward(self, x):
return self.linear(x)
fabric = SimpleLightningFabric()
discriminator = SimpleDiscriminator(input_dim=4)
positive_batch = torch.randn(2, 4)
negative_batch = torch.randn(2, 4)
ARGS = {
'fabric': fabric,
'discriminator': discriminator,
'positive_batch': positive_batch,
'negative_batch': negative_batch,
}
- 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 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_gradient_magnitudes |
Ran ran on a synthesized input |
borgwardtlab/anfm/anfm/train_gan.py code served (permissive licence) · get_code("cef551adde62737a") 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 torch.nn as nn
import numpy as np
torch.manual_seed(0)
class SimpleModel(nn.Module):
def __init__(self):
super().__init__()
self.linear1 = nn.Linear(4, 3)
self.linear2 = nn.Linear(3, 2)
def forward(self, x):
x = self.linear1(x)
x = self.linear2(x)
return x
# Create a model and perform a forward/backward pass to populate gradients
model = SimpleModel()
dummy_input = torch.randn(2, 4)
dummy_target = torch.randn(2, 2)
output = model(dummy_input)
loss = ((output - dummy_target) ** 2).mean()
loss.backward()
ARGS = {
'model': model,
'quantile_levels': (0.01, 0.1, 0.5, 0.9, 0.99, 0.999)
}
- 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
|
| get_model |
Ran ran on a synthesized input |
borgwardtlab/anfm/anfm/models/sat.py code served (permissive licence) · get_code("e86d25cc1327aca6") 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 SimpleModel. 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)
# Create a minimal nn.Module subclass that can be called as a class
class SimpleModel(nn.Module):
def __init__(self, num_layers, embed_dim, **kwargs):
super().__init__()
self.num_layers = num_layers
self.embed_dim = embed_dim
self.linear = nn.Linear(embed_dim, embed_dim)
def forward(self, x):
return self.linear(x)
ARGS = {
'cls': SimpleModel,
'name': 'small'
}
- 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 SimpleModel — a SimpleModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleModel 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
|
| l2 |
Ran ran, honoured the contract we drafted |
borgwardtlab/anfm/anfm/evaluation/dist_helper.py pointer only (licence: MIT); the stored copy get_code serves, from lf-wen/hgdm, is pointer only (licence: NONE) · get_code("039fc6561a9516bc") How it ranThe body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from lf-wen/hgdm, and GitHub detected no licence in that repository when it was checked. 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. |
| labeled_graph_collate |
Ran ran on a synthesized input |
borgwardtlab/anfm/anfm/train_gan.py code served (permissive licence) · get_code("afd65063d68582cc") 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
from torch_geometric.data import Data, Batch
torch.manual_seed(0)
# Create sample graph data
# Each sample is a tuple of (Data object, label)
data1 = Data(
x=torch.randn(4, 3), # 4 nodes, 3 features
edge_index=torch.tensor([[0, 1, 2], [1, 2, 3]], dtype=torch.long)
)
label1 = 1.0
data2 = Data(
x=torch.randn(5, 3), # 5 nodes, 3 features
edge_index=torch.tensor([[0, 1, 2, 3], [1, 2, 3, 4]], dtype=torch.long)
)
label2 = 0.0
samples = [(data1, label1), (data2, label2)]
ARGS = {
"samples": samples
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch, torch_geometric — 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
|
| modulate |
Ran ran on a synthesized input |
borgwardtlab/anfm/anfm/models/sat.py code served (permissive licence) · get_code("d2ca4f87058cba1d") 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 3, dtype family float, shape (2, 5, 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
torch.manual_seed(0)
# Case 1: x is 3D (batch, seq, dim)
x_3d = torch.randn(2, 5, 4) # batch=2, seq=5, dim=4
shift_3d = torch.randn(2, 4) # batch=2, dim=4
scale_3d = torch.randn(2, 4) # batch=2, dim=4
# Case 2: x is 4D (batch, channels, height, width)
x_4d = torch.randn(2, 4, 3, 3) # batch=2, channels=4, height=3, width=3
shift_4d = torch.randn(2, 4) # batch=2, channels=4
scale_4d = torch.randn(2, 4) # batch=2, channels=4
# Using 3D case for the main ARGS
ARGS = {
"x": x_3d,
"shift": shift_3d,
"scale": scale_3d,
}
- 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 3, dtype family float, shape (2, 5, 4) — shape (2, 5, 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
|
| sample_edges |
Ran ran on a synthesized input |
borgwardtlab/anfm/anfm/models/edge_predictor.py code served (permissive licence) · get_code("6bc1ea52fba8e7a7") 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 int, shape (2, 4, 4, 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 torch
import torch.distributions as D
torch.manual_seed(0)
# Set up dimensions
batch_size = 2
num_components = 3
num_nodes = 4
num_edge_types = 5
# logits: shape (batch_size, num_components, num_nodes, num_nodes, num_edge_types)
logits = torch.randn(batch_size, num_components, num_nodes, num_nodes, num_edge_types)
# mixture_logits: shape (batch_size, num_components)
mixture_logits = torch.randn(batch_size, num_components)
# mask: shape (batch_size, num_nodes)
# Boolean mask indicating which nodes are valid
mask = torch.ones(batch_size, num_nodes, dtype=torch.bool)
ARGS = {
"logits": logits,
"mixture_logits": mixture_logits,
"mask": mask,
}
- 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 4, dtype family int, shape (2, 4, 4, 5) — shape (2, 4, 4, 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
|
| sparse_to_dense_adj |
Ran ran on a synthesized input |
borgwardtlab/anfm/anfm/utils.py code served (permissive licence) · get_code("577a3f476486c5e8") 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
from torch_geometric.utils import cumsum, scatter
torch.manual_seed(0)
# Create a simple example with 2 graphs in a batch
# Graph 0: 3 nodes, Graph 1: 2 nodes
# edge_index: shape [2, num_edges] - edges for both graphs combined
# First 2 edges belong to graph 0, next 2 edges belong to graph 1
edge_index = torch.tensor([
[0, 1, 3, 4], # source nodes (with global indexing)
[1, 2, 4, 3] # target nodes (with global indexing)
], dtype=torch.long)
# batch: shape [total_nodes] - indicates which graph each node belongs to
# Nodes 0,1,2 belong to graph 0; nodes 3,4 belong to graph 1
batch = torch.tensor([0, 0, 0, 1, 1], dtype=torch.long)
# max_num_nodes: maximum number of nodes in any graph
max_num_nodes = 3
# edge_attr: optional edge attributes, shape [num_edges, feature_dim]
edge_attr = torch.ones(4, 2, dtype=torch.float32)
ARGS = {
"edge_index": edge_index,
"batch": batch,
"max_num_nodes": max_num_nodes,
"edge_attr": edge_attr
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch, torch_geometric — 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
|
| to_sparse_batch |
Ran ran on a synthesized input |
borgwardtlab/anfm/anfm/models/mixer_model.py code served (permissive licence) · get_code("722ba5d89ebf60e0") 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 (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 torch
from einops import rearrange
torch.manual_seed(0)
# Construct arguments for to_sparse_batch
# The function takes:
# - x: a tensor that will be rearranged from 'b n d' to '(b n) d'
# - mask: a boolean mask that will be flattened and used to index x
# Create a small tensor with shape (b=2, n=3, d=4)
# This represents a batch of 2, with 3 elements per batch, and 4 dimensions
x = torch.randn(2, 3, 4)
# Create a mask with shape (b=2, n=3) that will select some elements
# Let's make it so some elements are True and some are False
mask = torch.tensor([
[True, False, True],
[False, True, True]
])
ARGS = {
"x": x,
"mask": mask
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- einops, 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 (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
|