| MVLinear |
Ran ran on a synthesized input · constructed an object; no result was computed |
rick-ali/metric-learning-for-cgenns/models/modules/fcgp.py code served (permissive licence) · get_code("eacc9335cde1d246") 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, MVLinear: 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 math
torch.manual_seed(0)
# Create a minimal algebra class that satisfies the required interface
class MinimalAlgebra:
def __init__(self):
self.n_subspaces = 3
self.subspaces = 2
def embed(self, bias, b_dims):
# The embed method is called with bias and b_dims
# It should return a tensor compatible with the result
# Based on usage: bias shape is (1, out_features, 1)
# We'll return it as-is since it's used in unsqueeze_like
return bias
# Instantiate the algebra
algebra = MinimalAlgebra()
# Define arguments for MVLinear
ARGS = {
'algebra': algebra,
'in_features': 4,
'out_features': 5,
'subspaces': True,
'bias': 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 MVLinear — 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 MVLinear 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
|
| _smooth_abs_sqrt |
Ran ran, honoured the contract we drafted |
rick-ali/metric-learning-for-cgenns/models/modules/fcgp.py code served (permissive licence) · get_code("12d00178b3ee0e76") 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, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
torch.manual_seed(0)
# The function _smooth_abs_sqrt takes:
# - input: a tensor that will be squared, added to eps, and raised to 0.25
# - eps: a small float for numerical stability (default 1e-16)
# Create a small input tensor
input_tensor = torch.randn(2, 4)
ARGS = {
"input": input_tensor,
"eps": 1e-16
}
- 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 Tensor, 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
|
| calculate_norm |
Ran ran; our contract draft was wrong, not the code |
rick-ali/metric-learning-for-cgenns/models/modules/fcgp.py code served (permissive licence) · get_code("4fd600fe4428ec1d") 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; no output shape is stated. 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 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
torch.manual_seed(0)
class MockBBO:
def __init__(self, n_blades=4):
self.n_blades = n_blades
# Create bitmap mappings for 4 blades
self.index_to_bitmap = torch.tensor([1, 2, 4, 8], dtype=torch.int64)
bitmap_to_index_dict = {1: 0, 2: 1, 4: 2, 8: 3}
self.bitmap_to_index = torch.zeros(16, dtype=torch.int64)
for bitmap, idx in bitmap_to_index_dict.items():
self.bitmap_to_index[bitmap] = idx
class MockAlgebra:
def __init__(self, n_blades=4):
self.n_blades = n_blades
self.bbo = MockBBO(n_blades)
# Beta signs for each blade
self._beta_signs = torch.tensor([1.0, -1.0, 1.0, -1.0], dtype=torch.float32)
# Create a multivector as a tensor
# batch_size=2, n_blades=4
mv = torch.randn(2, 4, dtype=torch.float32)
# Create metric (signature for geometric algebra)
# For 4D space, we can use Euclidean-like signature
metric = torch.tensor([1.0, 1.0, 1.0, 1.0], dtype=torch.float32)
# Create algebra
algebra = MockAlgebra(n_blades=4)
ARGS = {
"algebra": algebra,
"metric": metric,
"mv": mv,
"blades": 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 Tensor, ndim 2, dtype family float — no output shape is stated: observe_signature.py could not observe it (call:AssertionError)
- 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
|
| calculate_norms |
Ran ran; our contract draft was wrong, not the code |
rick-ali/metric-learning-for-cgenns/models/modules/fcgp.py code served (permissive licence) · get_code("378003362f195653") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 3, dtype family float; no output shape is stated. 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 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
torch.manual_seed(0)
# Build a minimal algebra object that satisfies the function's needs
class MinimalBladeIndexObject:
def __init__(self):
# For a 2D algebra, we have 4 blades: scalar, e1, e2, e1e2
self.index_to_bitmap = torch.tensor([0b0000, 0b0001, 0b0010, 0b0011], dtype=torch.int64)
self.bitmap_to_index = torch.tensor([0, 1, 2, 3], dtype=torch.int64)
class MinimalAlgebra:
def __init__(self):
self.n_blades = 4
self.bbo = MinimalBladeIndexObject()
self.grades = [0, 1, 2]
# Beta signs for each blade (used in the beta function)
self._beta_signs = torch.tensor([1.0, 1.0, 1.0, -1.0])
# Maps grade to blade indices
self.grade_to_index = {
0: torch.tensor([0]), # scalar
1: torch.tensor([1, 2]), # e1, e2
2: torch.tensor([3]), # e1e2
}
def get_grade(self, mv, grade):
"""Extract the part of mv corresponding to a given grade"""
indices = self.grade_to_index[grade]
if mv.dim() == 1:
return mv[indices]
else:
return mv[..., indices]
# Create algebra and metric
algebra = MinimalAlgebra()
metric = torch.tensor([1.0, 1.0, 1.0]) # Euclidean 2D metric
# Create a multivector (batch of 2, with 4 blade components)
mv = torch.randn(2, 4)
ARGS = {
"algebra": algebra,
"metric": metric,
"mv": mv,
"grades": 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 list, ndim 3, dtype family float — a list 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
|
| canonical_reordering_sign |
Ran ran, violated the contract we drafted |
rick-ali/metric-learning-for-cgenns/algebra/metric.py code served (permissive licence) · get_code("c267455507445bf8") 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 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
torch.manual_seed(0)
# Analyze the function signature and body:
# canonical_reordering_sign(bitmap_a, bitmap_b, metric)
# - bitmap_a: int, used with bitwise operations
# - bitmap_b: int, used with bitwise operations
# - metric: list/array, indexed by integer i, values multiplied with output_sign
# Create valid arguments
bitmap_a = 0b1101 # 13 in decimal, has bits set at positions 0, 2, 3
bitmap_b = 0b1011 # 11 in decimal, has bits set at positions 0, 1, 3
# metric needs to be indexable and contain numeric values
# The function iterates through bit positions and indexes metric[i]
# We need at least 4 elements (since max bit position in our bitmaps is 3)
metric = [1, -1, 1, -1, 1]
ARGS = {
"bitmap_a": bitmap_a,
"bitmap_b": bitmap_b,
"metric": metric,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- 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
|
| canonical_reordering_sign |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
rick-ali/metric-learning-for-cgenns/models/modules/fcgp.py code served (permissive licence) · get_code("eb3217cce9b27f2c") 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.
def count_set_bits(bitmap: int) -> int:
"""Counts the number of bits set to 1 in bitmap"""
count = 0
for i in set_bit_indices(bitmap):
count += 1
return count
def set_bit_indices(x: int):
"""Iterate over the indices of bits set to 1 in `x`, in ascending order"""
n = 0
while x > 0:
if x & 1:
yield n
x = x >> 1
n = n + 1
def canonical_reordering_sign_euclidean(bitmap_a, bitmap_b):
"""
Computes the sign for the product of bitmap_a and bitmap_b
assuming a euclidean metric
"""
a = bitmap_a >> 1
sum_value = 0
while a != 0:
sum_value = sum_value + count_set_bits(a & bitmap_b)
a = a >> 1
if sum_value & 1 == 0:
return 1
else:
return -1
def canonical_reordering_sign(bitmap_a, bitmap_b, metric):
"""
Computes the sign for the product of bitmap_a and bitmap_b
given the supplied metric
"""
bitmap = bitmap_a & bitmap_b
output_sign = canonical_reordering_sign_euclidean(bitmap_a, bitmap_b)
i = 0
while bitmap != 0:
if bitmap & 1 != 0:
output_sign *= metric[i]
i = i + 1
bitmap = bitmap >> 1
return output_sign
# Setup test arguments
bitmap_a = 0b1010 # 10 in decimal
bitmap_b = 0b1100 # 12 in decimal
metric = [1, -1, 1, -1, 1] # metric with signed entries
ARGS = {
"bitmap_a": bitmap_a,
"bitmap_b": bitmap_b,
"metric": metric
}
- 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 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
|
| canonical_reordering_sign |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
rick-ali/Metric-Learning-for-CGENNs/algebra/metric.py code served (permissive licence) · get_code("2354e2c3c7b22d3c") 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.
# Analyze the function signature:
# canonical_reordering_sign(bitmap_a, bitmap_b, metric)
#
# Parameters:
# - bitmap_a: int, used as a bitmap (bit operations)
# - bitmap_b: int, used as a bitmap (bit operations)
# - metric: indexable sequence, accessed by index i in a while loop
# The metric is indexed up to the number of bits in bitmap_a and bitmap_b
# Each metric[i] is multiplied into output_sign, so should be numeric
# Looking at the function body:
# - bitmap_a and bitmap_b are used with bitwise operations (>>, &, !=)
# - metric is indexed and values are multiplied (metric[i])
# - The function accesses metric indices based on bit positions
# Create small example bitmaps and a metric list
import torch
torch.manual_seed(0)
# bitmap_a and bitmap_b: small positive integers with some bits set
# Let's use 5 (binary 0101) and 3 (binary 0011) as examples
bitmap_a = 5 # binary: 0101
bitmap_b = 3 # binary: 0011
# metric: a list of numeric values, one for each possible bit position
# We need enough elements to cover the bits we're checking
# The maximum bit position we'll access is determined by bitmap_a and bitmap_b
# Let's create a metric with 8 elements (covers up to 8 bit positions)
metric = [1, -1, 1, -1, 1, -1, 1, -1]
ARGS = {
"bitmap_a": bitmap_a,
"bitmap_b": bitmap_b,
"metric": metric,
}
- 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
|
| canonical_reordering_sign_euclidean |
Ran ran, honoured the contract we drafted |
rick-ali/metric-learning-for-cgenns/algebra/metric.py code served (permissive licence) · get_code("cffd0c2ee938ffee") 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 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
torch.manual_seed(0)
# Analyze the function: canonical_reordering_sign_euclidean takes two parameters:
# - bitmap_a: int
# - bitmap_b: int
# The function performs bitwise operations on these integers
# Create valid test cases with small integer bitmaps
bitmap_a = 0b1010 # 10 in decimal, has bits set at positions 1 and 3
bitmap_b = 0b1100 # 12 in decimal, has bits set at positions 2 and 3
ARGS = {
"bitmap_a": bitmap_a,
"bitmap_b": bitmap_b,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- 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
|
| canonical_reordering_sign_euclidean |
Ran ran, honoured the contract we drafted |
rick-ali/metric-learning-for-cgenns/models/modules/fcgp.py code served (permissive licence) · get_code("4c1b710580c8b7cf") 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.
# Read the function body to understand what parameters are needed
# canonical_reordering_sign_euclidean takes bitmap_a and bitmap_b
# Both are used as integers in bitwise operations
# These should be small positive integers that represent bitmaps
bitmap_a = 0b1010 # binary: 1010 (decimal: 10)
bitmap_b = 0b1100 # binary: 1100 (decimal: 12)
ARGS = {
"bitmap_a": bitmap_a,
"bitmap_b": bitmap_b,
}
- 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 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
|
| canonical_reordering_sign_euclidean |
Ran ran, honoured the contract we drafted |
rick-ali/Metric-Learning-for-CGENNs/algebra/metric.py code served (permissive licence) · get_code("d5c05c34d2e55a48") 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.
# Setup code for canonical_reordering_sign_euclidean
# Analyze the function:
# - bitmap_a: int - used with bitwise operations (>> 1)
# - bitmap_b: int - used with bitwise operations (& with a)
# Both parameters are integers representing bitmaps
# Create simple test cases with small integer bitmaps
bitmap_a = 0b1010 # binary: 1010 (decimal 10)
bitmap_b = 0b1100 # binary: 1100 (decimal 12)
ARGS = {
"bitmap_a": bitmap_a,
"bitmap_b": bitmap_b,
}
- 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 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
|
| construct_gmt |
Ran ran; our contract draft was wrong, not the code |
rick-ali/metric-learning-for-cgenns/models/modules/fcgp.py code served (permissive licence) · get_code("8c0324f3633ef2c8") 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. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
torch.manual_seed(0)
# For a geometric algebra with 3 basis vectors, we need bitmaps from 0 to 7 (2^3 - 1)
# Each bitmap represents a basis blade
# index_to_bitmap: maps index to bitmap representation
# For 3D: index 0->bitmap 0 (scalar), index 1->bitmap 1 (e1), index 2->bitmap 2 (e2), etc.
index_to_bitmap = [0, 1, 2, 4, 3, 5, 6, 7] # 8 blades for 3D geometric algebra
# bitmap_to_index: inverse mapping
bitmap_to_index = {0: 0, 1: 1, 2: 2, 4: 3, 3: 4, 5: 5, 6: 6, 7: 7}
# signature: metric signature for each basis vector
# For Euclidean 3D space: [1, 1, 1]
signature = [1.0, 1.0, 1.0]
ARGS = {
"index_to_bitmap": index_to_bitmap,
"bitmap_to_index": bitmap_to_index,
"signature": signature,
}
- 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, shape (8, 8, 8) — shape (8, 8, 8) as a later run recorded it
- 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
|
| count_set_bits |
Ran ran, honoured the contract we drafted |
rick-ali/metric-learning-for-cgenns/algebra/metric.py code served (permissive licence) · get_code("24a3800851807b8e") 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 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
def set_bit_indices(x: int):
"""Iterate over the indices of bits set to 1 in `x`, in ascending order"""
n = 0
while x > 0:
if x & 1:
yield n
x = x >> 1
n = n + 1
def count_set_bits(bitmap: int) -> int:
"""Counts the number of bits set to 1 in bitmap"""
count = 0
for i in set_bit_indices(bitmap):
count += 1
return count
# Test cases with different bitmaps
# 0b1010 = 10 in decimal, has 2 bits set
# 0b1111 = 15 in decimal, has 4 bits set
# 0b0001 = 1 in decimal, has 1 bit set
# 0b0000 = 0 in decimal, has 0 bits set
ARGS = {
"bitmap": 10 # 0b1010 - has 2 bits set at positions 1 and 3
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- 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
|
| count_set_bits |
Ran ran, honoured the contract we drafted |
rick-ali/Metric-Learning-for-CGENNs/algebra/metric.py code served (permissive licence) · get_code("a660d9bd93058229") 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
def set_bit_indices(x: int):
"""Iterate over the indices of bits set to 1 in `x`, in ascending order"""
n = 0
while x > 0:
if x & 1:
yield n
x = x >> 1
n = n + 1
def count_set_bits(bitmap: int) -> int:
"""Counts the number of bits set to 1 in bitmap"""
count = 0
for i in set_bit_indices(bitmap):
count += 1
return count
# Test with a few different bitmap values
# Binary: 0b1010 = 10 (bits at indices 1 and 3 are set)
# Binary: 0b1111 = 15 (bits at indices 0, 1, 2, 3 are set)
# Binary: 0b10101 = 21 (bits at indices 0, 2, 4 are set)
ARGS = {
"bitmap": 21
}
- 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
|
| get_invariants |
Ran ran; our contract draft was wrong, not the code |
rick-ali/Metric-Learning-for-CGENNs/models/lorentz_cggnn.py code served (permissive licence) · get_code("02b4e625d513ec06") 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, 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
torch.manual_seed(0)
class MockAlgebra(nn.Module):
def __init__(self):
super().__init__()
self.grades = [0, 1, 2]
def qs(self, input, grades):
"""
Mock implementation that returns a list of norms for each grade.
Returns list of tensors with shapes matching input batch dimension.
"""
norms = []
for grade in grades:
# Return a tensor with shape (batch_size, 1) for each grade
norm = torch.randn(input.shape[0], 1)
norms.append(norm)
return norms
algebra = MockAlgebra()
# Create input tensor: batch size 2, feature dim 4
input_tensor = torch.randn(2, 4)
ARGS = {
"algebra": algebra,
"input": input_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 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: none by the harness; any seed is in the setup block
|
| gmt_element |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
rick-ali/metric-learning-for-cgenns/models/modules/fcgp.py code served (permissive licence) · get_code("1ca665edea3adf3f") 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 int; 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
# Helper functions are already defined in the problem, so we just need to
# construct valid arguments for gmt_element(bitmap_a, bitmap_b, sig_array)
# bitmap_a and bitmap_b are integers representing bitmaps (blade basis elements)
# sig_array is a list/array of metric signature values (typically +1 or -1)
# Create simple test arguments
bitmap_a = 0b0101 # binary: 5 (represents basis elements at positions 0 and 2)
bitmap_b = 0b0011 # binary: 3 (represents basis elements at positions 0 and 1)
sig_array = [1, 1, 1, 1] # Euclidean metric signature (all positive)
ARGS = {
"bitmap_a": bitmap_a,
"bitmap_b": bitmap_b,
"sig_array": sig_array,
}
- 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 int — 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
|
| psi |
Ran ran; our contract draft was wrong, not the code |
rick-ali/Metric-Learning-for-CGENNs/models/lorentz_cggnn.py code served (permissive licence) · get_code("eb8ab1e8e209f7b1") 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, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
torch.manual_seed(0)
# The function psi takes a parameter p and applies:
# torch.sign(p) * torch.log(torch.abs(p) + 1)
# So p should be a tensor (any shape, any values)
p = torch.randn(2, 4)
ARGS = {
"p": p
}
- 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, 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
|
| unsorted_segment_mean |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
rick-ali/Metric-Learning-for-CGENNs/models/nbody_cggnn.py code served (permissive licence) · get_code("bc66f19be57720e7") 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, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
torch.manual_seed(0)
# Create sample data tensor with shape (batch_size, feature_dim)
# Using distinct sizes: 2 for batch, 4 for features
data = torch.randn(2, 4)
# Create segment_ids tensor that maps each data point to a segment
# Values should be in range [0, num_segments)
segment_ids = torch.tensor([0, 1])
# Number of segments to aggregate into
num_segments = 2
ARGS = {
"data": data,
"segment_ids": segment_ids,
"num_segments": num_segments,
}
- 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, 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
|
| unsorted_segment_sum |
Ran ran; our contract draft was wrong, not the code |
rick-ali/Metric-Learning-for-CGENNs/models/lorentz_cggnn.py code served (permissive licence) · get_code("f1e6153da7a4214f") 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, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
torch.manual_seed(0)
# Analyzing the function:
# - data: tensor with shape (batch_size, feature_dim), used with .new_zeros() and .size(1)
# - segment_ids: 1D tensor of segment indices, used with index_add_
# - num_segments: int, number of output segments
# Create small tensors with distinct dimensions
data = torch.randn(2, 4) # batch_size=2, feature_dim=4
segment_ids = torch.tensor([0, 1], dtype=torch.long) # 2 segment IDs
num_segments = 2 # matches max segment_id + 1
ARGS = {
"data": data,
"segment_ids": segment_ids,
"num_segments": num_segments,
}
- 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 Tensor, 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
|
| unsqueeze_like |
Ran ran, violated the contract we drafted |
rick-ali/metric-learning-for-cgenns/models/modules/fcgp.py code served (permissive licence) · get_code("f6c0971a1cd07155") 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 (1, 1, 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 torch
torch.manual_seed(0)
# Create two tensors with different numbers of dimensions
# tensor has fewer dimensions than like, so unsqueeze will add dimensions
tensor = torch.randn(2, 4) # 2D tensor: shape (2, 4)
like = torch.randn(2, 3, 4, 5) # 4D tensor: shape (2, 3, 4, 5)
# dim parameter controls where unsqueezing starts
dim = 0
ARGS = {
"tensor": tensor,
"like": like,
"dim": dim
}
- 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 (1, 1, 2, 4) — shape (1, 1, 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
|
| FullyConnectedSteerableGeometricProductLayer |
Not yet run unverified (harvested, no recorded run) |
rick-ali/metric-learning-for-cgenns/models/modules/fcgp.py code served (permissive licence) · get_code("af68a09b089926e0") How it ran |
| NormalizationLayer |
Not yet run unverified (harvested, no recorded run) |
rick-ali/metric-learning-for-cgenns/models/modules/fcgp.py code served (permissive licence) · get_code("80acaf82da83dc26") How it ran |
| b |
Not yet run unverified (harvested, no recorded run) |
rick-ali/metric-learning-for-cgenns/models/modules/fcgp.py code served (permissive licence) · get_code("158aefe877c35425") How it ran |
| beta |
Not yet run unverified (harvested, no recorded run) |
rick-ali/metric-learning-for-cgenns/models/modules/fcgp.py code served (permissive licence) · get_code("9a6fb42786449575") How it ran |
| cayley |
Not yet run unverified (harvested, no recorded run) |
rick-ali/metric-learning-for-cgenns/models/modules/fcgp.py code served (permissive licence) · get_code("54e377e3d53dcda9") How it ran |
| geometric_product |
Not yet run unverified (harvested, no recorded run) |
rick-ali/metric-learning-for-cgenns/models/modules/fcgp.py code served (permissive licence) · get_code("a1a30d9532aee437") How it ran |
| q |
Not yet run unverified (harvested, no recorded run) |
rick-ali/metric-learning-for-cgenns/models/modules/fcgp.py code served (permissive licence) · get_code("dcba8eaf7d6bbc97") How it ran |