| configs_series_from_array |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
COLA-Laboratory/GraphFLA/graphfla/_data/_validation.py code served (permissive licence) · get_code("b08f9d6c89c28782") 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 Series. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
import pandas as pd
# Create a small numeric matrix for configs_array
# Shape: (3, 4) - 3 configurations, each with 4 encoded variables
configs_array = np.array([
[0, 1, 2, 3],
[1, 0, 3, 2],
[2, 3, 0, 1]
], dtype=np.int64)
# Create a custom index for the Series
index = pd.Index(['config_a', 'config_b', 'config_c'], name='configuration')
ARGS = {
'configs_array': configs_array,
'index': index,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Series — a Series output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Series output the recorded ndim 1 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
|
| filter_graph |
Ran ran; our contract draft was wrong, not the code |
COLA-Laboratory/GraphFLA/graphfla/utils.py code served (permissive licence) · get_code("38c4cf18d966172f") 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 logging
import numpy as np
import igraph as ig
logging.basicConfig(level=logging.INFO)
# Create a small test graph using igraph
def create_test_graph():
"""Create a small igraph.Graph with fitness attributes for testing."""
g = ig.Graph()
# Add 5 vertices
g.add_vertices(5)
# Add edges to create a connected structure
g.add_edges([(0, 1), (1, 2), (2, 3), (3, 4), (0, 4)])
# Add fitness values to vertices
fitness_values = [0.1, 0.5, 0.3, 0.9, 0.2]
g.vs['fitness'] = fitness_values
return g
# Construct the ARGS dictionary
ARGS = {
'graph': create_test_graph(),
'maximize': True,
'tau': 0.4,
'filter_mode': 'both',
'verbose': True,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- igraph, numpy — 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
|
| generate_neighbors |
Ran ran; our contract draft was wrong, not the code |
COLA-Laboratory/GraphFLA/graphfla/lon.py code served (permissive licence) · get_code("3b3e0781bdc4d150") 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 2, 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.
# Setup code for generate_neighbors function
ARGS = {
'config': (0, 1, 2, 1),
'config_dict': {
0: {'type': 'categorical', 'max': 3},
1: {'type': 'ordinal', 'max': 5},
2: {'type': 'boolean', 'max': 1},
3: {'type': 'ordinal', 'max': 2}
},
'n_edit': 1
}
- 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 list, ndim 2, dtype family int — 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
|
| grid_search |
Ran ran, honoured the contract we drafted |
COLA-Laboratory/GraphFLA/graphfla/sampling.py code served (permissive licence) · get_code("df5e68490329c902") 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 DataFrame. 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 itertools
import pandas as pd
import torch
import numpy as np
torch.manual_seed(0)
# Define a simple evaluate function that takes a config dict and returns a fitness value
def evaluate(config):
"""
Simple evaluation function that combines parameter values into a fitness score.
"""
# Extract parameters and compute a simple fitness metric
learning_rate = config.get('learning_rate', 0.001)
batch_size = config.get('batch_size', 32)
num_layers = config.get('num_layers', 2)
# Arbitrary fitness calculation based on parameters
fitness = 1.0 / (learning_rate + 0.0001) + batch_size / 100.0 + num_layers * 0.5
return fitness
# Define the parameter grid for grid search
param_grid = {
'learning_rate': [0.001, 0.01, 0.1],
'batch_size': [16, 32, 64],
'num_layers': [1, 2, 3]
}
# Construct the ARGS dictionary
ARGS = {
'param_grid': param_grid,
'evaluate': evaluate
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, pandas, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
|
| hamming_distance |
Ran ran, honoured the contract we drafted |
COLA-Laboratory/GraphFLA/graphfla/distances.py code served (permissive licence) · get_code("2077a8d30a200751") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family int, shape (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 numpy as np
from typing import Dict, Optional
# Set random seed for reproducibility
np.random.seed(0)
# Create a small 2D array with categorical/boolean features
# Shape: (2, 4) - 2 rows (samples), 4 columns (features)
X = np.array([
[0, 1, 0, 1],
[1, 1, 0, 0]
], dtype=int)
# Create a 1D reference vector with 4 elements to match the number of features
x = np.array([0, 1, 1, 1], dtype=int)
# Create optional data_types dict mapping feature indices to their types
data_types = {
0: "categorical",
1: "boolean",
2: "categorical",
3: "boolean"
}
ARGS = {
"X": X,
"x": x,
"data_types": data_types
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ndarray, ndim 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
|
| latin_hypercube_sampling |
Ran ran; our contract draft was wrong, not the code |
COLA-Laboratory/GraphFLA/graphfla/sampling.py code served (permissive licence) · get_code("f39c13c310206ea9") 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 DataFrame. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
import pandas as pd
from scipy.stats import norm, uniform
def dummy_evaluate(config):
"""Simple evaluation function that returns a fitness value based on config parameters."""
fitness = 0.0
for key, value in config.items():
if isinstance(value, (int, float)):
fitness += value ** 2
return fitness
param_distributions = {
'learning_rate': uniform(loc=0.001, scale=0.1),
'momentum': uniform(loc=0.0, scale=1.0),
'batch_size': [16, 32, 64, 128],
'optimizer': ['adam', 'sgd', 'rmsprop']
}
ARGS = {
'param_distributions': param_distributions,
'n_iter': 5,
'evaluate': dummy_evaluate,
'seed': 42
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, pandas, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
|
| manhattan_distance |
Ran ran, honoured the contract we drafted |
COLA-Laboratory/GraphFLA/graphfla/distances.py code served (permissive licence) · get_code("14330842b1a0f393") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (4,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
# Create sample data
# X: 2D array with 4 rows (samples) and 3 columns (features)
X = np.array([
[1, 2, 3],
[4, 5, 6],
[7, 8, 9],
[10, 11, 12]
], dtype=np.float64)
# x: 1D reference vector with 3 elements
x = np.array([2, 3, 4], dtype=np.float64)
# data_types: optional dict mapping column indices to data type strings
data_types = {0: "ordinal", 1: "ordinal", 2: "ordinal"}
ARGS = {
"X": X,
"x": x,
"data_types": data_types
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ndarray, ndim 1, dtype family float, shape (4,) — shape (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
|
| mixed_distance |
Ran ran; our contract draft was wrong, not the code |
COLA-Laboratory/GraphFLA/graphfla/distances.py code served (permissive licence) · get_code("2fc4930be14b0a88") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (3,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
# Set up small test data
# X: 2D array with 3 samples and 4 features
X = np.array([
[0, 1, 2, 3],
[1, 1, 3, 2],
[0, 0, 2, 4]
], dtype=np.int64)
# x: 1D reference vector with 4 features
x = np.array([0, 1, 2, 3], dtype=np.int64)
# data_types: dictionary mapping column indices to data types
# Features 0-1 are categorical/boolean, features 2-3 are ordinal
data_types = {
0: 'categorical',
1: 'boolean',
2: 'ordinal',
3: 'ordinal'
}
ARGS = {
'X': X,
'x': x,
'data_types': data_types
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ndarray, ndim 1, dtype family float, shape (3,) — shape (3,) as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| random_search |
Ran ran; our contract draft was wrong, not the code |
COLA-Laboratory/GraphFLA/graphfla/sampling.py code served (permissive licence) · get_code("55e7ecf3dec6315a") 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 DataFrame. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
import pandas as pd
from scipy import stats
def simple_evaluate(config):
"""Simple evaluation function that returns a fitness score based on config parameters."""
fitness = config['learning_rate'] * 100 + config['batch_size'] * 0.1
if config['optimizer'] == 'adam':
fitness += 5
else:
fitness += 3
return fitness
param_distributions = {
'learning_rate': stats.uniform(0.001, 0.1),
'batch_size': [16, 32, 64, 128],
'optimizer': ['adam', 'sgd', 'rmsprop'],
'epochs': stats.randint(10, 100)
}
n_iter = 5
evaluate = simple_evaluate
ARGS = {
'param_distributions': param_distributions,
'n_iter': n_iter,
'evaluate': evaluate
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, pandas, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
|
| remove_isolated_nodes |
Ran ran; our contract draft was wrong, not the code |
COLA-Laboratory/GraphFLA/graphfla/utils.py code served (permissive licence) · get_code("132880a862b5fd06") 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 logging
import numpy as np
import warnings
# We need to mock the igraph library since it's not a standard library
class MockGraph:
def __init__(self, vertices=5, edges=None, directed=True):
self.vertices = vertices
self._edges = edges if edges is not None else [(0, 1), (1, 2), (2, 3), (3, 4)]
self.directed = directed
self._deleted_vertices = set()
def ecount(self):
return len(self._edges)
def vcount(self):
return self.vertices - len(self._deleted_vertices)
def degree(self):
# Calculate total degree (in + out for directed graphs)
degree_array = np.zeros(self.vertices, dtype=int)
for src, dst in self._edges:
if src not in self._deleted_vertices and dst not in self._deleted_vertices:
degree_array[src] += 1
degree_array[dst] += 1
return degree_array.tolist()
def delete_vertices(self, vertices):
self._deleted_vertices.update(vertices)
self.vertices = len([v for v in range(self.vertices) if v not in self._deleted_vertices])
def induced_subgraph(self, vertices):
# Create a new graph with only the specified vertices
vertex_set = set(vertices)
new_edges = [(src, dst) for src, dst in self._edges
if src in vertex_set and dst in vertex_set]
new_graph = MockGraph(len(vertices), new_edges, self.directed)
return new_graph
# Create a simple graph with some isolated nodes
# Graph with 6 vertices: edges connect 0-1, 1-2, 2-3
# Vertices 4 and 5 are isolated
graph = MockGraph(vertices=6, edges=[(0, 1), (1, 2), (2, 3)])
ARGS = {
'graph': graph,
'verbose': False,
'protected': None
}
- 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
|
| timeit |
Ran ran; our contract draft was wrong, not the code |
COLA-Laboratory/GraphFLA/graphfla/utils.py code served (permissive licence) · get_code("f0cf2c87e06e012e") 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 function. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import logging
import time
from functools import wraps
logger = logging.getLogger(__name__)
def timeit(method):
"""
A decorator to measure and log the execution time of a method.
The timing is emitted at ``DEBUG`` level on the ``graphfla`` logger, so it
is silent by default (logging's default level is ``WARNING``) and honours
``verbose``. To see per-step timings, raise the package log level::
import logging
logging.getLogger("graphfla").setLevel(logging.DEBUG)
logging.basicConfig() # if no handler is configured yet
"""
@wraps(method)
def timed(*args, **kwargs):
start_time = time.perf_counter()
result = method(*args, **kwargs)
elapsed_time = time.perf_counter() - start_time
logger.debug('Method %s executed in %.4f seconds.', method.__name__, elapsed_time)
return result
return timed
# Create a simple test method to decorate
class SimpleClass:
@timeit
def example_method(self, x, y=10):
"""A simple method to test the timeit decorator."""
time.sleep(0.001)
return x + y
# Set up logging to see debug messages
logging.basicConfig(level=logging.DEBUG)
logging.getLogger("graphfla").setLevel(logging.DEBUG)
# The timeit decorator takes a single parameter: the method to decorate
# We'll pass a simple method as the argument
test_instance = SimpleClass()
decorated_method = test_instance.example_method
ARGS = {
'method': decorated_method
}
- 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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
|
| track |
Ran ran; our contract draft was wrong, not the code |
COLA-Laboratory/GraphFLA/graphfla/_progress.py code served (permissive licence) · get_code("a3371c0c56154030") 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 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
import numpy as np
from typing import Iterable, Optional
torch.manual_seed(0)
# Create a simple iterable - a list of integers
iterable = list(range(5))
# Create description string
description = "Processing items"
# Set total to None to test inference from len()
total = None
# Set verbose to False (default behavior, no progress bar shown)
verbose = False
ARGS = {
"iterable": iterable,
"description": description,
"total": total,
"verbose": verbose,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, rich, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family int — 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
|
| batched_find_neighbors |
Not yet run unverified (harvested, no recorded run) |
COLA-Laboratory/GraphFLA/graphfla/lon.py code served (permissive licence) · get_code("4d2c2fdde6ab6b49") How it ran |
| get_lon |
Not yet run unverified (harvested, no recorded run) |
COLA-Laboratory/GraphFLA/graphfla/lon.py code served (permissive licence) · get_code("14233686b8efcff2") How it ran |