| _build_tag_requests |
Ran ran; our contract draft was wrong, not the code |
honglizhan/mint-empathy/training/reward_verl.py code served (permissive licence) · get_code("6b6c0152dc14c2d9") 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. 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)
# Construct minimal valid arguments for _build_tag_requests
sentences = [
"This is the first sentence.",
"This is the second sentence."
]
tactic_info = {
"tactic_1": {
"user_template": "Analyze this sentence: {Sentence}\nContext: {Full_Response}",
"system_prompt": "You are a helpful assistant analyzing sentences."
},
"tactic_2": {
"user_template": "Evaluate: {Sentence}\nResponse: {Full_Response}",
"system_prompt": "You are an evaluator."
}
}
response = "This is the full response from the model."
ARGS = {
"sentences": sentences,
"tactic_info": tactic_info,
"response": response
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list — a list 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
|
| _call_rm |
Ran ran; our contract draft was wrong, not the code |
honglizhan/mint-empathy/training/reward_verl.py code served (permissive licence) · get_code("54cd983b9ea85fd7") 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 coroutine. 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 asyncio
import threading
import aiohttp
# Set up the thread-local storage that the function uses
_tl = threading.local()
# Define arguments for the _call_rm function
ARGS = {
'server_url': 'http://localhost:8000',
'text': 'This is a sample text for reward modeling.',
'timeout_s': 20.0,
'max_retries': 6,
'base_delay': 1.0,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- aiohttp — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type coroutine — a coroutine output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a coroutine 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
|
| _compute_length_scale |
Ran ran, honoured the contract we drafted |
honglizhan/mint-empathy/training/reward_verl.py code served (permissive licence) · get_code("a7b5fa70ef83e54b") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
torch.manual_seed(0)
ARGS = {
"num_tokens": 150
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| _count_tokens |
Ran ran, honoured the contract we drafted |
honglizhan/mint-empathy/training/reward_verl.py code served (permissive licence) · get_code("03dd453790893318") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
class MockTokenizer:
def encode(self, text, add_special_tokens=False):
# Simple mock: split by spaces and return token ids
tokens = text.split()
return list(range(len(tokens)))
response_text = "hello world this is a test"
tokenizer = MockTokenizer()
ARGS = {
"response_text": response_text,
"tokenizer": tokenizer,
}
- 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 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_think_block |
Ran ran; our contract draft was wrong, not the code |
honglizhan/mint-empathy/training/reward_verl.py code served (permissive licence) · get_code("544890b03f9c68a6") 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 _extract_think_block(text):
match = re.search('<think>(.*?)</think>', text, flags=re.DOTALL)
return match.group(1).strip() if match else ''
ARGS = {
'text': '<think>This is the content inside think tags</think>'
}
- 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
|
| _get_session |
Ran ran; our contract draft was wrong, not the code |
honglizhan/mint-empathy/training/reward_verl.py code served (permissive licence) · get_code("aede22f9a735b3d5") 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 coroutine. 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 asyncio
import threading
import aiohttp
_tl = threading.local()
async def _get_session(timeout_s):
current_loop_id = id(asyncio.get_running_loop())
session = getattr(_tl, 'rm_session', None)
tl_timeout = getattr(_tl, 'rm_session_timeout_s', None)
tl_loop_id = getattr(_tl, 'rm_session_loop_id', None)
if session is None or session.closed or tl_timeout != timeout_s or (tl_loop_id != current_loop_id):
if session is not None and (not session.closed):
try:
await session.close()
except Exception:
pass
session = aiohttp.ClientSession(timeout=aiohttp.ClientTimeout(total=timeout_s))
_tl.rm_session = session
_tl.rm_session_timeout_s = timeout_s
_tl.rm_session_loop_id = current_loop_id
return session
ARGS = {
'timeout_s': 30.0
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- aiohttp — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type coroutine — a coroutine output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a coroutine 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_tactic_info |
Ran ran; our contract draft was wrong, not the code |
honglizhan/mint-empathy/training/reward_verl.py code served (permissive licence) · get_code("6c66181ee1878869") 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 tempfile
import shutil
# Create a temporary directory for test prompt files
test_prompts_dir = tempfile.mkdtemp()
# Create sample prompt files for each tactic
tactic_names = ['information', 'assistance', 'advice', 'validation', 'emotional_expression', 'paraphrasing', 'self_disclosure', 'questioning', 'reappraisal', 'empowerment']
for tactic in tactic_names:
prompt_path = os.path.join(test_prompts_dir, f'{tactic}.txt')
with open(prompt_path, 'w') as f:
f.write(f'This prompt contains "{tactic.replace("_", " ").title()}" guidance.\nProvide assistance accordingly.')
ARGS = {
'prompts_dir': test_prompts_dir
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- termcolor — 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
|
| _strip_think_blocks |
Ran ran; our contract draft was wrong, not the code |
honglizhan/mint-empathy/training/reward_verl.py code served (permissive licence) · get_code("cf9676448bc0aef4") 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 _strip_think_blocks(text):
return re.sub('<think>.*?</think>', '', text, flags=re.DOTALL).strip()
ARGS = {
'text': '<think>This is a thinking block</think>Here is the output.'
}
- 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
|
| _tag_one |
Ran ran; our contract draft was wrong, not the code |
honglizhan/mint-empathy/training/reward_verl.py code served (permissive licence) · get_code("2842dd5726b5e4a8") 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 coroutine. 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 asyncio
import threading
from unittest.mock import Mock, AsyncMock, MagicMock
import torch
# Set up thread-local storage with mock clients
_tl = threading.local()
_tl.client_cycle = iter([0, 1, 0, 1]) # Cycle through client indices
_tl.clients = [
Mock(
chat=Mock(
completions=Mock(
create=AsyncMock(
return_value=Mock(
choices=[
Mock(
message=Mock(content="<score>7</score>")
)
]
)
)
)
)
),
Mock(
chat=Mock(
completions=Mock(
create=AsyncMock(
return_value=Mock(
choices=[
Mock(
message=Mock(content="<score>5</score>")
)
]
)
)
)
)
)
]
# Create semaphore for concurrency control
semaphore = asyncio.Semaphore(4)
# Create test messages
messages = [
{"role": "user", "content": "What is 2+2?"},
{"role": "assistant", "content": "2+2=4"}
]
# Define all arguments for _tag_one
ARGS = {
"tactic_name": "gpt-4",
"messages": messages,
"temperature": 0.7,
"max_tokens": 256,
"semaphore": semaphore,
"max_retries": 3,
"base_delay": 0.5
}
- 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 coroutine — a coroutine output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a coroutine 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
|
| clean_history_structs |
Ran ran; our contract draft was wrong, not the code |
honglizhan/mint-empathy/training/reward_verl.py code served (permissive licence) · get_code("976333acb36c78de") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
# Construct valid arguments for clean_history_structs
# raw_hist_counts: Dict[str, int] | None
raw_hist_counts = {
"word1": 10,
"word2": 5,
"word3": None, # This will be cleaned out
}
# raw_hist_bigrams: Dict[str, Dict[str, int]] | None
raw_hist_bigrams = {
"word1": {
"word2": 3,
"word3": None, # This will be cleaned out
},
"word4": {
"word5": 7,
"word6": 2,
},
"word7": None, # This will be cleaned out
}
# raw_hist_trigrams: Dict[str, Dict[str, Dict[str, int]]] | None
raw_hist_trigrams = {
"word1": {
"word2": {
"word3": 1,
"word4": None, # This will be cleaned out
},
"word5": None, # This will be cleaned out
},
"word6": {
"word7": {
"word8": 2,
},
},
"word9": None, # This will be cleaned out
}
ARGS = {
"raw_hist_counts": raw_hist_counts,
"raw_hist_bigrams": raw_hist_bigrams,
"raw_hist_trigrams": raw_hist_trigrams,
}
- 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 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
|
| compute_bigram_surprisal |
Ran ran, honoured the contract we drafted |
honglizhan/mint-empathy/training/reward_verl.py code served (permissive licence) · get_code("6e7879c4a0873407") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import math
from typing import Dict, List, Set
# Define TACTIC_NAMES and NUM_TACTICS as in the function module
TACTIC_NAMES = ['information', 'assistance', 'advice', 'validation', 'emotional_expression', 'paraphrasing', 'self_disclosure', 'questioning', 'reappraisal', 'empowerment']
NUM_TACTICS = len(TACTIC_NAMES)
# Construct hist_bigrams: a dictionary mapping tactic names to dictionaries of transition counts
hist_bigrams = {
'information': {'assistance': 3, 'advice': 2, 'validation': 1},
'assistance': {'information': 2, 'questioning': 4, 'empowerment': 1},
'advice': {'validation': 2, 'information': 1},
'validation': {'emotional_expression': 3, 'assistance': 2},
'questioning': {'paraphrasing': 2, 'reappraisal': 1},
}
# Construct sentence_tactics: a list of sets of tactic names
sentence_tactics = [
{'information', 'assistance'},
{'advice', 'validation'},
{'questioning', 'empowerment'},
{'paraphrasing', 'emotional_expression'},
]
# Set alpha parameter
alpha = 0.1
# Define ARGS dictionary
ARGS = {
'hist_bigrams': hist_bigrams,
'sentence_tactics': sentence_tactics,
'alpha': alpha,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| compute_kl_divergence |
Ran ran, honoured the contract we drafted |
honglizhan/mint-empathy/training/reward_verl.py code served (permissive licence) · get_code("926141ec74c7a541") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import math
from typing import Dict, List, Set, Tuple
TACTIC_NAMES = ['information', 'assistance', 'advice', 'validation', 'emotional_expression', 'paraphrasing', 'self_disclosure', 'questioning', 'reappraisal', 'empowerment']
NUM_TACTICS = len(TACTIC_NAMES)
def compute_kl_divergence(hist_counts: Dict[str, int], curr_counts: Dict[str, int], alpha: float=0.1) -> float:
"""KL(Q_current || P_history) with Laplace smoothing."""
if not curr_counts:
return 0.0
total_hist = sum(hist_counts.values()) + NUM_TACTICS * alpha
total_curr = sum(curr_counts.values()) + NUM_TACTICS * alpha
kl = 0.0
for tactic in TACTIC_NAMES:
p_h = (hist_counts.get(tactic, 0) + alpha) / total_hist
q_c = (curr_counts.get(tactic, 0) + alpha) / total_curr
kl += q_c * math.log(q_c / p_h)
return min(kl, 5.0)
# Construct valid arguments for compute_kl_divergence
hist_counts = {
'information': 5,
'assistance': 3,
'advice': 2,
'validation': 4,
'emotional_expression': 1,
'paraphrasing': 2,
'self_disclosure': 1,
'questioning': 3,
'reappraisal': 2,
'empowerment': 1
}
curr_counts = {
'information': 3,
'assistance': 2,
'advice': 4,
'validation': 2,
'emotional_expression': 2,
'paraphrasing': 1,
'self_disclosure': 2,
'questioning': 2,
'reappraisal': 1,
'empowerment': 3
}
alpha = 0.1
ARGS = {
'hist_counts': hist_counts,
'curr_counts': curr_counts,
'alpha': alpha
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| compute_trigram_surprisal |
Ran ran, honoured the contract we drafted |
honglizhan/mint-empathy/training/reward_verl.py code served (permissive licence) · get_code("aba6dbadb7daa2a2") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import math
from typing import Dict, List, Set
TACTIC_NAMES = ['information', 'assistance', 'advice', 'validation', 'emotional_expression', 'paraphrasing', 'self_disclosure', 'questioning', 'reappraisal', 'empowerment']
NUM_TACTICS = len(TACTIC_NAMES)
# Construct hist_trigrams: Dict[str, Dict[str, Dict[str, int]]]
# This is a nested dict mapping (tactic_a, tactic_b) -> {tactic_c: count}
hist_trigrams = {
'information': {
'assistance': {
'advice': 5,
'validation': 3,
'emotional_expression': 2,
},
'advice': {
'information': 4,
'paraphrasing': 2,
},
},
'assistance': {
'validation': {
'information': 6,
'emotional_expression': 1,
'paraphrasing': 3,
},
'emotional_expression': {
'advice': 2,
'questioning': 4,
},
},
'advice': {
'information': {
'assistance': 5,
'validation': 2,
},
'paraphrasing': {
'emotional_expression': 3,
'self_disclosure': 1,
},
},
'validation': {
'questioning': {
'reappraisal': 4,
'empowerment': 2,
},
'emotional_expression': {
'information': 3,
},
},
}
# Construct sentence_tactics: List[Set[str]]
# Each element is a set of tactics present in that sentence
sentence_tactics = [
{'information', 'assistance'},
{'advice', 'validation'},
{'emotional_expression', 'paraphrasing'},
{'questioning', 'reappraisal'},
{'empowerment', 'self_disclosure'},
]
# Alpha parameter for smoothing
alpha = 0.1
ARGS = {
'hist_trigrams': hist_trigrams,
'sentence_tactics': sentence_tactics,
'alpha': alpha,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| compute_within_turn_entropy |
Ran ran, honoured the contract we drafted |
honglizhan/mint-empathy/training/reward_verl.py code served (permissive licence) · get_code("83c9826e49a70565") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import math
from typing import Dict, List, Set, Tuple
ARGS = {
"curr_counts": {
"tactic_a": 5,
"tactic_b": 3,
"tactic_c": 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 float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| extract_response_from_thinking_model |
Ran ran; our contract draft was wrong, not the code |
honglizhan/mint-empathy/training/reward_verl.py code served (permissive licence) · get_code("af7531a5662bd749") 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 extract_response_from_thinking_model(text: str) -> str:
"""Strip `<think>...</think>` reasoning blocks and return visible response."""
cleaned = re.sub('<think>.*?</think>\\s*', '', text, flags=re.DOTALL).strip()
return cleaned if cleaned else text.strip()
ARGS = {
"text": "This is a preamble. <think>Here is my reasoning process about the problem.</think> This is my final 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 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
|
| load_tactic_info |
Ran ran; our contract draft was wrong, not the code |
honglizhan/mint-empathy/training/reward_verl.py code served (permissive licence) · get_code("6a936ff431d01d74") 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 tempfile
from typing import Dict
# Create a temporary directory with tactic prompt files
temp_dir = tempfile.mkdtemp()
# Define sample prompt content for each tactic
TACTIC_NAMES = ['information', 'assistance', 'advice', 'validation', 'emotional_expression', 'paraphrasing', 'self_disclosure', 'questioning', 'reappraisal', 'empowerment']
prompt_contents = {
'information': 'This prompt contains "Information" and is used for tagging information-providing responses.',
'assistance': 'This prompt contains "Assistance" and is used for tagging assistance-providing responses.',
'advice': 'This prompt contains "Advice" and is used for tagging advice-giving responses.',
'validation': 'This prompt contains "Validation" and is used for tagging validation responses.',
'emotional_expression': 'This prompt contains "Emotional Expression" and is used for tagging emotional expression responses.',
'paraphrasing': 'This prompt contains "Paraphrasing" and is used for tagging paraphrasing responses.',
'self_disclosure': 'This prompt contains "Self Disclosure" and is used for tagging self disclosure responses.',
'questioning': 'This prompt contains "Questioning" and is used for tagging questioning responses.',
'reappraisal': 'This prompt contains "Reappraisal" and is used for tagging reappraisal responses.',
'empowerment': 'This prompt contains "Empowerment" and is used for tagging empowerment responses.',
}
# Write prompt files to temporary directory
for tactic, content in prompt_contents.items():
prompt_path = os.path.join(temp_dir, f'{tactic}.txt')
with open(prompt_path, 'w') as f:
f.write(content)
ARGS = {
'prompts_dir': temp_dir
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- termcolor — 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
|
| parse_tactic_score |
Ran ran, honoured the contract we drafted |
honglizhan/mint-empathy/training/reward_verl.py code served (permissive licence) · get_code("e80c42125a18f40d") 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 parse_tactic_score(output_text: str) -> int:
"""Parse `<score>X</score>` from tagger output."""
match = re.search('<score>(\\d+)</score>', output_text)
if match:
return int(match.group(1))
return 0
# Test case 1: Valid score tag
ARGS = {
"output_text": "<score>42</score>"
}
- 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
|
| _buffer_sample |
Not yet run unverified (harvested, no recorded run) |
honglizhan/mint-empathy/training/reward_verl.py code served (permissive licence) · get_code("6821962a567e69d4") How it ran |
| _compute_score_async |
Not yet run unverified (harvested, no recorded run) |
honglizhan/mint-empathy/training/reward_verl.py code served (permissive licence) · get_code("cfb0e8aae8b7fa2f") How it ran |
| _compute_single_raw |
Not yet run unverified (harvested, no recorded run) |
honglizhan/mint-empathy/training/reward_verl.py code served (permissive licence) · get_code("e4d610123b39da34") How it ran |
| _flush_jsonl |
Not yet run unverified (harvested, no recorded run) |
honglizhan/mint-empathy/training/reward_verl.py code served (permissive licence) · get_code("924ea3d3428a1555") How it ran |
| _get_clients |
Not yet run unverified (harvested, no recorded run) |
honglizhan/mint-empathy/training/reward_verl.py code served (permissive licence) · get_code("001cc4e19fcbd6ae") How it ran |
| _get_tokenizer |
Not yet run unverified (harvested, no recorded run) |
honglizhan/mint-empathy/training/reward_verl.py code served (permissive licence) · get_code("10036d7f1b8ec7eb") How it ran |
| _next_client |
Not yet run unverified (harvested, no recorded run) |
honglizhan/mint-empathy/training/reward_verl.py code served (permissive licence) · get_code("d0d7aa8d378fac79") How it ran |
| compute_score |
Not yet run unverified (harvested, no recorded run) |
honglizhan/mint-empathy/training/reward_verl.py code served (permissive licence) · get_code("4e518f9c54f9f6ce") How it ran |