| confusion_matrix |
Ran ran on a synthesized input |
hqucms/weaver-core/weaver/utils/nn/metrics.py code served (permissive licence) · get_code("2279ff8f4830ab0f") 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 float, shape (2, 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
import numpy as np
torch.manual_seed(0)
# y_true: ground truth labels (1D array-like)
# y_score: predicted scores or probabilities (1D or 2D array-like)
# Case 1: Binary classification with 1D y_score (will be thresholded at 0.5)
y_true = np.array([0, 1, 1, 0, 1])
y_score = np.array([0.2, 0.8, 0.9, 0.3, 0.7])
ARGS = {
"y_true": y_true,
"y_score": y_score,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, sklearn, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ndarray, ndim 2, dtype family float, shape (2, 2) — shape (2, 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
|
| delta_phi |
Ran ran on a synthesized input |
hqucms/weaver-core/weaver/nn/model/ParticleNeXt.py code served (permissive licence) · get_code("6a60eb8afd0c968f") 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 math
def delta_phi(a, b):
return (a - b + math.pi) % (2 * math.pi) - math.pi
# The function delta_phi takes two numeric arguments a and b
# and computes an angular difference wrapped to [-pi, pi]
# Both arguments should be numeric values (int, float, or similar)
ARGS = {
"a": 2.5,
"b": 1.0
}
- 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 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
|
| delta_r2 |
Ran ran on a synthesized input |
hqucms/weaver-core/weaver/nn/model/ParticleNeXt.py code served (permissive licence) · get_code("a1f3a8f5a58b8a82") 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 math
torch.manual_seed(0)
# The function delta_r2 takes 4 scalar parameters: eta1, phi1, eta2, phi2
# It computes a distance metric in (eta, phi) space
# All parameters are used in arithmetic operations, so they should be numeric values
# Create small numeric values for the parameters
eta1 = 1.5
phi1 = 2.3
eta2 = 0.8
phi2 = 1.2
ARGS = {
"eta1": eta1,
"phi1": phi1,
"eta2": eta2,
"phi2": phi2
}
- 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
|
| evaluate_metrics |
Ran ran on a synthesized input |
hqucms/weaver-core/weaver/utils/nn/metrics.py code served (permissive licence) · get_code("6424b6b029d386f2") 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 numpy as np
from functools import partial
import sklearn.metrics as _m
# Set up y_true and y_score for multi-class classification
np.random.seed(0)
# Create true labels for 4 samples, 3 classes
y_true = np.array([0, 1, 2, 1], dtype=np.int64)
# Create scores for each class (4 samples x 3 classes)
y_score = np.array([
[0.7, 0.2, 0.1],
[0.1, 0.8, 0.1],
[0.1, 0.2, 0.7],
[0.3, 0.6, 0.1]
], dtype=np.float32)
# Define eval_metrics with various metric types
eval_metrics = ['roc_auc_score', 'confusion_matrix']
ARGS = {
'y_true': y_true,
'y_score': y_score,
'eval_metrics': eval_metrics
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, sklearn — 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
|
| flops_to_string |
Ran ran; our contract draft was wrong, not the code |
hqucms/weaver-core/weaver/utils/flops_counter.py code served (permissive licence) · get_code("acc45731e5dadf85") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
# Based on the function signature and body analysis:
# - flops: int (required) - number of floating point operations
# - units: Optional[str] (optional) - one of 'GMac', 'MMac', 'KMac', or None
# - precision: int (optional) - number of decimal places for rounding
ARGS = {
"flops": 5_000_000_000, # 5 billion MACs - will trigger GMac output
"units": None, # Let function auto-detect units
"precision": 2 # Default precision of 2 decimal places
}
- 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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| focal_loss |
Ran ran on a synthesized input |
hqucms/weaver-core/weaver/nn/loss/focal.py code served (permissive licence) · get_code("22cdb78ad8aed2f6") 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 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)
# Create small input tensor: shape (batch_size=2, num_classes=4)
# This is logits from a model
input_tensor = torch.randn(2, 4, requires_grad=True)
# Create target tensor: shape (batch_size=2,) with class indices
# Values must be in range [0, num_classes)
target_tensor = torch.tensor([0, 2], dtype=torch.long)
# Parameters for focal_loss
alpha = 0.25
gamma = 2.0
reduction = 'mean'
eps = 1e-08
ARGS = {
'input': input_tensor,
'target': target_tensor,
'alpha': alpha,
'gamma': gamma,
'reduction': reduction,
'eps': eps,
}
- 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 0, dtype family float, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_autocast_config |
Ran ran on a synthesized input |
hqucms/weaver-core/weaver/utils/nn/tools.py code served (permissive licence) · get_code("93fd5621a8e99074") 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
class Args:
def __init__(self):
self.use_amp = True
self.amp_dtype = 'bf16'
ARGS = {'args': 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 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
|
| get_graph_ids |
Ran ran on a synthesized input |
StefReck/MEdgeConv/medgeconv/legacy/util.py code served (permissive licence) · get_code("3a6889623a4463cb") 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 EagerTensor, ndim 1, dtype family int, shape (2,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import tensorflow as tf
# Create a small is_valid tensor
# This should be a 1D tensor of shape (None,) with binary values (0s and 1s)
is_valid = tf.constant([[1], [0], [1], [0]], dtype=tf.int32)
ARGS = {
"is_valid": is_valid
}
- 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 EagerTensor, ndim 1, dtype family int, shape (2,) — shape (2,) as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_xixj |
Ran ran on a synthesized input |
StefReck/MEdgeConv/medgeconv/util.py code served (permissive licence) · get_code("8cdf24d6f598d4e3") 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 4, 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 tensorflow as tf
import numpy as np
# Set seed for reproducibility
tf.random.set_seed(0)
# Create small tensors for testing
batch_size = 2
n_features = 4
k = 3
# nodes_disjoint: shape (batch_size, n_features)
nodes_disjoint = tf.constant(
np.random.randn(batch_size, n_features).astype(np.float32)
)
# knn: shape (batch_size, k) with int32 indices
# These are indices into the nodes_disjoint tensor
knn = tf.constant(
np.array([[1, 0, 1], [0, 1, 0]], dtype=np.int32)
)
# k: number of nearest neighbors
k_val = 3
ARGS = {
"nodes_disjoint": nodes_disjoint,
"knn": knn,
"k": k_val,
}
- 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 tuple, ndim 4, 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
|
| import_module |
Ran ran on a synthesized input |
hqucms/weaver-core/weaver/utils/import_tools.py code served (permissive licence) · get_code("5fd748f3941e18cd") 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 module. 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 tempfile
import os
# Create a temporary Python module file
temp_dir = tempfile.mkdtemp()
module_file = os.path.join(temp_dir, "test_module.py")
# Write a simple valid Python module to the file
with open(module_file, 'w') as f:
f.write("""
def hello():
return "Hello from imported module"
class TestClass:
def __init__(self):
self.value = 42
""")
ARGS = {
'path': module_file,
'name': '_mod'
}
- 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 module — a module output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a module 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
|
| kernel_nn |
Ran ran on a synthesized input |
StefReck/MEdgeConv/medgeconv/layers.py code served (permissive licence) · get_code("7dae7c334c065a24") 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 KerasTensor. 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.keras as ks
import tensorflow as tf
import numpy as np
# Set random seed for reproducibility
tf.random.set_seed(0)
np.random.seed(0)
# Create a small input tensor (batch_size=2, features=4)
input_tensor = tf.keras.Input(shape=(4,))
ARGS = {
'x': input_tensor,
'units': [8, 6],
'activation': 'relu',
'kernel_initializer': 'glorot_uniform'
}
- 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 KerasTensor — a KerasTensor 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
|
| knn |
Ran ran on a synthesized input |
hqucms/weaver-core/weaver/nn/model/ParticleNet.py code served (permissive licence) · get_code("c3cde8788ee9ab7e") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family int, shape (2, 3, 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 input tensor
# x should be shape (batch, features, num_points) based on how it's used in pairwise_distance
# transpose(2, 1) suggests 3D tensor with dims (batch, features, points)
x = torch.randn(2, 4, 3)
# k parameter - number of nearest neighbors to find
k = 2
# distance_fn parameter - function to compute pairwise distances
def custom_distance_fn(x):
inner = -2 * torch.matmul(x.transpose(2, 1), x)
xx = torch.sum(x ** 2, dim=1, keepdim=True)
return (xx.transpose(2, 1) + inner + xx).clamp(min=0)
distance_fn = custom_distance_fn
# exclude_self parameter - whether to exclude self in knn search
exclude_self = True
ARGS = {
"x": x,
"k": k,
"distance_fn": distance_fn,
"exclude_self": exclude_self
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Tensor, ndim 3, dtype family int, shape (2, 3, 2) — shape (2, 3, 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
|
| pad_array |
Ran ran, honoured the contract we drafted |
Jai2500/particlenet/particlenet.py pointer only (licence: NONE) · get_code("8d12109420ecf2ca") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, Jai2500/particlenet 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. |
| pairwise_distance |
Ran ran on a synthesized input |
hqucms/weaver-core/weaver/nn/model/ParticleNet.py code served (permissive licence) · get_code("399f9925e569e331") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (2, 3, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
torch.manual_seed(0)
# The function expects x to be a tensor with shape (batch, features, points)
# Based on the operations:
# - x.transpose(2, 1): swaps dimensions 1 and 2
# - torch.matmul(x.transpose(2, 1), x): matrix multiplication
# - torch.sum(x ** 2, dim=1, keepdim=True): sum over dimension 1
# So x should have 3 dimensions: (batch_size, num_features, num_points)
x = torch.randn(2, 4, 3)
ARGS = {
"x": x
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Tensor, ndim 3, dtype family float, shape (2, 3, 3) — shape (2, 3, 3) as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| params_to_string |
Ran ran; our contract draft was wrong, not the code |
hqucms/weaver-core/weaver/utils/flops_counter.py code served (permissive licence) · get_code("44f6804749deb60e") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
ARGS = {
'params_num': 1500000,
'units': None,
'precision': 2,
}
- 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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| reduce_mean_valid_disjoint |
Ran ran on a synthesized input |
StefReck/MEdgeConv/medgeconv/legacy/util.py code served (permissive licence) · get_code("972f6f317f2e5fe5") 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 EagerTensor, ndim 2, dtype family float, shape (2, 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 tensorflow as tf
import numpy as np
# Create small tensors for testing
# nodes: shape (None, n_features) - flattened nodes from multiple graphs
# We'll create a tensor representing nodes from 2 graphs with 4 features each
# Graph 0 has 3 valid nodes, Graph 1 has 2 valid nodes
nodes_data = np.array([
[1.0, 2.0, 3.0, 4.0], # node 0, graph 0
[5.0, 6.0, 7.0, 8.0], # node 1, graph 0
[9.0, 10.0, 11.0, 12.0], # node 2, graph 0
[13.0, 14.0, 15.0, 16.0], # node 3, graph 1
[17.0, 18.0, 19.0, 20.0], # node 4, graph 1
], dtype=np.float32)
nodes = tf.constant(nodes_data)
# is_valid: shape (bs, n_points) int32 tensor
# bs=2 (batch size / number of graphs)
# n_points=3 (max nodes per graph, padded)
# Values are 1 for valid nodes, 0 for padding
is_valid_data = np.array([
[1, 1, 1], # graph 0: 3 valid nodes
[1, 1, 0], # graph 1: 2 valid nodes (last one is padding)
], dtype=np.int32)
is_valid = tf.constant(is_valid_data)
ARGS = {
"nodes": nodes,
"is_valid": is_valid,
}
- 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 EagerTensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 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
|
| roc_auc_score_ovo |
Ran ran on a synthesized input |
hqucms/weaver-core/weaver/utils/nn/metrics.py code served (permissive licence) · get_code("89fe702ab2009e77") 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 float, shape (3, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
import sklearn.metrics as _m
def roc_auc_score_ovo(y_true, y_score):
if y_score.ndim == 1:
return _m.roc_auc_score(y_true, y_score)
else:
num_classes = y_score.shape[1]
result = np.zeros((num_classes, num_classes), dtype='float32')
for i in range(num_classes):
for j in range(i + 1, num_classes):
weights = np.logical_or(y_true == i, y_true == j)
truth = y_true == j
score = y_score[:, j] / np.maximum(y_score[:, i] + y_score[:, j], 1e-06)
result[i, j] = _m.roc_auc_score(truth, score, sample_weight=weights)
return result
# Setup code
np.random.seed(0)
# Create y_true: multiclass labels with 3 classes
y_true = np.array([0, 1, 2, 0, 1, 2, 0, 1])
# Create y_score: probability scores for 3 classes, 8 samples
# Using softmax-like normalized scores
y_score = np.array([
[0.7, 0.2, 0.1],
[0.1, 0.8, 0.1],
[0.1, 0.2, 0.7],
[0.6, 0.3, 0.1],
[0.2, 0.7, 0.1],
[0.1, 0.1, 0.8],
[0.5, 0.4, 0.1],
[0.2, 0.6, 0.2]
], dtype='float32')
ARGS = {
'y_true': y_true,
'y_score': y_score
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, sklearn — 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 float, shape (3, 3) — shape (3, 3) as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| to_pt2 |
Ran ran; our contract draft was wrong, not the code |
hqucms/weaver-core/weaver/nn/model/ParticleNeXt.py code served (permissive licence) · get_code("779b98ee0e7c9f1d") 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 (2, 1) 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 tensor with shape (batch=2, features=4)
# The function accesses x[:, :2], so we need at least 2 columns
x = torch.randn(2, 4)
ARGS = {
'x': x,
'eps': 1e-08
}
- 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 (2, 1) — shape (2, 1) 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
|
| to_pt2 |
Ran ran on a synthesized input |
hqucms/weaver-core/weaver/nn/model/ParticleTransformer.py code served (permissive licence) · get_code("9d3613b4ffa9d368") 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 (2, 1) 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 tensor with batch size 2 and at least 2 dimensions
# The function accesses x[:, :2] and calls .size(1), so we need at least 2 columns
x = torch.randn(2, 4)
# eps parameter - use the default value
eps = 1e-08
ARGS = {
"x": x,
"eps": eps,
}
- 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 (2, 1) — shape (2, 1) as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_model_complexity_info |
Not yet run unverified (harvested, no recorded run) |
hqucms/weaver-core/weaver/utils/flops_counter.py code served (permissive licence) · get_code("abf919ccaf86558d") How it ran |
| one_hot |
Not yet run unverified (harvested, no recorded run) |
hqucms/weaver-core/weaver/nn/loss/focal.py code served (permissive licence) · get_code("5daf197a89a09cce") How it ran |
| pairwise_distance_etaphi |
Not yet run unverified (harvested, no recorded run) |
hqucms/weaver-core/weaver/nn/model/ParticleNet.py code served (permissive licence) · get_code("cbfecd3ae2772e1f") How it ran |
| unwrap_model |
Not yet run unverified (harvested, no recorded run) |
hqucms/weaver-core/weaver/utils/nn/tools.py code served (permissive licence) · get_code("464cf959f947b7c4") How it ran |