| split_graph |
Ran ran; our contract draft was wrong, not the code |
Zhuofeng-Li/TEG-Benchmark/GNN/model/Dataloader.py code served (permissive licence) · get_code("2ead908edee5bf31") 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
ARGS = {
"nodes_num": 100,
"train_ratio": 0.7,
"val_ratio": 0.2
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — a tuple output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| test |
Ran ran; our contract draft was wrong, not the code |
Zhuofeng-Li/TEG-Benchmark/GNN/GNN_Link_HitsK.py code served (permissive licence) · get_code("f0581e5668ba1873") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
from torch.utils.data import DataLoader
torch.manual_seed(0)
# Model: needs to accept (x, adj_t) and return node embeddings h
class SimpleGNNModel(nn.Module):
def __init__(self, input_dim, hidden_dim):
super().__init__()
self.linear = nn.Linear(input_dim, hidden_dim)
def forward(self, x, adj_t):
# Simple pass-through for testing
return self.linear(x)
# Predictor: needs to accept two node embeddings and return scores
class SimplePredictor(nn.Module):
def __init__(self, hidden_dim):
super().__init__()
self.linear = nn.Linear(hidden_dim * 2, 1)
def forward(self, h1, h2):
combined = torch.cat([h1, h2], dim=-1)
return self.linear(combined)
# Evaluator: needs eval method that accepts y_pred_pos, y_pred_neg and returns dict with hits@K
class SimpleEvaluator:
def __init__(self):
self.K = 10
def eval(self, data):
# Simple mock evaluator that returns random hits
pos_pred = data['y_pred_pos']
neg_pred = data['y_pred_neg']
# Mock hits calculation
hits = torch.sigmoid(pos_pred.mean() - neg_pred.mean()).item()
return {f'hits@{self.K}': hits}
# Set up parameters
num_nodes = 6
input_dim = 4
hidden_dim = 3
num_train_edges = 2
num_valid_edges = 2
num_test_edges = 2
# Create model and predictor
model = SimpleGNNModel(input_dim, hidden_dim)
predictor = SimplePredictor(hidden_dim)
# Create node features
x = torch.randn(num_nodes, input_dim)
# Create adjacency (sparse tensor format)
adj_t = torch.sparse_coo_tensor(
indices=torch.tensor([[0, 1, 2], [1, 2, 3]]),
values=torch.ones(3),
size=(num_nodes, num_nodes)
)
# Create edge split dictionary
edge_split = {
'train': {
'edge': torch.tensor([[0, 1], [1, 2], [2, 3], [3, 4]], dtype=torch.long)
},
'valid': {
'edge': torch.tensor([[0, 2], [1, 3], [2, 4], [3, 5]], dtype=torch.long),
'edge_neg': torch.tensor([[0, 3], [1, 4], [2, 5], [3, 0]], dtype=torch.long)
},
'test': {
'edge': torch.tensor([[0, 4], [1, 5], [2, 0], [3, 1]], dtype=torch.long),
'edge_neg': torch.tensor([[0, 5], [1, 0], [2, 1], [3, 2]], dtype=torch.long)
}
}
# Create evaluator
evaluator = SimpleEvaluator()
# Batch size
batch_size = 2
ARGS = {
'model': model,
'predictor': predictor,
'x': x,
'adj_t': adj_t,
'edge_split': edge_split,
'evaluator': evaluator,
'batch_size': batch_size
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| test |
Ran ran; our contract draft was wrong, not the code |
Zhuofeng-Li/TEG-Benchmark/GNN/GNN_Link_HitsK_loader.py code served (permissive licence) · get_code("64d97bf20e2f647a") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
torch.manual_seed(0)
# Define a minimal model that takes x and adj_t
class MinimalModel(nn.Module):
def __init__(self, input_dim, hidden_dim):
super().__init__()
self.linear = nn.Linear(input_dim, hidden_dim)
def forward(self, x, adj_t):
# x: node features, adj_t: adjacency
return self.linear(x)
# Define a minimal predictor that takes two node embeddings
class MinimalPredictor(nn.Module):
def __init__(self, hidden_dim):
super().__init__()
self.linear = nn.Linear(hidden_dim * 2, 1)
def forward(self, h_src, h_dst):
# Concatenate source and destination embeddings
combined = torch.cat([h_src, h_dst], dim=-1)
return self.linear(combined)
# Define a minimal batch class
class MinimalBatch:
def __init__(self, num_nodes, num_edges, feature_dim):
self.x = torch.randn(num_nodes, feature_dim)
self.adj_t = torch.randn(num_nodes, num_nodes)
self.edge_label_index = torch.tensor([[0, 1, 2], [1, 2, 0]], dtype=torch.long)
def to(self, device):
self.x = self.x.to(device)
self.adj_t = self.adj_t.to(device)
self.edge_label_index = self.edge_label_index.to(device)
return self
# Define a minimal evaluator
class MinimalEvaluator:
def __init__(self):
self.K = 10
def eval(self, data):
# data contains 'y_pred_pos' and 'y_pred_neg'
pos_pred = data['y_pred_pos']
neg_pred = data['y_pred_neg']
# Simple mock evaluation: return hits based on K
hits = min(self.K, len(pos_pred)) / max(1, len(pos_pred))
return {f'hits@{self.K}': hits}
# Setup components
device = 'cpu'
input_dim = 4
hidden_dim = 3
num_nodes = 5
num_edges = 3
feature_dim = 4
model = MinimalModel(input_dim, hidden_dim)
model.eval()
predictor = MinimalPredictor(hidden_dim)
predictor.eval()
# Create dataloaders (lists of batches)
train_loader = [MinimalBatch(num_nodes, num_edges, feature_dim) for _ in range(2)]
valid_loader = [MinimalBatch(num_nodes, num_edges, feature_dim) for _ in range(2)]
valid_negative_loader = [MinimalBatch(num_nodes, num_edges, feature_dim) for _ in range(2)]
test_loader = [MinimalBatch(num_nodes, num_edges, feature_dim) for _ in range(2)]
test_negative_loader = [MinimalBatch(num_nodes, num_edges, feature_dim) for _ in range(2)]
dataloaders = {
'train': train_loader,
'valid': valid_loader,
'valid_negative': valid_negative_loader,
'test': test_loader,
'test_negative': test_negative_loader
}
evaluator = MinimalEvaluator()
ARGS = {
'model': model,
'predictor': predictor,
'dataloaders': dataloaders,
'evaluator': evaluator,
'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 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
|
| test |
Ran ran; our contract draft was wrong, not the code |
Zhuofeng-Li/TEG-Benchmark/GNN/GNN_Link_MRR.py code served (permissive licence) · get_code("8b3cabb047d30449") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
from torch.utils.data import DataLoader
torch.manual_seed(0)
# Build a minimal model that takes x and adj_t and returns embeddings h
class SimpleModel(nn.Module):
def __init__(self, input_dim, output_dim):
super().__init__()
self.linear = nn.Linear(input_dim, output_dim)
def forward(self, x, adj_t):
# Just return a simple embedding based on x
return self.linear(x)
# Build a minimal predictor that takes two embeddings and returns a score
class SimplePredictor(nn.Module):
def __init__(self, embedding_dim):
super().__init__()
self.linear = nn.Linear(embedding_dim * 2, 1)
def forward(self, h_src, h_dst):
combined = torch.cat([h_src, h_dst], dim=-1)
return self.linear(combined)
# Build a minimal evaluator
class SimpleEvaluator:
def eval(self, input_dict):
# Returns a dict with 'mrr_list' containing a tensor
y_pred_pos = input_dict['y_pred_pos']
y_pred_neg = input_dict['y_pred_neg']
# Return dummy MRR values
mrr_list = torch.tensor([0.8])
return {'mrr_list': mrr_list}
# Set up dimensions
num_nodes = 8
input_dim = 4
embedding_dim = 3
batch_size = 2
neg_len = 2
# Create model and predictor
model = SimpleModel(input_dim, embedding_dim)
predictor = SimplePredictor(embedding_dim)
# Create node features
x = torch.randn(num_nodes, input_dim)
# Create adjacency (sparse tensor)
adj_t = torch.sparse_coo_tensor(
indices=torch.tensor([[0, 1, 2], [1, 2, 3]]),
values=torch.ones(3),
size=(num_nodes, num_nodes)
)
# Create edge_split with the required structure
edge_split = {
'eval_train': {
'source_node': torch.tensor([0, 1, 2, 3]),
'target_node': torch.tensor([1, 2, 3, 4]),
'target_node_neg': torch.tensor([5, 6, 7, 5, 6, 7, 5, 6]),
},
'valid': {
'source_node': torch.tensor([2, 3]),
'target_node': torch.tensor([4, 5]),
'target_node_neg': torch.tensor([6, 7, 6, 7]),
},
'test': {
'source_node': torch.tensor([4, 5]),
'target_node': torch.tensor([6, 7]),
'target_node_neg': torch.tensor([0, 1, 0, 1]),
}
}
# Create evaluator
evaluator = SimpleEvaluator()
ARGS = {
'model': model,
'predictor': predictor,
'x': x,
'adj_t': adj_t,
'edge_split': edge_split,
'evaluator': evaluator,
'batch_size': batch_size,
'neg_len': neg_len,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| train |
Ran ran; our contract draft was wrong, not the code |
Zhuofeng-Li/TEG-Benchmark/GNN/GNN_Link_HitsK.py code served (permissive licence) · get_code("b9125d103f13768d") 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 float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
from torch.optim import Adam
torch.manual_seed(0)
# Define a minimal GNN model that takes x and adj_t
class SimpleGNN(nn.Module):
def __init__(self, in_features, hidden_features):
super().__init__()
self.linear = nn.Linear(in_features, hidden_features)
def forward(self, x, adj_t):
# Just return a transformation of x for this test
return self.linear(x)
# Define a minimal predictor that takes two node embeddings
class SimplePredictor(nn.Module):
def __init__(self, hidden_features):
super().__init__()
self.linear = nn.Linear(hidden_features * 2, 1)
def forward(self, h_i, h_j):
# Concatenate and predict link probability
combined = torch.cat([h_i, h_j], dim=-1)
return torch.sigmoid(self.linear(combined))
# Create small tensors
num_nodes = 5
input_dim = 4
hidden_dim = 3
x = torch.randn(num_nodes, input_dim)
adj_t = torch.eye(num_nodes) # Simple identity adjacency for testing
# Create model and predictor
model = SimpleGNN(input_dim, hidden_dim)
predictor = SimplePredictor(hidden_dim)
# Create optimizer
optimizer = Adam(list(model.parameters()) + list(predictor.parameters()), lr=0.01)
# Create edge_split with train edges
# Need at least a few edges for the batch to work
edge_split = {
'train': {
'edge': torch.tensor([
[0, 1],
[1, 2],
[2, 3],
[3, 4],
[0, 2]
], dtype=torch.long)
}
}
batch_size = 2
ARGS = {
'model': model,
'predictor': predictor,
'x': x,
'adj_t': adj_t,
'edge_split': edge_split,
'optimizer': optimizer,
'batch_size': batch_size
}
- 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 float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| train |
Ran ran, honoured the contract we drafted |
Zhuofeng-Li/TEG-Benchmark/GNN/GNN_Link_HitsK_loader.py code served (permissive licence) · get_code("93ed7f8d21768471") 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 float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
from torch.optim import Adam
torch.manual_seed(0)
# Define a simple model that takes x and adj_t and returns node embeddings
class SimpleGNNModel(nn.Module):
def __init__(self, input_dim, hidden_dim):
super().__init__()
self.linear = nn.Linear(input_dim, hidden_dim)
def forward(self, x, adj_t):
# x: [num_nodes, input_dim]
# adj_t: sparse adjacency matrix
# Return: [num_nodes, hidden_dim]
return self.linear(x)
# Define a simple predictor that takes two node embeddings and predicts edge probability
class SimplePredictor(nn.Module):
def __init__(self, hidden_dim):
super().__init__()
self.linear = nn.Linear(2 * hidden_dim, 1)
def forward(self, h_src, h_dst):
# h_src: [num_edges, hidden_dim]
# h_dst: [num_edges, hidden_dim]
# Return: [num_edges, 1]
combined = torch.cat([h_src, h_dst], dim=1)
return torch.sigmoid(self.linear(combined)).squeeze(-1)
# Define a simple batch class
class Batch:
def __init__(self, x, adj_t, edge_label_index):
self.x = x
self.adj_t = adj_t
self.edge_label_index = edge_label_index
def to(self, device):
self.x = self.x.to(device)
self.adj_t = self.adj_t.to(device)
self.edge_label_index = self.edge_label_index.to(device)
return self
# Create toy data
num_nodes = 5
input_dim = 4
hidden_dim = 3
num_edges = 2
# Node features: [num_nodes, input_dim]
x = torch.randn(num_nodes, input_dim)
# Adjacency matrix (sparse tensor)
indices = torch.tensor([[0, 1], [1, 2]]).t().contiguous()
values = torch.ones(2)
adj_t = torch.sparse_coo_tensor(indices, values, (num_nodes, num_nodes))
# Edge label index: [2, num_edges] where each column is (src, dst)
edge_label_index = torch.tensor([[0, 1], [2, 3]])
# Create batch
batch = Batch(x, adj_t, edge_label_index)
# Create train loader
train_loader = [batch]
# Create model and predictor
model = SimpleGNNModel(input_dim, hidden_dim)
predictor = SimplePredictor(hidden_dim)
# Create optimizer
optimizer = Adam(list(model.parameters()) + list(predictor.parameters()), lr=0.01)
# Device
device = torch.device('cpu')
ARGS = {
'model': model,
'predictor': predictor,
'train_loader': train_loader,
'optimizer': optimizer,
'device': device
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| train |
Ran ran; our contract draft was wrong, not the code |
Zhuofeng-Li/TEG-Benchmark/GNN/GNN_Link_MRR.py code served (permissive licence) · get_code("ad21068f2893ab5c") 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 float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
from torch.optim import Adam
torch.manual_seed(0)
# Define a minimal GNN model that takes x and adj_t and returns embeddings
class SimpleGNN(nn.Module):
def __init__(self, input_dim, output_dim):
super().__init__()
self.linear = nn.Linear(input_dim, output_dim)
def forward(self, x, adj_t):
# Simple linear transformation to simulate GNN
return self.linear(x)
# Define a minimal predictor that takes two embeddings and returns scores
class SimplePredictor(nn.Module):
def __init__(self, embedding_dim):
super().__init__()
self.linear = nn.Linear(embedding_dim * 2, 1)
def forward(self, src_emb, dst_emb):
# Concatenate embeddings and pass through linear layer, then sigmoid
combined = torch.cat([src_emb, dst_emb], dim=1)
return torch.sigmoid(self.linear(combined))
# Create small tensors
num_nodes = 8
feature_dim = 4
embedding_dim = 3
x = torch.randn(num_nodes, feature_dim)
adj_t = torch.eye(num_nodes) # Simple adjacency matrix (identity for simplicity)
# Create model and predictor
model = SimpleGNN(feature_dim, embedding_dim)
predictor = SimplePredictor(embedding_dim)
# Create edge split with train edges
num_train_edges = 6
edge_split = {
'train': {
'source_node': torch.randint(0, num_nodes, (num_train_edges,)),
'target_node': torch.randint(0, num_nodes, (num_train_edges,)),
}
}
# Create optimizer
optimizer = Adam(list(model.parameters()) + list(predictor.parameters()), lr=0.01)
# Batch size for training
batch_size = 2
ARGS = {
'model': model,
'predictor': predictor,
'x': x,
'adj_t': adj_t,
'edge_split': edge_split,
'optimizer': optimizer,
'batch_size': batch_size,
}
- 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 float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| train |
Ran ran, honoured the contract we drafted |
Zhuofeng-Li/TEG-Benchmark/GNN/GNN_Link_MRR_loader.py code served (permissive licence) · get_code("70a4a68841982fea") 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 float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
torch.manual_seed(0)
# Small stand-in model that takes x and adj_t and returns node embeddings
class SimpleGNN(nn.Module):
def __init__(self, input_dim, output_dim):
super().__init__()
self.lin = nn.Linear(input_dim, output_dim)
def forward(self, x, adj_t):
return self.lin(x)
# Small predictor that takes two node embeddings and returns link probability
class SimplePredictor(nn.Module):
def __init__(self, hidden_dim):
super().__init__()
self.lin = nn.Linear(hidden_dim * 2, 1)
def forward(self, src_h, dst_h):
combined = torch.cat([src_h, dst_h], dim=-1)
return torch.sigmoid(self.lin(combined)).squeeze(-1)
# Create model and predictor
model = SimpleGNN(input_dim=4, output_dim=8)
predictor = SimplePredictor(hidden_dim=8)
# Create a simple batch class with the attributes the function expects
class SimpleBatch:
def __init__(self, x, adj_t, edge_label_index):
self.x = x
self.adj_t = adj_t
self.edge_label_index = edge_label_index
def to(self, device):
self.x = self.x.to(device)
self.adj_t = self.adj_t.to(device)
self.edge_label_index = self.edge_label_index.to(device)
return self
# Create small train_loader with one batch
# 5 nodes with dim 4, 3 edges
x = torch.randn(5, 4)
adj_t = torch.randn(5, 5)
edge_label_index = torch.tensor([[0, 1, 2], [1, 3, 4]], dtype=torch.long)
batch = SimpleBatch(x=x, adj_t=adj_t, edge_label_index=edge_label_index)
train_loader = [batch]
# Create optimizer
optimizer = torch.optim.Adam(
list(model.parameters()) + list(predictor.parameters()),
lr=0.01
)
device = 'cpu'
ARGS = {
'model': model,
'predictor': predictor,
'train_loader': train_loader,
'optimizer': optimizer,
'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 float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| gen_loader |
Not yet run unverified (harvested, no recorded run) |
Zhuofeng-Li/TEG-Benchmark/GNN/GNN_Link_MRR_loader.py code served (permissive licence) · get_code("4f6f2bae5c0ee660") How it ran |
| split_time |
Not yet run unverified (harvested, no recorded run) |
Zhuofeng-Li/TEG-Benchmark/GNN/model/Dataloader.py code served (permissive licence) · get_code("d9a1942021124664") How it ran |
| train |
Not yet run unverified (harvested, no recorded run) |
Zhuofeng-Li/TEG-Benchmark/GNN/GNN_Node.py code served (permissive licence) · get_code("4f3238930893cc90") How it ran |