| check_result |
Ran ran, violated the contract we drafted |
choosewhatulike/trainable-agents/run_api_gen_data.py code served (permissive licence) · get_code("af3878439bc986a9") 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.
import torch
torch.manual_seed(0)
ARGS = {
"text": "Hello, World!"
}
- 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 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
|
| format_interactions |
Ran ran; our contract draft was wrong, not the code |
choosewhatulike/trainable-agents/run_api_score_turns.py code served (permissive licence) · get_code("25b1dea29e55122c") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
torch.manual_seed(0)
# Construct valid arguments for format_interactions
content = [
{
'turn_content': [
{
'action': '(speaking)',
'role': 'Alice',
'content': 'Hello, how are you?'
}
]
},
{
'turn_content': [
{
'action': '(speaking)',
'role': 'Bob',
'content': 'I am doing well, thanks!'
}
]
},
{
'turn_content': [
{
'action': '(listening)',
'role': 'Charlie',
'content': 'Not included'
}
]
},
{
'turn_content': [
{
'action': '(speaking)',
'role': 'Alice',
'content': 'Great to hear!'
}
]
}
]
ARGS = {
'content': content
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_output |
Ran ran; our contract draft was wrong, not the code |
choosewhatulike/trainable-agents/api_call_util.py code served (permissive licence) · get_code("5390fac97c1ea60e") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
torch.manual_seed(0)
res = {
'message': {
'content': 'This is a test response'
},
'finish_reason': 'stop'
}
ARGS = {
'res': res
}
- 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 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
|
| get_output_raw |
Ran ran; our contract draft was wrong, not the code |
choosewhatulike/trainable-agents/api_call_util.py code served (permissive licence) · get_code("28a20e352cb1ce38") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
torch.manual_seed(0)
ARGS = {
'res': {
'text': 'Hello world',
'finish_reason': 'stop'
}
}
- 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 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
|
| get_prompt_single_item |
Ran ran; our contract draft was wrong, not the code |
choosewhatulike/trainable-agents/run_api_score_turns.py code served (permissive licence) · get_code("4d8c470a88efd7b5") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
def format_interactions(content: list):
result = []
for item in content:
d = item['turn_content'][0]
if d['action'] == '(speaking)':
result.append(f"{d['role']}: {d['content']}")
return '\n'.join(result)
def get_prompt_single_item(name, profile, ex, meta_prompt, model_prefix, model_result_path):
loc_time = 'Coffee Shop - Afternoon'
status = f'{name} is casually chatting with a man from the 21st century. {name} fully trusts the man who engage in conversation and shares everything {name} knows without reservation.'
context_str = profile[0]
topic = ex['topic']
qid = ex['qid']
character_name = name
interaction_str = format_interactions(ex['content'])
prompt = meta_prompt.format(agent_name=name, agent_context=context_str, loc_time=loc_time, status=status, interactions=interaction_str)
return {'prompt': prompt, 'model_name': model_prefix, 'qid': qid, 'question': topic, 'character_name': character_name, 'gen_answer_id': f'{name}-{qid}-{model_prefix}-{character_name}', 'result_path': model_result_path}
torch.manual_seed(0)
name = "Cleopatra"
profile = [
"Cleopatra VII was the last active pharaoh of Ptolemaic Egypt. She was known for her intelligence, charisma, and political acumen."
]
ex = {
'topic': 'What was your greatest achievement?',
'qid': 'q001',
'content': [
{
'turn_content': [
{
'action': '(speaking)',
'role': 'Man',
'content': 'Hello Cleopatra, how are you today?'
}
]
},
{
'turn_content': [
{
'action': '(speaking)',
'role': 'Cleopatra',
'content': 'I am well. I have unified my kingdom and brought prosperity to Egypt.'
}
]
},
{
'turn_content': [
{
'action': '(thinking)',
'role': 'Man',
'content': 'This is interesting'
}
]
}
]
}
meta_prompt = "You are {agent_name}. Context: {agent_context}. Location and time: {loc_time}. Status: {status}. Previous interactions:\n{interactions}\n\nRespond to the user's question."
model_prefix = "gpt-3.5-turbo"
model_result_path = "/tmp/results"
ARGS = {
'name': name,
'profile': profile,
'ex': ex,
'meta_prompt': meta_prompt,
'model_prefix': model_prefix,
'model_result_path': model_result_path
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_reply |
Ran ran; our contract draft was wrong, not the code |
choosewhatulike/trainable-agents/run_api_score_single.py code served (permissive licence) · get_code("e146af9402e23bba") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import re
def get_reply(d_list):
result = ''
if isinstance(d_list, dict):
result = d_list['content']
else:
for d in d_list:
if d['action'] == '(speaking)':
result = d['content']
break
result = result.split('\n\n')[0]
result = re.sub('\\*.*?\\*', '', result)
return result
# Test case 1: d_list is a dict
test_dict = {
'content': 'Hello world\n\nSecond paragraph',
'other_key': 'value'
}
# Test case 2: d_list is a list of dicts
test_list = [
{
'action': 'other_action',
'content': 'This should be skipped'
},
{
'action': '(speaking)',
'content': 'This is the *formatted* reply\n\nMore text'
},
{
'action': 'another_action',
'content': 'This should also be skipped'
}
]
# Using the dict test case
ARGS = {
'd_list': test_dict
}
- 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 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
|
| get_reply |
Ran ran; our contract draft was wrong, not the code |
choosewhatulike/trainable-agents/run_api_score_turns.py code served (permissive licence) · get_code("1d971f3ce7ecf159") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
torch.manual_seed(0)
# The function get_reply takes a result parameter and calls .split('\n\n')[0] on it
# This means result must be a string with at least one '\n\n' separator
# The function splits by double newlines and returns the first part
result = "This is the first paragraph.\n\nThis is the second paragraph.\n\nThis is the third."
ARGS = {
"result": result
}
- 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 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
|
| parse_dialogue_info |
Ran ran; our contract draft was wrong, not the code |
choosewhatulike/trainable-agents/parser/parse_data_dialogue.py code served (permissive licence) · get_code("19921ae215b33a22") 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 parse_dialogue_info(text):
res = []
parts = list(text.split('\n\n'))
prefix = []
for idx, p in enumerate(parts):
if 'Background:' in p:
prefix.append(p)
continue
role = ''
action = ''
is_dialogue = False
lines = list(p.split('\n'))
if len(lines) == 3:
role = lines[0].strip()
action = lines[1].strip()
content = lines[2].strip()
res.append({'role': role, 'action': action, 'content': content.strip('"')})
elif len(lines) == 2:
t = lines[0].strip()
if '(' in t or ')' in t:
is_dialogue = True
elif ':' in t:
is_dialogue = True
elif t.upper() == t:
is_dialogue = True
if is_dialogue:
lpos = t.find('(')
rpos = t.find(')')
if lpos >= 0 and rpos >= 0:
role = t[:lpos] + t[rpos + 1:]
action = t[lpos:rpos + 1]
else:
role = t.split(':')[0].strip()
content = lines[1].strip()
res.append({'role': role, 'action': action, 'content': content.strip('"')})
elif len(lines) == 1:
t = lines[0].strip()
if '(' in t or ')' in t:
is_dialogue = True
elif ':' in t:
is_dialogue = True
if is_dialogue:
lpos = t.find('(')
rpos = t.find(')')
if lpos >= 0 and rpos >= 0:
role = t[:lpos]
action = t[lpos:rpos + 1]
content = t[rpos + 1:].strip().strip(':')
else:
role = t.split(':')[0].strip()
content = t.split(':')[1].strip()
res.append({'role': role, 'action': action, 'content': content.strip('"')})
new_res = []
for ex in res:
if not ex['role'] or not ex['content']:
continue
ex['role'] = re.sub('\\((.*?)\\)', '', ex['role'])
ex['role'] = ex['role'].replace(':', '').strip()
ex['content'] = re.sub('\\((.*?)\\)', '', ex['content']).strip()
new_res.append(ex)
res = new_res
new_prefix = []
for p in prefix:
p = p.replace('Background:', '').strip()
new_prefix.append(p)
prefix = new_prefix
if not res:
return 'EPT'
if len(res) < 3:
return 'SHT'
if not prefix:
return 'PRE'
return {'setting': prefix, 'dialogue': res}
# Construct valid test input
text_input = """Background: A cozy coffee shop on a rainy afternoon.
Alice (smiling): Hello, how are you today?
"I'm doing great, thanks for asking!"
Bob (nervous): Hi there.
"Just arrived from the meeting."
Charlie (excited): Wonderful to see you!
"Can't wait to catch up with everyone here."""
ARGS = {
'text': text_input
}
- 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
|
| post_process |
Ran ran; our contract draft was wrong, not the code |
choosewhatulike/trainable-agents/run_api_score_single.py code served (permissive licence) · get_code("7d2f2e6ced176d21") 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 post_process(obj):
completions = obj['completions']
answer = []
for comp in completions:
matches = re.findall('\\s\\d', comp)
obj['matches'] = matches
if len(matches):
answer.append(matches[-1])
else:
answer.append(None)
obj['answers'] = answer
return obj
# Construct valid arguments
ARGS = {
'obj': {
'completions': [
'hello 1 world 2 test',
'no matches here',
'space 5 and 9 more'
]
}
}
- 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
|
| read_json |
Ran ran; our contract draft was wrong, not the code |
choosewhatulike/trainable-agents/eval_utils.py code served (permissive licence) · get_code("ad5f98bba0c21929") 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 a temporary JSON file
temp_dir = tempfile.mkdtemp()
json_file = os.path.join(temp_dir, "test.json")
# Write a simple JSON file
test_data = {"key": "value", "number": 42, "array": [1, 2, 3]}
with open(json_file, 'w') as f:
json.dump(test_data, f)
# Define arguments for read_json function
ARGS = {
"path": json_file
}
- 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
|
| read_jsonl |
Ran ran; our contract draft was wrong, not the code |
choosewhatulike/trainable-agents/io_utils.py code served (permissive licence) · get_code("3151efbd64278742") 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 tempfile
import json
import os
# Create a temporary JSONL file with test data
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test.jsonl")
# Write some test JSONL data
test_data = [
{"id": 1, "text": "hello world"},
{"id": 2, "text": "foo bar"},
{"id": 3, "name": "test", "value": 42}
]
with open(temp_file, 'w') as f:
for item in test_data:
f.write(json.dumps(item) + "\n")
ARGS = {
"path": temp_file
}
- 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 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
|
| read_profile |
Ran ran; our contract draft was wrong, not the code |
choosewhatulike/trainable-agents/eval_utils.py code served (permissive licence) · get_code("36c2e7789224a00e") 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 tempfile
import os
# Create a temporary directory and file for the test
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test_profile.txt")
# Write a valid profile file
profile_content = """# Agent Smith
This is the first section of the agent profile.
It contains information about the agent.
This is the second section with more details.
And a third section for additional info."""
with open(temp_file, 'w', encoding='utf-8') as f:
f.write(profile_content)
ARGS = {
'path': temp_file
}
- 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
|
| decoder_for_openai |
Not yet run unverified (harvested, no recorded run) |
choosewhatulike/trainable-agents/api_call_util.py code served (permissive licence) · get_code("13ae1a522a371250") How it ran |
| load_gen_data |
Not yet run unverified (harvested, no recorded run) |
choosewhatulike/trainable-agents/parser/parse_data_dialogue.py code served (permissive licence) · get_code("94821323f3209979") How it ran |
| read_gen_data |
Not yet run unverified (harvested, no recorded run) |
choosewhatulike/trainable-agents/eval_utils.py code served (permissive licence) · get_code("ad965edc5fbc1c41") How it ran |