| build_graph |
Ran ran on a synthesized input |
gai-community/graphomni/eval_fun/verification.py code served (permissive licence) · get_code("83b83cb8a93f63f4") 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 defaultdict. 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
from collections import defaultdict, deque
torch.manual_seed(0)
# The build_graph function takes edges as input
# It iterates through edges as (u, v) tuples
# It builds an undirected adjacency list by appending v to adjacency[u] and u to adjacency[v]
# So edges should be a list of (u, v) tuples
edges = [
(0, 1),
(1, 2),
(2, 3),
(0, 3),
]
ARGS = {
"edges": edges
}
- 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 defaultdict — a defaultdict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a defaultdict 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
|
| build_graph_from_csv |
Ran ran on a synthesized input |
gai-community/graphomni/eval_fun/verification.py code served (permissive licence) · get_code("d7ca9d0e9d027761") 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 defaultdict. 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 CSV file with graph data
temp_dir = tempfile.mkdtemp()
csv_file_path = os.path.join(temp_dir, "graph.csv")
# Write a sample CSV file with vertices and edges
with open(csv_file_path, 'w') as f:
f.write("# Sample graph file\n")
f.write("1\n")
f.write("2\n")
f.write("3\n")
f.write("1 2\n")
f.write("2 3\n")
f.write("1 3\n")
ARGS = {
"file_path": csv_file_path
}
- 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 defaultdict — a defaultdict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a defaultdict 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
|
| convert_english_numbers |
Ran ran on a synthesized input |
gai-community/graphomni/eval_fun/triangle_eval_fun.py code served (permissive licence) · get_code("138606b1a03b7b4d") 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 re
english_to_number = {'zero': 0, 'one': 1, 'two': 2, 'three': 3, 'four': 4, 'five': 5, 'six': 6, 'seven': 7, 'eight': 8, 'nine': 9, 'ten': 10, 'eleven': 11, 'twelve': 12, 'thirteen': 13, 'fourteen': 14, 'fifteen': 15, 'sixteen': 16, 'seventeen': 17, 'eighteen': 18, 'nineteen': 19, 'twenty': 20, 'thirty': 30}
def convert_english_numbers(text):
"""
Converts English number words in a text to their numeric equivalents.
Args:
text (str): Input text containing English number words.
Returns:
str: Text with English number words replaced by their numeric equivalents.
"""
words = text.split()
for i, word in enumerate(words):
cleaned_word = re.sub('[^a-zA-Z]', '', word).lower()
if cleaned_word in english_to_number:
words[i] = str(english_to_number[cleaned_word])
return ' '.join(words)
ARGS = {
'text': 'I have zero apples, one orange, and twenty-three bananas. five is also nice.'
}
- 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 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
|
| create_adj_matrix |
Ran ran on a synthesized input |
gai-community/graphomni/eval_fun/token.py code served (permissive licence) · get_code("70beee368bff933c") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family int, shape (4, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
# Nodes: a list of node identifiers or objects
nodes = [0, 1, 2, 3]
# Edges: a list of tuples (source, target)
edges = [(0, 1), (1, 2), (2, 3), (0, 3)]
ARGS = {
"nodes": nodes,
"edges": edges,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ndarray, ndim 2, dtype family int, shape (4, 4) — shape (4, 4) as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| eval_connectivity |
Ran ran on a synthesized input |
gai-community/graphomni/eval_fun/connectivity_eval_fun.py code served (permissive licence) · get_code("b16ac88a9e21c924") 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 re
def eval_connectivity(ans, gt):
vote = 0
paragraphs = [p.strip() for p in ans.split('\n\n') if p.strip()]
lines = [line.strip().lower().strip('.!?') for line in ans.split('\n') if line.strip()]
if lines:
first_line = lines[0]
last_lines = lines[-2:] if len(lines) > 1 else [lines[-1]]
if first_line in {'yes', ' no.', ' no ', 'no', 'true', 'false'}:
if first_line in {'yes', 'true'} and gt or (first_line in {' no.', ' no ', 'no', 'false'} and (not gt)):
return 1
else:
return 0
last_text = ' '.join(last_lines)
if any((re.search('\\b' + re.escape(phrase) + '\\b', last_text) for phrase in ['yes', 'true', 'there is a path', 'the answer is yes'])):
return int(gt)
if any((re.search('\\b' + re.escape(phrase) + '\\b', last_text) for phrase in [' no.', ' no ', 'no', 'false', 'there is no path', 'the answer is no'])):
return int(not gt)
if paragraphs:
first_paragraph_lines = paragraphs[0].split('\n')
first_paragraph_last_lines = first_paragraph_lines[-2:] if len(first_paragraph_lines) > 1 else [first_paragraph_lines[-1]]
first_paragraph_last_text = ' '.join(first_paragraph_last_lines).strip().lower()
if any((phrase in first_paragraph_last_text for phrase in ['yes', 'true', 'there is a path', 'the answer is yes'])) and gt:
return 1
if any((phrase in first_paragraph_last_text for phrase in [' no.', ' no ', 'no', 'false', 'there is no path', 'the answer is no'])) and (not gt):
return 1
output_match = re.search('#.*?output[:\\s]+(true|false)', ans, re.IGNORECASE)
if output_match:
output_value = output_match.group(1).lower()
if output_value in {'true'} and gt or (output_value in {'false'} and (not gt)):
return 1
else:
return 0
no_index = next((match.start() for match in re.finditer('\\bno\\b', ans) if 'path' in ans[max(0, match.start() - 50):match.start() + 50]), -1)
negative_positions = [no_index, ans.find('false') if 'path' in ans[max(0, ans.find('false') - 50):ans.find('false') + 50] else -1, ans.find('there is no path'), ans.find('the answer is no')]
earliest_negative = min((pos for pos in negative_positions if pos != -1), default=float('inf'))
positive_positions = [ans.find('yes') if 'path' in ans[max(0, ans.find('yes') - 50):ans.find('yes') + 50] else -1, ans.find('true') if 'path' in ans[max(0, ans.find('true') - 50):ans.find('true') + 50] else -1, ans.find('there is a path') if 'if there is a path' in ans[max(0, ans.find('there is a path') - 50):ans.find('true') + 50] else -1, ans.find('the answer is yes')]
earliest_positive = min((pos for pos in positive_positions if pos != -1), default=float('inf'))
if gt is True and earliest_positive < earliest_negative or (gt is False and earliest_negative < earliest_positive):
vote = 1
return vote
ARGS = {
"ans": "Looking at the graph, I need to determine if there is a path from node A to node B.\n\nAfter analyzing the connections, the answer is yes.",
"gt": True
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type 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
|
| eval_cycle |
Ran ran on a synthesized input |
gai-community/graphomni/eval_fun/cycle_eval_fun.py code served (permissive licence) · get_code("a7c5dc906f2a4be7") 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 re
def eval_cycle(ans, gt):
"""
Evaluate the presence of a cycle in the answer text compared to the ground truth.
Args:
ans (str): Answer text containing statements about cycles.
gt (bool): Ground truth indicating whether a cycle exists (True for cycle, False otherwise).
Returns:
int: Returns 1 if the evaluation matches the ground truth, otherwise 0.
"""
gt = eval(gt.capitalize())
vote = 0
no_index = next((match.start() for match in re.finditer('\\bno\\b', ans)), -1)
negative_positions = [no_index, ans.find('false'), ans.find('there is no cycle')]
earliest_negative = min((pos for pos in negative_positions if pos != -1), default=float('inf'))
positive_positions = [ans.find('yes'), ans.find('true'), ans.find('there is a cycle')]
earliest_positive = min((pos for pos in positive_positions if pos != -1), default=float('inf'))
if gt is True and earliest_positive < earliest_negative or (gt is False and earliest_negative < earliest_positive):
vote = 1
return vote
ARGS = {
"ans": "yes, there is a cycle in the graph",
"gt": "true"
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type 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
|
| eval_diameter_number |
Ran ran on a synthesized input |
gai-community/graphomni/eval_fun/diameter_eval_fun.py code served (permissive licence) · get_code("2d2637dd0f93dd94") 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 re
ARGS = {
"text": """The diameter of the graph is 5.
This represents the longest shortest path between any two nodes in the network.
The maximum of these shortest paths is indeed 5.""",
"gt": 5.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 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
|
| extract_and_check_numbers_bfsorder |
Ran ran on a synthesized input |
gai-community/graphomni/eval_fun/bfsorder_eval_fun.py code served (permissive licence) · get_code("3efcfb2d6b5a05d1") 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 re
# Analyze the function: extract_and_check_numbers_bfsorder(content, start)
# Parameters:
# - content: a string containing text with BFS traversal information
# - start: an integer representing the starting node
# The function:
# 1. Uses 'content' as a string to split by '\n\n' and process with regex
# 2. Uses 'start' as an integer in f-string pattern and comparison (numbers[0] == start)
# Create valid test data
content = """
The BFS traversal order starting from node 1 is: 1, 2, 3, 4, 5.
The graph has multiple paths. The traversal order starting at node 1 would be 1, 2, 3, 4.
BFS order from 1 gives us: 1, 5, 6, 7, 8.
"""
start = 1
ARGS = {
"content": content,
"start": start
}
- 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 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
|
| extract_and_check_numbers_dimater |
Ran ran on a synthesized input |
gai-community/graphomni/eval_fun/diameter_eval_fun.py code served (permissive licence) · get_code("b7515efb0fb3c7a9") 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 re
def extract_and_check_numbers_dimater(content):
pattern = f'(diameter is|the maximum of these shortest paths is|diameter of the given graph|diameter of our graph|diameter of this graph|diameter of the graph|the diameter of the provided graph|diameter of the graph is|answer is|diameter of this graph is|the longest shortest path is|has diameter|anwser is|output)(.*?)(?=\\.|$)'
result = {}
paragraphs = content.split('\n\n')
merged_paragraphs = []
for i in range(len(paragraphs)):
cleaned_paragraph = re.sub('\\s+', ' ', paragraphs[i].strip())
if len(cleaned_paragraph) < 20 and i > 0:
merged_paragraphs[-1] += '.' + cleaned_paragraph
else:
merged_paragraphs.append(cleaned_paragraph)
merged_content = '\n\n'.join(merged_paragraphs)
paragraphs = merged_content.split('\n\n')
for paragraph in paragraphs:
paragraph.replace('\n', '')
lines = paragraph.split('.')
for line in lines:
line = line
match = re.search(pattern, line)
if match:
matches = re.findall(pattern, line)
for match in matches:
numbers = re.findall('\\d+\\.\\d+|\\d+', match[1].strip())
numbers = [float(num) for num in numbers]
if len(numbers) == 1:
result[line, match[0].strip()] = float(numbers[0])
elif len(numbers) > 1:
result[line, match[0].strip()] = float(numbers[-1])
return result
# Set up test content with various diameter mentions
content = """The graph has several nodes. The diameter of the graph is 5.
Another paragraph here. The diameter is 3.5 units.
The maximum of these shortest paths is 42 and this matters. Answer is 7."""
ARGS = {
"content": content
}
- 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 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
|
| extract_and_check_numbers_path |
Ran ran on a synthesized input |
gai-community/graphomni/eval_fun/shortest_path_eval_fun.py code served (permissive licence) · get_code("d61be97e2d23280d") 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 re
# Analyze the function to understand what parameters it needs:
# - content: a string containing text with path information
# - start: an integer representing a starting node
# - end: an integer representing an ending node
# The function searches for patterns in content that describe paths between nodes
# and extracts numbers from those descriptions.
# Create test content that will match the regex patterns
content = """
Here is the path between node 1 and node 2. The path is 3, 4, 5, 6.
Some other text here. And the path is 7, 8, 9.
Another section about the path from node 1 to node 2 with numbers 10, 11, 12, 13.
The shortest path is 14, 15, 16.
The answer is 17, 18, 19, 20.
"""
start = 1
end = 2
ARGS = {
"content": content,
"start": start,
"end": end,
}
- 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 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
|
| extract_and_check_numbers_triangle |
Ran ran on a synthesized input |
gai-community/graphomni/eval_fun/triangle_eval_fun.py code served (permissive licence) · get_code("d8333297634fc3ad") 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 re
# Construct arguments for extract_and_check_numbers_triangle
content = """
The graph contains several triangles. The number of triangles in the graph is 5.
After analyzing the structure, the total number of triangles found is 12.
The output will be fifteen triangles.
Some analysis shows that answer is 3 triangles.
Additional paragraph with few words.
The number of triangle forms a pattern. We found that output of the above code is twenty triangles.
This mentions nodes and forms which should be filtered out. The total is 8 triangles but nodes matter.
Starting with ten triangles and counting more carefully gives us twenty-five triangles total.
"""
ARGS = {
"content": content
}
- 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 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
|
| extract_data_from_jsonl |
Ran ran on a synthesized input |
gai-community/graphomni/closedllm/batchapi_openai_6tasks_retrive.py code served (permissive licence) · get_code("08ecf1166f290426") 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 json
import tempfile
import os
# Create temporary JSONL files with valid data matching the function's expected structure
temp_dir = tempfile.mkdtemp()
# Create first test file
jsonl_file_1 = os.path.join(temp_dir, 'test1.jsonl')
with open(jsonl_file_1, 'w', encoding='utf-8') as f:
f.write(json.dumps({
'custom_id': 'id_001',
'response': {
'body': {
'choices': [
{
'message': {
'content': 'This is the first response content'
}
}
]
}
}
}) + '\n')
f.write(json.dumps({
'custom_id': 'id_002',
'response': {
'body': {
'choices': [
{
'message': {
'content': 'This is the second response content'
}
}
]
}
}
}) + '\n')
# Create second test file
jsonl_file_2 = os.path.join(temp_dir, 'test2.jsonl')
with open(jsonl_file_2, 'w', encoding='utf-8') as f:
f.write(json.dumps({
'custom_id': 'id_003',
'response': {
'body': {
'choices': [
{
'message': {
'content': 'This is the third response content'
}
}
]
}
}
}) + '\n')
ARGS = {
'file_paths': [jsonl_file_1, jsonl_file_2]
}
- 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 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
|
| extract_numbers_before_node |
Ran ran on a synthesized input |
gai-community/graphomni/eval_fun/bfsorder_eval_fun.py code served (permissive licence) · get_code("f6524b105c2bfbee") 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 re
def extract_numbers_before_node(input_str):
match = re.search('(.*?) node', input_str)
if match:
before_node = match.group(1)
numbers = re.findall('\\d+', before_node)
return [int(num) for num in numbers]
else:
numbers = re.findall('\\d+', input_str)
numbers = [int(num) for num in numbers]
return numbers
ARGS = {
"input_str": "123 456 node 789 101112"
}
- 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 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
|
| extract_relevant_sentences |
Ran ran on a synthesized input |
gai-community/graphomni/eval_fun/connectivity_eval_fun.py code served (permissive licence) · get_code("a1917cc156eef5d6") 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 re
def extract_relevant_sentences(ans):
"""
Extract relevant sentences from the answer text based on predefined keywords.
Args:
ans (str): Answer text containing statements about connectivity.
Returns:
list: List of sentences that contain relevant connectivity indicators.
"""
lines = [line.strip().lower().strip('.!?') for line in ans.split('\n') if line.strip()]
relevant_sentences = []
first_paragraph = ans.split('\n\n')[0] if '\n\n' in ans else ans
first_paragraph_sentences = [line.strip().lower().strip('.!?') for line in first_paragraph.split('\n') if line.strip()]
keywords = ['yes', ' no.', ' no ', 'no', 'true', 'false', 'there is a path', 'the path', 'answer is', 'exist', 'not exist', 'no path', 'a path']
for i, line in enumerate(lines):
if any((re.search('\\b' + re.escape(phrase) + '\\b', line) for phrase in keywords)):
relevant_sentences.append(line)
output_match = re.search('#.*?output[:\\s]+(true|false)', ans, re.IGNORECASE)
if output_match:
relevant_sentences.insert(0, f'output: {output_match.group(1).lower()}')
return (relevant_sentences, first_paragraph_sentences)
# Test setup
sample_answer = """# Graph Connectivity Problem
Let me analyze the graph structure.
There is a path from node A to node B.
The answer is yes, connectivity exists.
# Output: True
However, no path exists in the reverse direction.
This means the graph is not fully connected."""
ARGS = {
"ans": sample_answer
}
- 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 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
|
| extract_relevant_sentences |
Ran ran on a synthesized input |
more1643127748/graphomni/eval_fun/cycle_eval_fun.py code served (permissive licence) · get_code("8027b8a1f685b048") 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 re
def extract_relevant_sentences(ans):
"""
Extract relevant sentences from the answer text based on predefined keywords.
Args:
ans (str): Answer text containing statements about cycle.
Returns:
list: List of sentences that contain relevant cycle indicators.
"""
lines = [line.strip().lower().strip('.!?') for line in ans.split('\n') if line.strip()]
relevant_sentences = []
first_paragraph = ans.split('\n\n')[0] if '\n\n' in ans else ans
first_paragraph_sentences = [line.strip().lower().strip('.!?') for line in first_paragraph.split('\n') if line.strip()]
keywords = ['yes', ' no.', ' no ', 'no', 'true', 'false', 'there is a cycle', 'there is no cycle', 'answer is', 'exist', 'not exist', 'no cycle', 'multiple cycle', 'a cycle', 'cycles', 'contain any cycle', 'contain cycle', 'cycle can be detected']
for i, line in enumerate(lines):
if any((re.search('\\b' + re.escape(phrase) + '\\b', line) for phrase in keywords)):
relevant_sentences.append(line)
output_match = re.search('#.*?output[:\\s]+(true|false)', ans, re.IGNORECASE)
if output_match:
relevant_sentences.insert(0, f'output: {output_match.group(1).lower()}')
return (relevant_sentences, first_paragraph_sentences)
# Construct test argument
test_ans = """# Problem: Detect cycle in graph
# Output: True
This is the first paragraph discussing the problem.
There is a cycle in the graph.
We need to check if a cycle exists.
This is a second paragraph.
The answer is yes, multiple cycles are present.
No cycle detection needed here."""
ARGS = {
"ans": test_ans
}
- 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 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
|
| filter_sentences |
Ran ran on a synthesized input |
gai-community/graphomni/eval_fun/connectivity_eval_fun.py code served (permissive licence) · get_code("5474a9d6201092ed") 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 float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
torch.manual_seed(0)
# Construct arguments for filter_sentences function
sentences = [
"The cat sat on the mat",
"The dog ran in the park",
"Never the less we continue",
"The bird flew high",
"Do not the same thing"
]
truelist = [
"the",
"less",
"same"
]
notsurelist = [
"Never ",
"Do not "
]
ARGS = {
"sentences": sentences,
"truelist": truelist,
"notsurelist": notsurelist
}
- 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 list, ndim 1, 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
|
| find_batch_ids_in_logs |
Ran ran on a synthesized input |
gai-community/graphomni/closedllm/batchapi_openai_6tasks_retrive.py code served (permissive licence) · get_code("dd84d21546412fc1") 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 os
import re
import tempfile
import argparse
# Create a temporary directory structure for testing
temp_dir = tempfile.mkdtemp()
log_folder = os.path.join(temp_dir, 'openailog', 'log', 'test_task')
os.makedirs(log_folder, exist_ok=True)
# Create a sample log file that matches the expected pattern
log_filename = 'test_model-test_mode-test_prompt-test_graph.log'
log_filepath = os.path.join(log_folder, log_filename)
# Write sample log content with batch_id and file_name patterns
log_content = """Some initial log lines
'batch_id': 'batch_123', 'file_name': 'file_one.txt'
'batch_id': 'batch_456', 'file_name': 'file_two.txt'
Application started successfully."""
with open(log_filepath, 'w', encoding='utf-8') as f:
f.write(log_content)
# Create args namespace
class Args:
def __init__(self):
self.task = 'test_task'
self.model = 'test_model'
self.mode = 'test_mode'
self.prompt = 'test_prompt'
self.graph_representation = 'test_graph'
# Patch the log path to use our temp directory
original_cwd = os.getcwd()
temp_cwd = temp_dir
os.chdir(temp_cwd)
args_obj = Args()
ARGS = {
'args': args_obj
}
# Note: Change back to original directory after setup if needed
os.chdir(original_cwd)
- 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 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
|
| get_edges_from_str |
Ran ran on a synthesized input |
gai-community/graphomni/eval_fun/token.py code served (permissive licence) · get_code("f700f4d3a7aa2d5c") 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.
import numpy as np
import re
def get_edges_from_str(matrix_str):
"""
:param matrix_str: str,
:return: list of tuples,
"""
if matrix_str.strip() == '[]':
return []
rows = matrix_str.split(']')
matrix_list = []
for row in rows:
numbers = re.findall('\\d+', row)
if numbers:
matrix_list.append(list(map(int, numbers)))
num_rows = len(matrix_list)
if any((len(row) != num_rows for row in matrix_list)):
raise ValueError(f'{[len(row) for row in matrix_list]}')
matrix = np.array(matrix_list)
edges = [(i, j) for i in range(matrix.shape[0]) for j in range(i + 1, matrix.shape[1]) if matrix[i, j] == 1]
return edges
# Test case 1: Valid adjacency matrix string with edges
matrix_str_1 = "[0 1 0]\n[1 0 1]\n[0 1 0]"
# Test case 2: Empty matrix
matrix_str_2 = "[]"
ARGS = {
"matrix_str": matrix_str_1
}
- 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 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
|
| loadqery |
Ran ran on a synthesized input |
gai-community/graphomni/closedllm/batchapi_openai_6tasks.py code served (permissive licence) · get_code("4fe8ce25424e3f7f") 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 os
import json
import tempfile
import argparse
# Create temporary directories and files for testing
temp_dir = tempfile.mkdtemp()
log_dir = os.path.join(temp_dir, 'logs')
content_dir = os.path.join(log_dir, 'content')
os.makedirs(content_dir, exist_ok=True)
base_dir = temp_dir + '/'
# Create the all_id_answer_dict JSON file
all_id_answer_dict_path = os.path.join(content_dir, 'all_id_answer_dict_test_model.json')
with open(all_id_answer_dict_path, 'w', encoding='utf-8') as f:
json.dump({'existing_id_1': 'answer_1'}, f)
# Create the load task JSON file with sample data
load_path = os.path.join(base_dir, 'load_test_task.json')
sample_data = [
{
'prompt_type': 'test_prompt',
'serialization_type': 'graph_rep',
'difficulty': 'easy',
'name-id': 'new_id_1',
'query': 'SELECT * FROM table1'
},
{
'prompt_type': 'test_prompt',
'serialization_type': 'graph_rep',
'difficulty': 'easy',
'name-id': 'new_id_2',
'query': 'SELECT * FROM table2'
},
{
'prompt_type': 'other_prompt',
'serialization_type': 'graph_rep',
'difficulty': 'easy',
'name-id': 'new_id_3',
'query': 'SELECT * FROM table3'
},
{
'prompt_type': 'test_prompt',
'serialization_type': 'other_rep',
'difficulty': 'easy',
'name-id': 'new_id_4',
'query': 'SELECT * FROM table4'
},
{
'prompt_type': 'test_prompt',
'serialization_type': 'graph_rep',
'difficulty': 'hard',
'name-id': 'new_id_5',
'query': 'SELECT * FROM table5'
},
{
'prompt_type': 'test_prompt',
'serialization_type': 'graph_rep',
'difficulty': 'easy',
'name-id': 'existing_id_1',
'query': 'SELECT * FROM existing'
}
]
with open(load_path, 'w', encoding='utf-8') as f:
json.dump(sample_data, f)
# Create args object
parser = argparse.ArgumentParser()
parser.add_argument('--log_path', type=str, default=log_dir)
parser.add_argument('--model', type=str, default='test_model')
parser.add_argument('--base_dir', type=str, default=base_dir)
parser.add_argument('--task', type=str, default='test_task')
parser.add_argument('--prompt', type=str, default='test_prompt')
parser.add_argument('--graph_representation', type=str, default='graph_rep')
parser.add_argument('--mode', type=str, default='easy')
args = parser.parse_args([])
ARGS = {
'args': args
}
- 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 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
|
| merge_short_paragraphs |
Ran ran on a synthesized input |
gai-community/graphomni/eval_fun/diameter_eval_fun.py code served (permissive licence) · get_code("75a1d893016bda9f") 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 re
def merge_short_paragraphs(text, length_threshold=30):
paragraphs = re.split('\\n\\s*\\n', text.strip())
if not paragraphs:
return text.strip()
merged_paragraphs = [paragraphs[0].strip()]
for i in range(1, len(paragraphs)):
paragraph = paragraphs[i].strip()
if len(paragraph) <= length_threshold:
merged_paragraphs[-1] += ' ' + paragraph
else:
merged_paragraphs.append(paragraph)
first_paragraph = merged_paragraphs[0]
last_paragraph = merged_paragraphs[-1]
return first_paragraph + '\n\n' + last_paragraph
# Construct valid arguments
text_input = """This is a long paragraph that should remain as the first paragraph because it exceeds the length threshold and contains substantial content.
Short.
Another short one.
This is the final paragraph that is long enough to be kept separate and will become the last paragraph in the output."""
ARGS = {
"text": text_input,
"length_threshold": 30
}
- 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 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
|
| validate_bfs |
Ran ran on a synthesized input |
gai-community/graphomni/eval_fun/verification.py code served (permissive licence) · get_code("090ce4b1b724e715") 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 bool, 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.
from collections import defaultdict, deque
# Construct a simple graph as a defaultdict with adjacency lists
graph = defaultdict(list)
graph[0] = [1, 2]
graph[1] = [3]
graph[2] = [3]
graph[3] = []
# Starting node
start = 0
# Valid BFS order from the graph starting at node 0
# BFS should visit: 0, then neighbors [1, 2], then their neighbors [3]
order = [0, 1, 2, 3]
ARGS = {
'graph': graph,
'start': start,
'order': order
}
- 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 bool, 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
|
| check_and_download_model |
Not yet run unverified (harvested, no recorded run) |
gai-community/graphomni/openllm/predict.py code served (permissive licence) · get_code("e3b4cb8414c7b5ec") How it ran |
| count_tokens |
Not yet run unverified (harvested, no recorded run) |
gai-community/graphomni/eval_fun/token.py code served (permissive licence) · get_code("c4fa9aad367464fa") How it ran |
| evaltask |
Not yet run unverified (harvested, no recorded run) |
gai-community/graphomni/main_closemodel.py code served (permissive licence) · get_code("2f51bb646f57b609") How it ran |
| evaluate_bfsorder |
Not yet run unverified (harvested, no recorded run) |
gai-community/graphomni/eval_fun/bfsorder_eval_fun.py code served (permissive licence) · get_code("21523d87e7f7f8d1") How it ran |
| evaluate_shortest_path |
Not yet run unverified (harvested, no recorded run) |
gai-community/graphomni/eval_fun/shortest_path_eval_fun.py code served (permissive licence) · get_code("a336e706c03b0e4e") How it ran |
| getquery |
Not yet run unverified (harvested, no recorded run) |
gai-community/graphomni/main_closemodel.py code served (permissive licence) · get_code("e80463f3f6994f9a") How it ran |