| Attention |
Ran ran on a synthesized input · constructed an object; no result was computed |
Aveek-Saha/Graph-Attention-Net/gat.py code served (permissive licence) · get_code("ea7e984b0e2dc3d2") 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 an instance of its own class, Attention: the run constructed the object and did not call it, so no result was computed. 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 tensorflow as tf
import numpy as np
# Define the Attention layer
class Attention(tf.keras.layers.Layer):
def __init__(self, units, activation=tf.identity, l2=0.0):
super(Attention, self).__init__()
self.l2 = l2
self.activation = activation
self.units = units
def build(self, input_shape):
H_shape, A_shape = input_shape
self.W = self.add_weight(shape=(H_shape[1], self.units), initializer='glorot_uniform', dtype=tf.float32, regularizer=tf.keras.regularizers.l2(self.l2))
self.a_1 = self.add_weight(shape=(self.units, 1), initializer='glorot_uniform', dtype=tf.float32, regularizer=tf.keras.regularizers.l2(self.l2))
self.a_2 = self.add_weight(shape=(self.units, 1), initializer='glorot_uniform', dtype=tf.float32, regularizer=tf.keras.regularizers.l2(self.l2))
def call(self, inputs):
H, A = inputs
X = H @ self.W
attn_self = X @ self.a_1
attn_neighbours = X @ self.a_2
attention = attn_self + tf.transpose(attn_neighbours)
E = tf.nn.leaky_relu(attention)
mask = -10000000000.0 * (1.0 - A)
masked_E = E + mask
alpha = tf.nn.softmax(masked_E)
H_cap = alpha @ X
out = self.activation(H_cap)
return out
# Create sample inputs for the Attention layer
batch_size = 2
node_features = 4
num_nodes = 3
units = 5
# H: node feature matrix (batch_size, num_nodes, node_features)
H = tf.constant(np.random.randn(batch_size, num_nodes, node_features).astype(np.float32))
# A: adjacency matrix (batch_size, num_nodes, num_nodes)
A = tf.constant(np.random.randint(0, 2, size=(batch_size, num_nodes, num_nodes)).astype(np.float32))
# Set diagonal to 1 (self-loops)
A = A + tf.eye(num_nodes, batch_shape=[batch_size])
A = tf.clip_by_value(A, 0, 1)
ARGS = {
'units': units,
'activation': tf.identity,
'l2': 0.0
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Attention — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Attention 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
|
| AttentionAggregator |
Ran ran on a synthesized input · constructed an object; no result was computed |
GraphSAINT/GraphSAINT/graphsaint/pytorch_version/layers.py code served (permissive licence) · get_code("a17fe9c7a3d566f4") 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 an instance of its own class, AttentionAggregator: the run constructed the object and did not call it, so no result was computed. 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 import nn
torch.manual_seed(0)
ARGS = {
'dim_in': 4,
'dim_out': 8,
'dropout': 0.1,
'act': 'relu',
'order': 1,
'aggr': 'mean',
'bias': 'norm',
'mulhead': 2,
}
- 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 AttentionAggregator — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a AttentionAggregator 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
|
| BaseGraphAttentionLayer |
Ran ran on a synthesized input · constructed an object; no result was computed |
Yindong-Zhang/myGAT/layers.py code served (permissive licence) · get_code("3db162112d63db34") 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 an instance of its own class, BaseGraphAttentionLayer: the run constructed the object and did not call it, so no result was computed. 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)
class BaseGraphAttentionLayer(nn.Module):
def __init__(self):
super(BaseGraphAttentionLayer, self).__init__()
pass
def _attention(self, feat, adj):
print('Unimplemented!')
def _aggregate(self, feat, adj):
"""
a overview of logic, can be override.
:param adj:
:param feat:
:return:
"""
weight = self._attention(feat, adj)
h_prime = torch.matmul(weight, feat)
return h_prime
def _update(self, feat, feat_prime):
print('Unimplemented!')
def forward(self, feat, adj):
"""
a overview of logic, can be override
:param adj:
:param feat:
:return:
"""
h_prime = self._aggregate(feat, adj)
return self._update(feat, h_prime)
# Create tiny tensors for testing
# feat: (num_nodes, feature_dim)
feat = torch.randn(2, 4)
# adj: (num_nodes, num_nodes) - adjacency matrix
adj = torch.randn(2, 2)
ARGS = {}
- 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 BaseGraphAttentionLayer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a BaseGraphAttentionLayer 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
|
| Dropout |
Ran ran; our contract draft was wrong, not the code |
gcucurull/jax-gat/models.py pointer only (licence: NONE) · get_code("5afc838eec40772e") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, gcucurull/jax-gat 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. |
| GAT |
Ran ran on a synthesized input · constructed an object; no result was computed |
isotlaboratory/ml4vrp/modules/layers.py pointer only (licence: NONE) · get_code("0543c5506767fe53") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, isotlaboratory/ml4vrp 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. |
| GAT |
Ran ran on a synthesized input · constructed an object; no result was computed |
marblet/GNN_models_pytorch_geometric/models/gat.py code served (permissive licence) · get_code("ef36abf2c8ed6532") 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 an instance of its own class, GAT: the run constructed the object and did not call it, so no result was computed. 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 torch_geometric.data import Data
torch.manual_seed(0)
# Create a minimal dataset-like object with required attributes
class MinimalDataset:
def __init__(self, num_features, num_classes):
self.num_features = num_features
self.num_classes = num_classes
# Create dataset
dataset = MinimalDataset(num_features=4, num_classes=3)
# Create data object for forward pass
num_nodes = 2
x = torch.randn(num_nodes, 4)
edge_index = torch.tensor([[0, 1], [1, 0]], dtype=torch.long).t().contiguous()
data = Data(x=x, edge_index=edge_index)
# Define arguments
ARGS = {
"dataset": dataset,
"nhid": 8,
"first_heads": 2,
"output_heads": 1,
"dropout": 0.5
}
- 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 GAT — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GAT 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
|
| GAT |
Ran ran on a synthesized input · constructed an object; no result was computed |
marblet/gat-pytorch/gat.py code served (permissive licence) · get_code("14b29bb3c2e77060") 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 an instance of its own class, GAT: the run constructed the object and did not call it, so no result was computed. 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)
class MockData:
def __init__(self, features, edge_list, num_features, num_classes):
self.features = features
self.edge_list = edge_list
self.num_features = num_features
self.num_classes = num_classes
# Create small tensors for testing
num_nodes = 2
num_features = 4
num_classes = 3
features = torch.randn(num_nodes, num_features)
source_nodes = torch.tensor([0, 1])
target_nodes = torch.tensor([1, 0])
edge_list = (source_nodes, target_nodes)
data = MockData(
features=features,
edge_list=edge_list,
num_features=num_features,
num_classes=num_classes
)
ARGS = {
'data': data,
'nhid': 8,
'nhead': 2,
'nhead_out': 1,
'alpha': 0.2,
'dropout': 0.6
}
- 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 GAT — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GAT 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
|
| GAT |
Ran ran on a synthesized input · constructed an object; no result was computed |
labmlai/annotated_deep_learning_paper_implementations/labml_nn/graphs/gat/experiment.py code served (permissive licence) · get_code("1d632b6bedff39f7") 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 an instance of its own class, GAT: the run constructed the object and did not call it, so no result was computed. 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)
# Define parameters for GAT
in_features = 4
n_hidden = 8
n_classes = 3
n_heads = 2
dropout = 0.6
ARGS = {
"in_features": in_features,
"n_hidden": n_hidden,
"n_classes": n_classes,
"n_heads": n_heads,
"dropout": dropout,
}
- 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 GAT — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GAT 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
|
| GAT |
Ran ran on a synthesized input |
weiyangfb/PyTorchSparseGAT/models.py code served (permissive licence) · get_code("605946bfc2bfb229") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) 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
import torch.nn as nn
import torch.nn.functional as F
class GraphAttentionLayer(nn.Module):
"""
Simple GAT layer, similar to https://arxiv.org/abs/1710.10903
"""
def __init__(self, in_features, out_features, dropout, alpha, concat=True):
super(GraphAttentionLayer, self).__init__()
self.dropout = dropout
self.in_features = in_features
self.out_features = out_features
self.alpha = alpha
self.concat = concat
self.dropout = dropout
self.W = nn.Parameter(torch.zeros(size=(in_features, out_features)))
nn.init.xavier_uniform_(self.W.data, gain=1.414)
self.a = nn.Parameter(torch.zeros(size=(2 * out_features, 1)))
nn.init.xavier_uniform_(self.a.data, gain=1.414)
self.leakyrelu = nn.LeakyReLU(self.alpha)
def forward(self, input, adj):
h = torch.mm(input, self.W)
N = h.size()[0]
a_input = torch.cat([h.repeat(1, N).view(N * N, -1), h.repeat(N, 1)], dim=1).view(N, -1, 2 * self.out_features)
e = self.leakyrelu(torch.matmul(a_input, self.a).squeeze(2))
zero_vec = -9000000000000000.0 * torch.ones_like(e)
attention = torch.where(adj > 0, e, zero_vec)
attention = F.softmax(attention, dim=1)
attention = F.dropout(attention, self.dropout, training=self.training)
h_prime = torch.matmul(attention, h)
if self.concat:
return F.elu(h_prime)
else:
return h_prime
def __repr__(self):
return self.__class__.__name__ + ' (' + str(self.in_features) + ' -> ' + str(self.out_features) + ')'
class GAT(nn.Module):
def __init__(self, nfeat, nhid, nclass, dropout, alpha, nheads):
"""Dense version of GAT."""
super(GAT, self).__init__()
self.dropout = dropout
self.attentions = [GraphAttentionLayer(nfeat, nhid, dropout=dropout, alpha=alpha, concat=True) for _ in range(nheads)]
for i, attention in enumerate(self.attentions):
self.add_module('attention_{}'.format(i), attention)
self.out_att = GraphAttentionLayer(nhid * nheads, nclass, dropout=dropout, alpha=alpha, concat=False)
def forward(self, x, adj):
x = F.dropout(x, self.dropout, training=self.training)
x = torch.cat([att(x, adj) for att in self.attentions], dim=1)
x = F.dropout(x, self.dropout, training=self.training)
x = F.elu(self.out_att(x, adj))
return F.log_softmax(x, dim=1)
INIT_ARGS = {
'nfeat': 4,
'nhid': 8,
'nclass': 3,
'dropout': 0.5,
'alpha': 0.2,
'nheads': 2,
}
ARGS = {
'x': torch.randn(5, 4),
'adj': torch.ones(5, 5),
}
if __name__ == '__main__':
model = GAT(**INIT_ARGS)
model.eval()
output = model(**ARGS)
print(f"Output shape: {output.shape}")
print(f"Output: {output}")
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- 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 (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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| GATConv |
Ran ran on a synthesized input · constructed an object; no result was computed |
marblet/gat-pytorch/gat.py code served (permissive licence) · get_code("600d032886c740f2") 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 an instance of its own class, GATConv: the run constructed the object and did not call it, so no result was computed. 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 torch.nn.functional as F
torch.manual_seed(0)
device = torch.device('cpu')
class GATConv(nn.Module):
def __init__(self, in_features, out_features, dropout, alpha, bias=True):
super(GATConv, self).__init__()
self.dropout = dropout
self.in_features = in_features
self.out_features = out_features
self.alpha = alpha
self.weight = nn.Parameter(torch.FloatTensor(in_features, out_features))
self.a = nn.Parameter(torch.zeros(size=(2 * out_features, 1)))
if bias:
self.bias = nn.Parameter(torch.FloatTensor(out_features))
else:
self.register_parameter('bias', None)
self.reset_parameters()
def reset_parameters(self):
nn.init.xavier_uniform_(self.weight.data, gain=1.414)
if self.bias is not None:
self.bias.data.fill_(0)
nn.init.xavier_uniform_(self.a.data, gain=1.414)
def forward(self, x, edge_list):
x = F.dropout(x, self.dropout, training=self.training)
h = torch.matmul(x, self.weight)
source, target = edge_list
a_input = torch.cat([h[source], h[target]], dim=1)
e = F.leaky_relu(torch.matmul(a_input, self.a), negative_slope=self.alpha)
N = h.size(0)
attention = -1e+20 * torch.ones([N, N], device=device, requires_grad=True)
attention[source, target] = e[:, 0]
attention = F.softmax(attention, dim=1)
attention = F.dropout(attention, self.dropout, training=self.training)
h = F.dropout(h, self.dropout, training=self.training)
h_prime = torch.matmul(attention, h)
if self.bias is not None:
h_prime = h_prime + self.bias
return h_prime
in_features = 4
out_features = 3
dropout = 0.5
alpha = 0.2
bias = True
ARGS = {
'in_features': in_features,
'out_features': out_features,
'dropout': dropout,
'alpha': alpha,
'bias': bias
}
- 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 GATConv — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GATConv 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
|
| GATHead |
Ran ran on a synthesized input · constructed an object; no result was computed |
lukecavabarrett/pna/models/pytorch/gat/layer.py code served (permissive licence) · get_code("9b65469bbd07b3db") 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 an instance of its own class, GATHead: the run constructed the object and did not call it, so no result was computed. 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)
# Define parameters for GATHead
in_features = 4
out_features = 3
alpha = 0.2
activation = True
device = 'cpu'
# Create input tensor: (batch_size=2, num_nodes=5, in_features=4)
input_tensor = torch.randn(2, 5, 4)
# Create adjacency matrix: (batch_size=2, num_nodes=5, num_nodes=5)
# Binary adjacency matrix where 1 indicates an edge exists
adj_matrix = torch.zeros(2, 5, 5)
# Add some edges
adj_matrix[0, 0, 1] = 1
adj_matrix[0, 1, 0] = 1
adj_matrix[0, 1, 2] = 1
adj_matrix[0, 2, 1] = 1
adj_matrix[1, 0, 2] = 1
adj_matrix[1, 2, 0] = 1
adj_matrix[1, 3, 4] = 1
ARGS = {
'in_features': in_features,
'out_features': out_features,
'alpha': alpha,
'activation': activation,
'device': device,
}
- 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 GATHead — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GATHead 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
|
| GATLayer |
Ran ran on a synthesized input · constructed an object; no result was computed |
gordicaleksa/pytorch-GAT/models/definitions/GAT.py code served (permissive licence) · get_code("5d5e29ef042a08a8") 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 an instance of its own class, GATLayer: the run constructed the object and did not call it, so no result was computed. 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 enum
class LayerType(enum.Enum):
IMP1 = (0,)
IMP2 = (1,)
IMP3 = 2
torch.manual_seed(0)
ARGS = {
"num_in_features": 4,
"num_out_features": 3,
"num_of_heads": 2,
"layer_type": LayerType.IMP1,
"concat": True,
"activation": nn.ELU(),
"dropout_prob": 0.6,
"add_skip_connection": True,
"bias": True,
"log_attention_weights": False
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type GATLayer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GATLayer 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
|
| GATLayer |
Ran ran on a synthesized input · constructed an object; no result was computed |
lukecavabarrett/pna/models/pytorch/gat/layer.py code served (permissive licence) · get_code("50fe8f71c8211753") 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 an instance of its own class, GATLayer: the run constructed the object and did not call it, so no result was computed. 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)
# Define ARGS dict with all required parameters for GATLayer.__init__
ARGS = {
'in_features': 4,
'out_features': 8,
'alpha': 0.2,
'nheads': 2,
'activation': True,
'device': 'cpu'
}
# Also prepare forward() arguments for testing
batch_size = 2
num_nodes = 3
in_features = ARGS['in_features']
# Create input tensor: (batch_size, num_nodes, in_features)
input_tensor = torch.randn(batch_size, num_nodes, in_features)
# Create adjacency matrix: (batch_size, num_nodes, num_nodes)
# Use binary adjacency (0s and 1s)
adj_tensor = torch.randint(0, 2, (batch_size, num_nodes, num_nodes)).float()
# Store forward arguments for reference
FORWARD_ARGS = {
'input': input_tensor,
'adj': adj_tensor
}
- 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 GATLayer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GATLayer 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
|
| GATLayer |
Ran ran on a synthesized input · constructed an object; no result was computed |
snowkylin/gnn/gnn.py pointer only (licence: NONE) · get_code("084e19b084167399") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, snowkylin/gnn 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. |
| GATLayer |
Ran ran on a synthesized input · constructed an object; no result was computed |
zhao-tong/GNNs-easy-to-use/GNNs.py pointer only (licence: NONE) · get_code("2e1cd02fdff09cfc") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, zhao-tong/GNNs-easy-to-use 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. |
| GATLayer |
Ran ran on a synthesized input · constructed an object; no result was computed |
giuseppefutia/link-prediction-code/net.py pointer only (licence: NONE) · get_code("52e34cb027943420") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, giuseppefutia/link-prediction-code 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. |
| GATLayerImp3 |
Ran ran on a synthesized input · constructed an object; no result was computed |
gordicaleksa/pytorch-GAT/models/definitions/GAT.py code served (permissive licence) · get_code("21ba3ceb8353096e") 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 an instance of its own class, GATLayerImp3: the run constructed the object and did not call it, so no result was computed. 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 enum
class LayerType(enum.Enum):
IMP1 = (0,)
IMP2 = (1,)
IMP3 = 2
torch.manual_seed(0)
# Small tensors for testing
num_in_features = 4
num_out_features = 3
num_of_heads = 2
num_nodes = 2
# Create node features: (num_nodes, num_in_features)
in_nodes_features = torch.randn(num_nodes, num_in_features)
# Create edge index: (2, num_edges)
edge_index = torch.tensor([[0, 1], [1, 0]], dtype=torch.long).t().contiguous()
# Package data as expected by forward
data = (in_nodes_features, edge_index)
ARGS = {
'num_in_features': num_in_features,
'num_out_features': num_out_features,
'num_of_heads': num_of_heads,
'concat': True,
'activation': nn.ELU(),
'dropout_prob': 0.6,
'add_skip_connection': True,
'bias': True,
'log_attention_weights': False,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type GATLayerImp3 — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GATLayerImp3 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
|
| GATNet |
Ran ran on a synthesized input |
yururyuru00/GAT_pyG/models.py pointer only (licence: NONE) · get_code("ee89af6272fb3b86") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, yururyuru00/GAT_pyG 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. |
| GATNode |
Ran ran on a synthesized input · constructed an object; no result was computed |
nnaakkaaii/g2-MLP/gnn/src/models/networks/gat_node.py code served (permissive licence) · get_code("3b5dfe5f6487483a") 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 an instance of its own class, GATNode: the run constructed the object and did not call it, so no result was computed. 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 torch_geometric.data import Data
torch.manual_seed(0)
# Create a minimal graph data object
num_nodes = 2
num_features = 4
num_classes = 3
num_edges = 2
x = torch.randn(num_nodes, num_features)
edge_index = torch.tensor([[0, 1], [1, 0]], dtype=torch.long).t().contiguous()
data = Data(x=x, edge_index=edge_index)
ARGS = {
'num_features': num_features,
'num_classes': num_classes,
'hidden_dim': 5,
'n_heads': 2,
'n_layers': 2,
'dropout_rate': 0.1
}
- 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 GATNode — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GATNode 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_BLOCKS |
Ran ran, violated the contract we drafted |
whut2962575697/gat_sementic_segmentation/roi_pooling/functions/roi_pooling.py code served (permissive licence) · get_code("c5acf386fe00c470") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned int, ndim 0, dtype family int, 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 GET_BLOCKS takes a single parameter N (an integer representing number of elements)
# and calculates how many blocks are needed given CUDA_NUM_THREADS = 1024
N = 2048 # Example: number of elements to process
ARGS = {
'N': N
}
- Setup block drafted by
- a language model, Claude Sonnet 4.5, prompt python_fixture_v1
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type int, ndim 0, dtype family int, 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
|
| GraphAttention |
Ran ran on a synthesized input · constructed an object; no result was computed |
noahtren/Graph-Attention-Networks-TensorFlow-2/gat.py code served (permissive licence) · get_code("3bd3e21f7881b3ad") 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 an instance of its own class, GraphAttention: the run constructed the object and did not call it, so no result was computed. 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 tensorflow as tf
class GraphAttention(tf.keras.layers.Layer):
def __init__(self, num_heads: int, hidden_size: int, max_neighbors: int):
super(GraphAttention, self).__init__()
self.hidden_size = hidden_size
self.max_neighbors = max_neighbors
self.num_heads = num_heads
self.attn_ws = [tf.keras.layers.Dense(hidden_size) for _ in range(num_heads)]
self.out_w = tf.keras.layers.Dense(hidden_size)
def call(self, inputs, debug=False):
"""Calculate scores of all neighboring nodes using general Luong-style
self-attention. If multiple attention heads are used, contexts are
concatenated.
# Inputs:
value: the vector relating to the node to encode. Should be of size:
[batch_size, 1, hidden_size]
query: a tensor providing embeddings for the neighbors of the node
which are to be attended to. Each query should be of size:
[batch_size, max_neighbors, hidden_size]
num_neighbors: the number of neighbors to attend to from the query
tensor. Only the first `max_neighbors` nodes are attended to.
"""
value = inputs['value']
query = inputs['query']
num_neighbors = inputs['num_neighbors']
assert value.shape[1] == 1, f'second dim of value should be 1, but was {value.shape[1]}'
assert query.shape[1] == self.max_neighbors, f'second dim of query should equal max_neighbors, but was {query.shape[1]}'
assert num_neighbors < self.max_neighbors, f'num_neighbors input of {num_neighbors} cannot be greater than max neighbors'
query = tf.concat([value, query], axis=1)
contexts = []
for i in range(self.num_heads):
query = self.attn_ws[i](query)
e = tf.matmul(value, query, transpose_b=True)
e = tf.nn.swish(e)
mask = tf.sequence_mask(num_neighbors + 1, maxlen=self.max_neighbors + 1)[:, tf.newaxis]
e = tf.where(mask, e, tf.ones_like(e) * -1000000000.0)
scores = tf.nn.softmax(e)
context = tf.matmul(scores, query)
contexts.append(context)
contexts = tf.concat(contexts, axis=-1)
x = self.out_w(contexts)
x = tf.nn.relu(x)
return x
batch_size = 2
hidden_size = 4
max_neighbors = 3
num_heads = 2
num_neighbors = 2
value = tf.random.normal([batch_size, 1, hidden_size])
query = tf.random.normal([batch_size, max_neighbors, hidden_size])
inputs = {
'value': value,
'query': query,
'num_neighbors': num_neighbors
}
ARGS = {
'num_heads': num_heads,
'hidden_size': hidden_size,
'max_neighbors': max_neighbors
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type GraphAttention — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GraphAttention 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
|
| GraphAttentionLayer |
Ran ran on a synthesized input · constructed an object; no result was computed |
pengsl-lab/mssl/MSSL/models/layers.py pointer only (licence: NONE) · get_code("ef1e2b2dc826e35c") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, pengsl-lab/mssl 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. |
| GraphAttentionLayer |
Ran ran on a synthesized input · constructed an object; no result was computed |
subercui/pyGConvAT/layers.py code served (permissive licence) · get_code("2b9d25ebc1ad21fe") 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 an instance of its own class, GraphAttentionLayer: the run constructed the object and did not call it, so no result was computed. 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 torch.nn.functional as F
torch.manual_seed(0)
class GraphAttentionLayer(nn.Module):
"""
Simple GAT layer, similar to https://arxiv.org/abs/1710.10903
"""
def __init__(self, in_features, out_features, dropout, alpha, concat=True, Wb=False):
super(GraphAttentionLayer, self).__init__()
self.dropout = dropout
self.in_features = in_features
self.out_features = out_features
self.alpha = alpha
self.concat = concat
self.W = nn.Parameter(torch.zeros(size=(in_features, out_features)))
nn.init.xavier_uniform_(self.W.data, gain=1.414)
self.a = nn.Parameter(torch.zeros(size=(3 * out_features, 1)))
nn.init.xavier_uniform_(self.a.data, gain=1.414)
self.IF_Wb = Wb
if self.IF_Wb:
self.encoder = nn.Linear(in_features=in_features, out_features=out_features)
self.leakyrelu = nn.LeakyReLU(self.alpha)
def forward(self, input, adj):
B = input.size(0)
h = input.matmul(self.W)
N = h.size()[1]
H_self = h.repeat(1, 1, N).view(B, N * N, -1)
H_neibor = h.repeat(1, N, 1)
H_corr = H_self * H_neibor
a_input = torch.cat([H_self, H_neibor, H_corr], dim=2).view(B, N, -1, 3 * self.out_features)
e = self.leakyrelu(torch.matmul(a_input, self.a).squeeze(3))
zero_vec = -9000000000000000.0 * torch.ones_like(e)
attention = torch.where(adj > 0, e, zero_vec)
attention = F.softmax(attention, dim=-1)
attention = F.dropout(attention, self.dropout, training=self.training)
if self.IF_Wb:
h_ = self.encoder(input)
h_prime = torch.matmul(attention, h_)
else:
h_prime = torch.matmul(attention, h)
if self.concat:
return F.elu(h_prime)
else:
return h_prime
def forward2(self, input, adj):
B = input.size(0)
h = input.matmul(self.W)
N = h.size()[1]
H_self = h.repeat(1, 1, N).view(B, N * N, -1)
H_neibor = h.repeat(1, N, 1)
H_corr = H_self * H_neibor
a_input = torch.cat([H_self, H_neibor, H_corr], dim=2).view(B, N, -1, 3 * self.out_features)
e = self.leakyrelu(torch.matmul(a_input, self.a).squeeze(3))
zero_vec = -9000000000000000.0 * torch.ones_like(e)
attention = torch.where(adj > 0, e, zero_vec)
attention = F.softmax(attention, dim=-1)
return attention
def __repr__(self):
return self.__class__.__name__ + ' (' + str(self.in_features) + ' -> ' + str(self.out_features) + ')'
# Setup parameters for GraphAttentionLayer
in_features = 4
out_features = 3
dropout = 0.2
alpha = 0.2
concat = True
Wb = False
# Create an instance of GraphAttentionLayer
gat_layer = GraphAttentionLayer(in_features, out_features, dropout, alpha, concat, Wb)
# Create dummy input and adjacency matrix
batch_size = 2
num_nodes = 4
input_tensor = torch.randn(batch_size, num_nodes, in_features)
adj_matrix = torch.ones(batch_size, num_nodes, num_nodes)
ARGS = {
"in_features": in_features,
"out_features": out_features,
"dropout": dropout,
"alpha": alpha,
"concat": concat,
"Wb": Wb
}
- 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 GraphAttentionLayer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GraphAttentionLayer 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
|
| GraphAttentionLayer |
Ran ran on a synthesized input · constructed an object; no result was computed |
labmlai/annotated_deep_learning_paper_implementations/labml_nn/graphs/gat/experiment.py code served (permissive licence) · get_code("f133a4cc58a34a5b") 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 an instance of its own class, GraphAttentionLayer: the run constructed the object and did not call it, so no result was computed. 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 import nn
torch.manual_seed(0)
# Create a simple graph with 2 nodes
n_nodes = 2
in_features = 4
out_features = 8
n_heads = 2
# Input node embeddings: [n_nodes, in_features]
h = torch.randn(n_nodes, in_features)
# Adjacency matrix: [n_nodes, n_nodes, n_heads]
# All edges exist in this case (all 1s)
adj_mat = torch.ones(n_nodes, n_nodes, n_heads, dtype=torch.bool)
ARGS = {
"in_features": in_features,
"out_features": out_features,
"n_heads": n_heads,
"is_concat": True,
"dropout": 0.6,
"leaky_relu_negative_slope": 0.2,
}
- 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 GraphAttentionLayer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GraphAttentionLayer 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
|
| GraphAttentionLayer |
Ran ran on a synthesized input · constructed an object; no result was computed |
Messham87/COVID_GAT/layers.py code served (permissive licence) · get_code("4830f24ef485057f") 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 an instance of its own class, GraphAttentionLayer: the run constructed the object and did not call it, so no result was computed. 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 torch.nn.functional as F
torch.manual_seed(0)
class GraphAttentionLayer(nn.Module):
"""
Simple GAT layer, similar to https://arxiv.org/abs/1710.10903
"""
def __init__(self, in_features, out_features, dropout, alpha, concat=True):
super(GraphAttentionLayer, self).__init__()
self.dropout = dropout
self.in_features = in_features
self.out_features = out_features
self.alpha = alpha
self.concat = concat
self.W = nn.Parameter(torch.empty(size=(in_features, out_features)))
nn.init.xavier_uniform_(self.W.data, gain=1.414)
self.a = nn.Parameter(torch.empty(size=(2 * out_features, 1)))
nn.init.xavier_uniform_(self.a.data, gain=1.414)
self.leakyrelu = nn.LeakyReLU(self.alpha)
def forward(self, h, adj):
Wh = torch.mm(h, self.W)
e = self._prepare_attentional_mechanism_input(Wh)
zero_vec = -9000000000000000.0 * torch.ones_like(e)
attention = torch.where(adj > 0, e, zero_vec)
attention = F.relu(attention)
attention = F.dropout(attention, self.dropout, training=self.training)
h_prime = torch.matmul(attention, Wh)
if self.concat:
return F.elu(h_prime)
else:
return h_prime
def _prepare_attentional_mechanism_input(self, Wh):
Wh1 = torch.matmul(Wh, self.a[:self.out_features, :])
Wh2 = torch.matmul(Wh, self.a[self.out_features:, :])
e = Wh1 + Wh2.T
return self.leakyrelu(e)
def __repr__(self):
return self.__class__.__name__ + ' (' + str(self.in_features) + ' -> ' + str(self.out_features) + ')'
in_features = 4
out_features = 3
dropout = 0.2
alpha = 0.2
concat = True
h = torch.randn(2, 4)
adj = torch.ones(2, 2)
ARGS = {
'in_features': in_features,
'out_features': out_features,
'dropout': dropout,
'alpha': alpha,
'concat': concat
}
- 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 GraphAttentionLayer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GraphAttentionLayer 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
|
| GraphAttentionLayer |
Ran ran on a synthesized input · constructed an object; no result was computed |
Yindong-Zhang/myGAT/layers.py code served (permissive licence) · get_code("deefaca543b8cc51") 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 an instance of its own class, GraphAttentionLayer: the run constructed the object and did not call it, so no result was computed. 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)
# Define the arguments for GraphAttentionLayer
in_features = 4
out_features = 3
dropout = 0.5
alpha = 0.2
activation = nn.ELU()
residual_connection = False
num_basis = True
# Create sample input tensor: (batch_size, num_nodes, in_features)
# batch=2, num_nodes=5, in_features=4
feat = torch.randn(2, 5, 4)
# Create sample adjacency matrix: (batch_size, num_nodes, num_nodes)
# batch=2, num_nodes=5, num_nodes=5
# Use 0s and 1s to represent edges
adj = torch.tensor([
[[1., 1., 0., 0., 1.],
[1., 1., 1., 0., 0.],
[0., 1., 1., 1., 0.],
[0., 0., 1., 1., 1.],
[1., 0., 0., 1., 1.]],
[[1., 0., 1., 1., 0.],
[0., 1., 1., 0., 1.],
[1., 1., 1., 0., 1.],
[1., 0., 0., 1., 1.],
[0., 1., 1., 1., 1.]]
])
ARGS = {
'in_features': in_features,
'out_features': out_features,
'dropout': dropout,
'alpha': alpha,
'activation': activation,
'residual_connection': residual_connection,
'num_basis': num_basis
}
- 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 GraphAttentionLayer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GraphAttentionLayer 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
|
| GraphAttentionLayer |
Ran ran; our contract draft was wrong, not the code |
gcucurull/jax-gat/models.py pointer only (licence: NONE) · get_code("aaafc660d13f4e16") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, gcucurull/jax-gat 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. |
| GraphAttentionLayer |
Ran ran on a synthesized input · constructed an object; no result was computed |
Aveek-Saha/Graph-Attention-Net/gat.py code served (permissive licence) · get_code("2b7d556bf1ddeea2") 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 an instance of its own class, GraphAttentionLayer: the run constructed the object and did not call it, so no result was computed. 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 tensorflow as tf
import numpy as np
# Set random seed for reproducibility
np.random.seed(0)
tf.random.set_seed(0)
# Define the Attention layer
class Attention(tf.keras.layers.Layer):
def __init__(self, units, activation=tf.identity, l2=0.0):
super(Attention, self).__init__()
self.l2 = l2
self.activation = activation
self.units = units
def build(self, input_shape):
H_shape, A_shape = input_shape
self.W = self.add_weight(shape=(H_shape[1], self.units), initializer='glorot_uniform', dtype=tf.float32, regularizer=tf.keras.regularizers.l2(self.l2))
self.a_1 = self.add_weight(shape=(self.units, 1), initializer='glorot_uniform', dtype=tf.float32, regularizer=tf.keras.regularizers.l2(self.l2))
self.a_2 = self.add_weight(shape=(self.units, 1), initializer='glorot_uniform', dtype=tf.float32, regularizer=tf.keras.regularizers.l2(self.l2))
def call(self, inputs):
H, A = inputs
X = H @ self.W
attn_self = X @ self.a_1
attn_neighbours = X @ self.a_2
attention = attn_self + tf.transpose(attn_neighbours)
E = tf.nn.leaky_relu(attention)
mask = -10000000000.0 * (1.0 - A)
masked_E = E + mask
alpha = tf.nn.softmax(masked_E)
H_cap = alpha @ X
out = self.activation(H_cap)
return out
# Define the GraphAttentionLayer
class GraphAttentionLayer(tf.keras.layers.Layer):
def __init__(self, units, num_heads, output_layer=False, activation=tf.identity, l2=0.0):
super(GraphAttentionLayer, self).__init__()
self.activation = activation
self.num_heads = num_heads
self.output_layer = output_layer
self.attn_layers = [Attention(units, l2=l2) for x in range(num_heads)]
def call(self, inputs):
H, A = inputs
H_out = [self.attn_layers[i]([H, A]) for i in range(self.num_heads)]
if self.output_layer:
multi_head_attn = tf.reduce_mean(tf.stack(H_out), axis=0)
out = self.activation(multi_head_attn)
else:
multi_head_attn = tf.concat(H_out, axis=-1)
out = self.activation(multi_head_attn)
return out
# Create small tensors for testing
# H: node features (batch_size=2, num_nodes=3, feature_dim=4)
H = tf.constant(np.random.randn(2, 3, 4).astype(np.float32))
# A: adjacency matrix (batch_size=2, num_nodes=3, num_nodes=3)
A = tf.constant(np.random.randint(0, 2, (2, 3, 3)).astype(np.float32))
# Build arguments dict
ARGS = {
'units': 5,
'num_heads': 2,
'output_layer': False,
'activation': tf.identity,
'l2': 0.01
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type GraphAttentionLayer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GraphAttentionLayer 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
|
| GraphAttentionLayer |
Ran ran on a synthesized input · constructed an object; no result was computed |
AngusMonroe/GAT-pytorch/layers.py code served (permissive licence) · get_code("bfd816be65963aae") 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 an instance of its own class, GraphAttentionLayer: the run constructed the object and did not call it, so no result was computed. 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 torch.nn.functional as F
torch.manual_seed(0)
class GraphAttentionLayer(nn.Module):
"""
带有attention计算的网络层
"""
def __init__(self, in_features, out_features, dropout, alpha, concat=True):
"""
参数:in_features 输入节点的特征数F
参数:out_features 输出的节点的特征数F'
参数:dropout
参数:alpha LeakyRelu激活函数的斜率
参数:concat
"""
super(GraphAttentionLayer, self).__init__()
self.dropout = dropout
self.in_features = in_features
self.out_features = out_features
self.alpha = alpha
self.concat = concat
self.W = nn.Parameter(torch.zeros(size=(in_features, out_features)))
nn.init.xavier_uniform_(self.W.data, gain=1.414)
self.a = nn.Parameter(torch.zeros(size=(2 * out_features, 1)))
nn.init.xavier_uniform_(self.a.data, gain=1.414)
self.leakyrelu = nn.LeakyReLU(self.alpha)
def forward(self, input, adj):
"""
参数input:表示输入的各个节点的特征矩阵
参数adj :表示邻接矩阵
"""
h = torch.mm(input, self.W)
N = h.size()[0]
a_input = torch.cat([h.repeat(1, N).view(N * N, -1), h.repeat(N, 1)], dim=1).view(N, -1, 2 * self.out_features)
e = self.leakyrelu(torch.matmul(a_input, self.a).squeeze(2))
zero_vec = -9000000000000000.0 * torch.ones_like(e)
attention = torch.where(adj > 0, e, zero_vec)
attention = F.softmax(attention, dim=1)
attention = F.dropout(attention, self.dropout, training=self.training)
h_prime = torch.matmul(attention, h)
if self.concat:
return F.elu(h_prime)
else:
return h_prime
def __repr__(self):
return self.__class__.__name__ + ' (' + str(self.in_features) + ' -> ' + str(self.out_features) + ')'
# Create small test tensors
num_nodes = 2
in_features = 4
out_features = 3
# Input feature matrix: (num_nodes, in_features)
input_tensor = torch.randn(num_nodes, in_features)
# Adjacency matrix: (num_nodes, num_nodes)
adj_matrix = torch.tensor([[1.0, 1.0],
[1.0, 1.0]])
ARGS = {
"in_features": 4,
"out_features": 3,
"dropout": 0.2,
"alpha": 0.2,
"concat": True
}
- 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 GraphAttentionLayer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GraphAttentionLayer 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
|
| GraphAttentionLayer |
Ran ran on a synthesized input · constructed an object; no result was computed |
basiralab/RG-Select/models_gat.py pointer only (licence: NONE) · get_code("7de5ed842bb1f8ae") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, basiralab/RG-Select 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. |
| GraphAttentionLayer |
Ran ran on a synthesized input |
weiyangfb/PyTorchSparseGAT/models.py code served (permissive licence) · get_code("a1460d4df9be2ad5") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 2, dtype family float, shape (2, 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 torch.nn as nn
import torch.nn.functional as F
class GraphAttentionLayer(nn.Module):
"""
Simple GAT layer, similar to https://arxiv.org/abs/1710.10903
"""
def __init__(self, in_features, out_features, dropout, alpha, concat=True):
super(GraphAttentionLayer, self).__init__()
self.dropout = dropout
self.in_features = in_features
self.out_features = out_features
self.alpha = alpha
self.concat = concat
self.dropout = dropout
self.W = nn.Parameter(torch.zeros(size=(in_features, out_features)))
nn.init.xavier_uniform_(self.W.data, gain=1.414)
self.a = nn.Parameter(torch.zeros(size=(2 * out_features, 1)))
nn.init.xavier_uniform_(self.a.data, gain=1.414)
self.leakyrelu = nn.LeakyReLU(self.alpha)
def forward(self, input, adj):
h = torch.mm(input, self.W)
N = h.size()[0]
a_input = torch.cat([h.repeat(1, N).view(N * N, -1), h.repeat(N, 1)], dim=1).view(N, -1, 2 * self.out_features)
e = self.leakyrelu(torch.matmul(a_input, self.a).squeeze(2))
zero_vec = -9000000000000000.0 * torch.ones_like(e)
attention = torch.where(adj > 0, e, zero_vec)
attention = F.softmax(attention, dim=1)
attention = F.dropout(attention, self.dropout, training=self.training)
h_prime = torch.matmul(attention, h)
if self.concat:
return F.elu(h_prime)
else:
return h_prime
def __repr__(self):
return self.__class__.__name__ + ' (' + str(self.in_features) + ' -> ' + str(self.out_features) + ')'
INIT_ARGS = {
'in_features': 4,
'out_features': 3,
'dropout': 0.2,
'alpha': 0.2,
'concat': True
}
ARGS = {
'input': torch.randn(2, 4),
'adj': torch.ones(2, 2)
}
if __name__ == '__main__':
layer = GraphAttentionLayer(**INIT_ARGS)
output = layer(**ARGS)
print(f"Output shape: {output.shape}")
print(f"Output: {output}")
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Tensor, ndim 2, dtype family float, shape (2, 3) — shape (2, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| GraphAttentionLayer |
Ran ran on a synthesized input |
tatp22/pytorch-fast-GAT/fast_gat/GAT.py code served (permissive licence) · get_code("5ae6f08a8fb439cf") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, 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 torch
import numpy as np
from collections import defaultdict
INIT_ARGS = {
'heads': 2,
'input_dim': 4,
'intermediate_dim': 3,
'output_dim': 5
}
# Create small stand-in data
batch_size = 2
num_nodes = 3
# Node features: (num_nodes, input_dim)
nodes = torch.randn(num_nodes, INIT_ARGS['input_dim'])
# Edges: dict mapping node index to set of neighbor indices
edges = defaultdict(set)
edges[0] = {1, 2}
edges[1] = {0, 2}
edges[2] = {0, 1}
ARGS = {
'nodes': nodes,
'edges': edges
}
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Tensor, ndim 2, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
- 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| GraphAttentionLayer |
Ran ran on a synthesized input |
dzb1998/pyGAT/layers.py code served (permissive licence) · get_code("81f6c5575edeb0bf") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 2, dtype family float, shape (2, 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 torch.nn as nn
import torch.nn.functional as F
class GraphAttentionLayer(nn.Module):
"""
Simple GAT layer, similar to https://arxiv.org/abs/1710.10903
"""
def __init__(self, in_features, out_features, dropout, alpha, concat=True):
super(GraphAttentionLayer, self).__init__()
self.dropout = dropout
self.in_features = in_features
self.out_features = out_features
self.alpha = alpha
self.concat = concat
self.W = nn.Parameter(torch.zeros(size=(in_features, out_features)))
nn.init.xavier_uniform_(self.W.data, gain=1.414)
self.a = nn.Parameter(torch.zeros(size=(2 * out_features, 1)))
nn.init.xavier_uniform_(self.a.data, gain=1.414)
self.leakyrelu = nn.LeakyReLU(self.alpha)
def forward(self, input, adj):
h = torch.mm(input, self.W)
N = h.size()[0]
a_input = torch.cat([h.repeat(1, N).view(N * N, -1), h.repeat(N, 1)], dim=1).view(N, -1, 2 * self.out_features)
e = self.leakyrelu(torch.matmul(a_input, self.a).squeeze(2))
zero_vec = -9000000000000000.0 * torch.ones_like(e)
attention = torch.where(adj > 0, e, zero_vec)
attention = F.softmax(attention, dim=1)
attention = F.dropout(attention, self.dropout, training=self.training)
h_prime = torch.matmul(attention, h)
if self.concat:
return F.elu(h_prime)
else:
return h_prime
def __repr__(self):
return self.__class__.__name__ + ' (' + str(self.in_features) + ' -> ' + str(self.out_features) + ')'
INIT_ARGS = {
'in_features': 4,
'out_features': 3,
'dropout': 0.2,
'alpha': 0.2,
'concat': True
}
ARGS = {
'input': torch.randn(2, 4),
'adj': torch.ones(2, 2)
}
if __name__ == '__main__':
layer = GraphAttentionLayer(**INIT_ARGS)
output = layer(**ARGS)
print(f"Output shape: {output.shape}")
print(f"Output: {output}")
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Tensor, ndim 2, dtype family float, shape (2, 3) — shape (2, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| GraphAttentionLayer |
Ran ran on a synthesized input |
fongyk/graph-attention/layer.py pointer only (licence: NONE) · get_code("d1505ed1f609826b") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, fongyk/graph-attention 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. |
| GraphAttentionNetwork |
Ran ran on a synthesized input |
tatp22/pytorch-fast-GAT/fast_gat/GAT.py code served (permissive licence) · get_code("0426746ace37676b") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, 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 torch
import numpy as np
INIT_ARGS = {
"depth": 2,
"heads": 2,
"input_dim": 4,
"inner_dim": 3
}
# Create a small graph with 2 nodes
nodes = torch.randn(2, 4) # 2 nodes, 4 features each
# Edges dictionary: node 0 has edges to node 1, node 1 has edge to node 0
edges = {
0: {1},
1: {0}
}
ARGS = {
"nodes": nodes,
"edges": edges
}
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Tensor, ndim 2, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
- 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| GraphConvolutionLayer |
Ran ran on a synthesized input |
Yindong-Zhang/myGAT/layers.py code served (permissive licence) · get_code("1dbf66eba24dbc7e") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned NoneType. 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
INIT_ARGS = {}
# Create a small graph with 5 nodes and feature dimension 4
num_nodes = 5
feat_dim = 4
# Create node features: (num_nodes, feat_dim)
feat = torch.randn(num_nodes, feat_dim)
# Create adjacency matrix: (num_nodes, num_nodes)
# Simple undirected graph with some connections
adj = torch.tensor([
[1.0, 1.0, 0.0, 0.0, 0.0],
[1.0, 1.0, 1.0, 0.0, 0.0],
[0.0, 1.0, 1.0, 1.0, 0.0],
[0.0, 0.0, 1.0, 1.0, 1.0],
[0.0, 0.0, 0.0, 1.0, 1.0]
], dtype=torch.float32)
ARGS = {
'feat': feat,
'adj': adj
}
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type NoneType — a NoneType output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a NoneType 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| MultiHeadLayer |
Ran ran; our contract draft was wrong, not the code |
gcucurull/jax-gat/models.py pointer only (licence: NONE) · get_code("5a977055a872edd8") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, gcucurull/jax-gat 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. |
| NodeApplyModule |
Ran ran on a synthesized input · constructed an object; no result was computed |
giuseppefutia/link-prediction-code/net.py pointer only (licence: NONE) · get_code("debb79dfd7fbb165") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, giuseppefutia/link-prediction-code 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. |
| SpGraphAttentionLayer |
Ran ran on a synthesized input · constructed an object; no result was computed |
HazyResearch/hgcn/layers/att_layers.py pointer only (licence: NONE) · get_code("f2e88290d89e5830") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, HazyResearch/hgcn 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. |
| SpecialSpmmFunction |
Ran ran on a synthesized input · constructed an object; no result was computed |
HazyResearch/hgcn/layers/att_layers.py pointer only (licence: NONE) · get_code("3e9e9056af401802") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, HazyResearch/hgcn 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. |
| adj_to_bias |
Ran ran on a synthesized input |
404nofound/gat/utils/process.py code served (permissive licence) · get_code("5a0b371866f14f67") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 3, dtype family float, shape (2, 4, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
# Create small adjacency matrices
# adj needs shape (nb_graphs, n_nodes, n_nodes)
# Let's create 2 graphs with 4 nodes each
nb_graphs = 2
n_nodes = 4
adj = np.zeros((nb_graphs, n_nodes, n_nodes))
# Graph 0: simple chain-like adjacency
adj[0] = np.array([
[0, 1, 0, 0],
[1, 0, 1, 0],
[0, 1, 0, 1],
[0, 0, 1, 0]
], dtype=float)
# Graph 1: different structure
adj[1] = np.array([
[0, 1, 1, 0],
[1, 0, 0, 1],
[1, 0, 0, 1],
[0, 1, 1, 0]
], dtype=float)
# sizes: number of valid nodes in each graph (can be less than n_nodes)
# sizes[g] determines the range [0, sizes[g]) for valid indices
sizes = np.array([4, 3])
# nhood: neighborhood parameter for the loop
nhood = 1
ARGS = {
"adj": adj,
"sizes": sizes,
"nhood": nhood
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ndarray, ndim 3, dtype family float, shape (2, 4, 4) — shape (2, 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
|
| attention_layer |
Ran ran on a synthesized input |
liu6zijian/simplified-gcn-model/gat.py pointer only (licence: NONE) · get_code("6ece140d37c4f3d6") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, liu6zijian/simplified-gcn-model 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. |
| dfs_split |
Ran ran on a synthesized input |
404nofound/gat/utils/process_ppi.py code served (permissive licence) · get_code("fa7f6abbe630e912") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family int, shape (5,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
from scipy import sparse
# Construct a sparse adjacency matrix for a small graph
# Create a graph with 5 nodes and some edges to form multiple connected components
rows = [0, 0, 1, 1, 2, 3, 4]
cols = [0, 1, 0, 1, 2, 4, 3]
data = [1, 1, 1, 1, 1, 1, 1]
# Create a sparse matrix (CSR format works well with nonzero())
adj = sparse.csr_matrix((data, (rows, cols)), shape=(5, 5))
ARGS = {
"adj": adj
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ndarray, ndim 1, dtype family int, shape (5,) — shape (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
|
| encode_onehot |
Ran ran; our contract draft was wrong, not the code |
Anak2016/GAT/utils.py code served (permissive licence) · get_code("3ab88254add4c192") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family int, shape (6, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
# The function encode_onehot takes labels as input
# labels should be an array-like of class labels (integers, strings, etc.)
# The function creates a one-hot encoding mapping for unique classes
# Create sample labels with multiple distinct classes
labels = np.array([0, 1, 2, 1, 0, 2], dtype=int)
ARGS = {
"labels": labels
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ndarray, ndim 2, dtype family int, shape (6, 3) — shape (6, 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
|
| encode_onehot_dict |
Ran ran; our contract draft was wrong, not the code |
joaopedromattos/gnee/utils.py code served (permissive licence) · get_code("1562c6eb2b599cd7") 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)
# The function encode_onehot_dict takes a labels parameter
# It creates a set from labels, then builds a dictionary mapping each class to an index
# labels should be an iterable of class labels
labels = ['cat', 'dog', 'cat', 'bird', 'dog', 'bird']
ARGS = {
'labels': labels
}
- 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
|
| full_mask_mixer |
Ran ran; our contract draft was wrong, not the code |
davidpicard/homm/src/model/network/gnn_layers.py pointer only (licence: NONE) · get_code("18df0c54b9715ca4") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, davidpicard/homm 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. |
| gat_model |
Ran ran on a synthesized input |
liu6zijian/simplified-gcn-model/gat.py pointer only (licence: NONE) · get_code("710685ce65391a79") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, liu6zijian/simplified-gcn-model 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. |
| gat_msg |
Ran ran; our contract draft was wrong, not the code |
giuseppefutia/link-prediction-code/net.py pointer only (licence: NONE) · get_code("6083fea83bb7098c") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, giuseppefutia/link-prediction-code 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. |
| getpid |
Ran ran, honoured the contract we drafted |
zxhhh97/ABot/scorelist.py code served (permissive licence) · get_code("6e566909474e4531") 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 int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.multiprocessing as mp
import time
torch.manual_seed(0)
# The function getpid takes one parameter (_) and doesn't use it
# It just sleeps and returns the current process pid
# So we can pass any value
ARGS = {
"_": None
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type int, ndim 0, dtype family int, 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
|
| group_norm |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
whut2962575697/gat_sementic_segmentation/layers.py pointer only (licence: MIT); the stored copy get_code serves, from astuary/flow, is pointer only (licence: NONE) · get_code("df538da77a5d06bd") 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 astuary/flow, 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. |
| make_dot |
Ran ran; our contract draft was wrong, not the code |
Anak2016/GAT/visualize_graph.py code served (permissive licence) · get_code("bca7f86b2fb5bf67") 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 Digraph. 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 simple computation graph
x = torch.randn(2, 4, requires_grad=True)
w = torch.randn(4, 3, requires_grad=True)
b = torch.randn(3, requires_grad=True)
# Forward pass to build autograd graph
y = torch.matmul(x, w) + b
loss = y.sum()
loss.backward()
# Create params dict with named parameters
params = {
'x': x,
'w': w,
'b': b
}
# var should be the output variable (with grad_fn) from backward pass
var = loss
ARGS = {
'var': var,
'params': params
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- graphviz, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Digraph — a Digraph output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Digraph 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
|
| mask_mixer |
Ran ran; our contract draft was wrong, not the code |
davidpicard/homm/src/model/network/gnn_layers.py pointer only (licence: NONE) · get_code("7c2fe0a109d8552e") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, davidpicard/homm 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. |
| matmul |
Ran ran; our contract draft was wrong, not the code |
ds4dm/sGat/sgcn/masked/functions.py code served (permissive licence) · get_code("cb6188faef06c446") 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, 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)
# Create a small sparse matrix A with shape (4, 3)
# We'll define it with COO format: indices, values, size
row_indices = torch.tensor([0, 1, 2, 3])
col_indices = torch.tensor([0, 1, 2, 0])
indices = torch.stack([row_indices, col_indices])
values = torch.tensor([1.0, 2.0, 3.0, 4.0])
size = torch.Size([4, 3])
# Create dense matrix B with shape (3, 2)
B = torch.randn(3, 2)
ARGS = {
"indices": indices,
"values": values,
"size": size,
"B": B,
}
- 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 (4, 2) — shape (4, 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
|
| matmulmasked |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
ds4dm/sGat/sgcn/masked/functions.py code served (permissive licence) · get_code("8d9b7d17ab1ab2c1") 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 (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)
# Create tensors A (n x p) and B (p x m)
n, p, m = 2, 4, 3
A = torch.randn(n, p)
B = torch.randn(p, m)
# Create indices for sparse tensor format
# indices should be a tuple of (idx, jdx) where idx are row indices and jdx are column indices
# We'll create a small example with a few non-zero positions
idx = torch.tensor([0, 1, 0], dtype=torch.long)
jdx = torch.tensor([0, 1, 2], dtype=torch.long)
indices = (idx, jdx)
ARGS = {
"A": A,
"B": B,
"indices": indices,
}
- 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 (3,) — shape (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
|
| normalize_adj |
Ran ran; our contract draft was wrong, not the code |
Anak2016/GAT/utils.py pointer only (licence: MIT); the stored copy get_code serves, from triplej0079/DeepIM, is pointer only (licence: NONE) · get_code("d45f434d25f2e870") 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 triplej0079/DeepIM, 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. |
| parse_index_file |
Ran ran, honoured the contract we drafted |
404nofound/gat/utils/process.py pointer only (licence: MIT); the stored copy get_code serves, from DSL-Lab/Specformer, is pointer only (licence: GPL-3.0) · get_code("c1d6392f89c5e495") 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 DSL-Lab/Specformer, and GPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. 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. |
| process_event_dataset_from_networkx |
Ran ran; our contract draft was wrong, not the code |
joaopedromattos/gnee/event_graph_utils.py code served (permissive licence) · get_code("588bba8cc8a33264") 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
import networkx as nx
import pandas as pd
# Create a small NetworkX graph with required node attributes
G = nx.Graph()
# Add nodes with required attributes
# Each node needs: 'id', features_attr (default 'f'), and optionally 'train', 'test', 'label'
node_features = {
0: np.array([0.1, 0.2, 0.3, 0.4]),
1: np.array([0.5, 0.6, 0.7, 0.8]),
2: np.array([0.9, 0.1, 0.2, 0.3]),
3: np.array([0.4, 0.5, 0.6, 0.7]),
}
for node_id, feature in node_features.items():
G.add_node(node_id)
G.nodes[node_id]['id'] = node_id
G.nodes[node_id]['f'] = feature
# Add train attribute to first 2 nodes
if node_id < 2:
G.nodes[node_id]['train'] = True
# Add test attribute to last 2 nodes
if node_id >= 2:
G.nodes[node_id]['test'] = True
# Add label attribute to all nodes
G.nodes[node_id]['label'] = f'class_{node_id % 2}'
# Add some edges to make it a connected graph
G.add_edges_from([(0, 1), (1, 2), (2, 3), (3, 0)])
ARGS = {
'G': G,
'features_attr': 'f',
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- networkx, numpy, pandas — 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
|
| roi_pooling_2d_pytorch |
Ran ran; our contract draft was wrong, not the code |
whut2962575697/gat_sementic_segmentation/roi_pooling/functions/roi_pooling.py code served (permissive licence) · get_code("1e557c37f1d14adf") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (3, 3, 7, 7) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn.functional as F
torch.manual_seed(0)
# Construct input tensor: batch of images
# Shape: (batch_size, channels, height, width)
# Using small but distinct dimensions: 2 images, 3 channels, 8x8 spatial
input_tensor = torch.randn(2, 3, 8, 8)
# Construct rois tensor
# Shape: (num_rois, 5) where each row is [batch_idx, x1, y1, x2, y2]
# Using 3 ROIs across the 2 batches
rois = torch.tensor([
[0, 1, 1, 4, 4], # ROI in batch 0
[0, 2, 2, 5, 5], # ROI in batch 0
[1, 1, 1, 3, 3], # ROI in batch 1
], dtype=torch.float32)
# Output size for pooling
output_size = (7, 7)
# Spatial scale factor
spatial_scale = 1.0
ARGS = {
"input": input_tensor,
"rois": rois,
"output_size": output_size,
"spatial_scale": spatial_scale,
}
- 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 float, shape (3, 3, 7, 7) — shape (3, 3, 7, 7) 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_mask |
Ran ran, violated the contract we drafted |
404nofound/gat/utils/process.py code served (permissive licence) · get_code("b32fd748b4bbe3bf") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned ndarray, ndim 1, dtype family float, shape (5,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
# Analyze the function:
# - idx: used as an index into mask array, should be an integer or array of integers
# - l: used as the length parameter for np.zeros, should be an integer
# Create valid arguments
idx = 2 # Single index into the mask array
l = 5 # Length of the mask array
ARGS = {
"idx": idx,
"l": l
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ndarray, ndim 1, dtype family float, shape (5,) — shape (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
|
| setup_logger |
Ran ran; our contract draft was wrong, not the code |
whut2962575697/gat_sementic_segmentation/utils.py code served (permissive licence) · get_code("d465a0df5a49343f") 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 Logger. 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 logging
import os
import sys
import tempfile
import datetime
# Create a temporary directory for logging
temp_dir = tempfile.mkdtemp()
ARGS = {
'name': 'test_logger',
'save_dir': temp_dir,
'distributed_rank': 0,
'train': True
}
- 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 Logger — a Logger output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Logger 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
|