| call_gemini |
Ran ran; our contract draft was wrong, not the code |
Faizaniqbal52/PhysicalHazardBenchmark/experiments/eval_pipeline.py code served (permissive licence) · get_code("3abc51f37af33867") 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 os
import json
# Set up a minimal API key for testing (won't actually work without real key)
os.environ['GEMINI_API_KEY'] = 'test-key-12345'
# Define arguments for call_gemini
ARGS = {
'prompt_text': 'What is the capital of France?'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- requests — 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
|
| call_gemini |
Ran ran; our contract draft was wrong, not the code |
Faizaniqbal52/PhysicalHazardBenchmark/experiments/pilot.py code served (permissive licence) · get_code("165c9859eed83909") 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 os
import torch
import torch.nn as nn
# Set random seed for reproducibility
torch.manual_seed(0)
# The function call_gemini takes a single parameter: prompt_text
# which should be a string containing the prompt to send to the Gemini API
ARGS = {
'prompt_text': 'What is the capital of France?'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- requests, 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
|
| cohen_d |
Ran ran, honoured the contract we drafted |
Faizaniqbal52/PhysicalHazardBenchmark/analysis/statistical_analysis.py code served (permissive licence) · get_code("5dcd8627155f799f") 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 float64, ndim 0, 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 numpy as np
# The function cohen_d takes two array-like arguments (a and b)
# It computes len, np.std with ddof=1, and np.mean on each
# So we need two numeric arrays/lists with at least 2 elements
a = np.array([1.0, 2.0, 3.0, 4.0, 5.0])
b = np.array([2.0, 3.0, 4.0, 5.0, 6.0])
ARGS = {
'a': a,
'b': b
}
- 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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_event_tags |
Ran ran; our contract draft was wrong, not the code |
Faizaniqbal52/PhysicalHazardBenchmark/prompts/prompt_formatter.py code served (permissive licence) · get_code("c27f6c287f41a454") 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
# Define the scenario dictionary with various sensor measurements
scenario = {
'co_ppm': 80,
'temperature_c': 50,
'pm25_ugm3': 120,
'vibration_ms2': 1.5,
'voc_ppb': 1500,
'co2_ppm': 2500,
'sound_db': 105
}
ARGS = {
'scenario': scenario
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 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
|
| get_urgency |
Ran ran; our contract draft was wrong, not the code |
Faizaniqbal52/PhysicalHazardBenchmark/prompts/prompt_formatter.py code served (permissive licence) · get_code("33b3011adcbd3c5e") 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)
# The function takes a single parameter 'scenario' which is a dict
# It calls scenario.get('scenario_type', '') to retrieve a scenario type string
# Then it checks if the type matches certain values and returns a string accordingly
ARGS = {
'scenario': {
'scenario_type': 'fire_risk'
}
}
- 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
|
| load_completed |
Ran ran; our contract draft was wrong, not the code |
Faizaniqbal52/PhysicalHazardBenchmark/experiments/eval_pipeline.py code served (permissive licence) · get_code("4c815ccb8c617e26") 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 set. 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 csv
import tempfile
from pathlib import Path
# Create a temporary CSV file with sample data
temp_dir = tempfile.mkdtemp()
temp_csv_path = os.path.join(temp_dir, "completed.csv")
# Write sample CSV data
with open(temp_csv_path, 'w', newline='', encoding='utf-8') as f:
writer = csv.DictWriter(f, fieldnames=['scenario_id', 'condition'])
writer.writeheader()
writer.writerow({'scenario_id': 'scenario_1', 'condition': 'control'})
writer.writerow({'scenario_id': 'scenario_2', 'condition': 'treatment'})
ARGS = {
'path': temp_csv_path
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- requests — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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
|
| normalize |
Ran ran; our contract draft was wrong, not the code |
Faizaniqbal52/PhysicalHazardBenchmark/prompts/prompt_formatter.py code served (permissive licence) · get_code("ae0c0d3814c8c9b3") 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.
# Setup code for normalize function
SAFETY_THRESHOLDS = {'co_ppm': {'name': 'CO', 'safe': 9, 'caution': 35, 'danger': 70, 'unit': 'ppm', 'standard': 'NIOSH IDLH'}, 'co2_ppm': {'name': 'CO₂', 'safe': 700, 'caution': 1000, 'danger': 2000, 'unit': 'ppm', 'standard': 'ASHRAE 62.1'}, 'pm25_ugm3': {'name': 'PM2.5', 'safe': 12, 'caution': 35, 'danger': 55, 'unit': 'µg/m³', 'standard': 'WHO 2021'}, 'voc_ppb': {'name': 'VOC', 'safe': 200, 'caution': 500, 'danger': 1000, 'unit': 'ppb', 'standard': 'ASHRAE 62.1'}, 'temperature_c': {'name': 'Temp', 'safe': 28, 'caution': 35, 'danger': 43, 'unit': '°C', 'standard': 'OSHA heat stress'}, 'humidity_pct': {'name': 'Humidity', 'safe': 60, 'caution': 70, 'danger': 90, 'unit': '%', 'standard': 'ASHRAE 55'}, 'sound_db': {'name': 'Sound', 'safe': 70, 'caution': 85, 'danger': 100, 'unit': 'dB', 'standard': 'OSHA 1910.95'}, 'vibration_ms2': {'name': 'Vibration', 'safe': 0.3, 'caution': 0.5, 'danger': 1.0, 'unit': 'm/s²', 'standard': 'ISO 2631-1'}}
def normalize(key, value):
if key not in SAFETY_THRESHOLDS:
return (None, None)
t = SAFETY_THRESHOLDS[key]
if value <= t['safe']:
level = 'SAFE'
norm = round(value / t['danger'], 3)
elif value <= t['caution']:
level = 'CAUTION'
norm = round(value / t['danger'], 3)
elif value <= t['danger']:
level = 'WARNING'
norm = round(value / t['danger'], 3)
else:
level = 'DANGER'
norm = round(min(value / t['danger'], 3.0), 3)
return (level, norm)
# Test with valid key and value in SAFE range
key_arg = 'co_ppm'
value_arg = 5.0
ARGS = {
'key': key_arg,
'value': value_arg
}
- 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, 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
|
| score_q1 |
Ran ran, honoured the contract we drafted |
Faizaniqbal52/PhysicalHazardBenchmark/scoring/scoring.py code served (permissive licence) · get_code("ff27fc17ad9319ad") 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.
# SETUP CODE
import re
# Analyze what score_q1 expects:
# - response: a string
# - ground_truth: a dict with at least 'hazard_detected' key
# Create valid test arguments
response_text = "The CO2 level reads 5000 ppm, which exceeds the safe threshold of 1000 ppm."
ground_truth_dict = {
'hazard_detected': 1
}
ARGS = {
'response': response_text,
'ground_truth': ground_truth_dict
}
- 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
|
| score_q2 |
Ran ran, honoured the contract we drafted |
Faizaniqbal52/PhysicalHazardBenchmark/scoring/scoring.py code served (permissive licence) · get_code("c8caec20c3739cd5") 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 re
_Q2_UNSAFE = ['\\bno[,\\s]+(?:it\\s+is\\s+)?not\\s+safe\\b', '\\bis\\s+not\\s+safe\\b', '\\bunsafe\\b', '\\bnot\\s+safe\\s+to\\s+(?:remain|stay|be)\\b', '\\bshould\\s+(?:not|immediately)\\s+(?:remain|stay|evacuate|leave)\\b', '\\bimmediate\\s+(?:evacuation|action|danger)\\b', '\\bdo\\s+not\\s+remain\\b', '\\bleave\\s+(?:the\\s+)?(?:area|environment|building|space)\\s+(?:immediately|now|urgently)\\b', '\\bevacuate\\b']
_Q2_SAFE = ['\\byes[,\\s]+(?:it\\s+is\\s+)?safe\\b', '\\bis\\s+(?:currently\\s+)?safe\\b', '\\bappears?\\s+safe\\b', '\\bno\\s+immediate\\s+(?:hazard|danger|threat|risk)\\b', '\\bsafe\\s+to\\s+remain\\b', '\\bno\\s+action\\s+(?:is\\s+)?required\\b', '\\bconditions?\\s+are\\s+(?:within\\s+)?(?:safe|normal|acceptable)\\b']
_Q2_SENSORS = ['\\bcarbon\\s+monoxide\\b', '\\bco\\b(?!\\d)', '\\bco2\\b', '\\bcarbon\\s+dioxide\\b', '\\bpm\\s*2\\.5\\b', '\\bparticulate\\b', '\\bvoc\\b', '\\bvolatile\\s+organic\\b', '\\btemperature\\b', '\\bheat\\b', '\\bhumidity\\b', '\\bsound\\b', '\\bnoise\\b', '\\bvibration\\b', '\\breadings?\\b', '\\bsensors?\\b', '\\bparameters?\\b', '\\blevels?\\b']
def score_q2(response, ground_truth):
text = response.strip()
if not text:
return 0.0
tl = text.lower()
gt_hazard = int(ground_truth.get('hazard_detected', 0))
got_unsafe = any((re.search(p, tl) for p in _Q2_UNSAFE))
got_safe = any((re.search(p, tl) for p in _Q2_SAFE))
got_sensor = any((re.search(p, tl) for p in _Q2_SENSORS))
correct = gt_hazard == 1 and got_unsafe or (gt_hazard == 0 and got_safe)
if correct and got_sensor:
return 1.0
if correct:
return 0.5
return 0.0
ARGS = {
'response': ' The carbon monoxide levels are unsafe. Evacuate immediately. ',
'ground_truth': {'hazard_detected': 1}
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type 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
|
| score_q3 |
Ran ran, honoured the contract we drafted |
Faizaniqbal52/PhysicalHazardBenchmark/scoring/scoring.py code served (permissive licence) · get_code("23d962662f463f20") 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 re
_ACTION_CLASSES = {'evacuate': ['\\bevacuat\\w*\\b', '\\bleave\\s+(?:the\\s+)?(?:area|building|space|room|environment)\\b', '\\bexit\\s+(?:the\\s+)?(?:area|building|space|room|immediately)\\b', '\\bget\\s+out\\b', '\\bvacate\\b', '\\bmove\\s+(?:away|out)\\b', '\\bdo\\s+not\\s+remain\\b'], 'ventilate': ['\\bventilat\\b', '\\bopen\\s+(?:windows?|doors?)\\b', '\\bfresh\\s+air\\b', '\\bincrease\\s+airflow\\b'], 'emergency_services': ['\\b(?:call|contact|alert|notify)\\s+(?:emergency|911|fire\\s+department|ems)\\b', '\\bemergency\\s+services?\\b', '\\b911\\b', '\\bfire\\s+(?:brigade|department|alarm)\\b', '\\bactivate\\s+(?:the\\s+)?(?:fire\\s+)?alarm\\b'], 'cool_environment': ['\\bcool(?:er)?\\s+(?:environment|area|space|location)\\b', '\\bair\\s+conditioning\\b', '\\bshade\\b', '\\bcool\\s+down\\b'], 'hydrate': ['\\bhydrat\\w*\\b', '\\bdrink\\s+(?:water|fluids?)\\b', '\\bfluids?\\b'], 'no_action': ['\\bno\\s+(?:immediate\\s+)?action\\s+(?:required|needed|necessary)\\b', '\\bcontinue\\s+(?:as\\s+normal|normally)\\b', '\\bno\\s+(?:immediate\\s+)?(?:hazard|danger|threat|risk)\\b'], 'report_facilities': ['\\breport\\s+to\\b', '\\bnotif(?:y|ies)\\s+(?:building|facilities|management)\\b', '\\bbuilding\\s+management\\b', '\\bfacilities\\s+management\\b', '\\bfacilities\\s+(?:team|staff|department|dept)\\b', '\\bmaintenance\\b'], 'respiratory_protection': ['\\brespiratory\\s+protection\\b', '\\bmask\\b', '\\bdo\\s+not\\s+re.?enter\\b']}
_GT_REQUIRED = {'Evacuate immediately. Activate fire alarm. Call emergency services.': ['evacuate', 'emergency_services'], 'Evacuate immediately. Ventilate space. Do not re-enter without respiratory protection.': ['evacuate', 'ventilate', 'respiratory_protection'], 'Move to cooler environment. Hydrate. Reduce physical activity. Monitor for heat exhaustion symptoms.': ['cool_environment', 'hydrate'], 'Improve ventilation. Use air purifier if available. Avoid strenuous activity indoors.': ['ventilate'], 'Evacuate building. Do not use elevators. Report structural anomaly to building management.': ['evacuate', 'report_facilities'], 'No action required. Conditions are within safe parameters.': ['no_action'], 'Multiple simultaneous hazards detected. Evacuate immediately. Call emergency services. Do not re-enter.': ['evacuate', 'emergency_services']}
response_text = "Evacuate immediately. Activate fire alarm. Call emergency services."
ground_truth_dict = {'correct_action': 'Evacuate immediately. Activate fire alarm. Call emergency services.'}
ARGS = {
'response': response_text,
'ground_truth': ground_truth_dict
}
- 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
|
| split_prompt_questions |
Ran ran; our contract draft was wrong, not the code |
Faizaniqbal52/PhysicalHazardBenchmark/experiments/eval_pipeline.py code served (permissive licence) · get_code("15b88d1275855eb0") 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 re
# Construct a valid full_prompt string with sensor context and multiple questions
full_prompt = """Sensor readings: Temperature=25C, Humidity=60%, Pressure=1013hPa
Q1. What is the current temperature reading?
Q2. What is the humidity level?
Q3. What is the atmospheric pressure?"""
ARGS = {
'full_prompt': full_prompt
}
- 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
|
| strip_question_prefix |
Ran ran; our contract draft was wrong, not the code |
Faizaniqbal52/PhysicalHazardBenchmark/analysis/score_results.py code served (permissive licence) · get_code("300e96edb82a9549") 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_question_prefix(text, qnum):
"""Remove echoed question text before scoring."""
patterns = [f'Q{qnum}\\.\\s+For each sensor.*?exceeded\\.?\\**\\s*', f'\\*\\*Q{qnum}\\.[^*]+\\*\\*\\s*', f'Q{qnum}\\.\\s+Based on your analysis.*?conclusion\\.\\s*', f'Q{qnum}\\.\\s+What immediate.*?taken\\?\\s*', f'Q{qnum}\\.[^\\n]*\\n']
result = text
for pat in patterns:
result = re.sub(pat, '', result, flags=re.IGNORECASE | re.DOTALL, count=1)
return result.strip() or text
ARGS = {
'text': 'Q1. For each sensor, determine if the threshold exceeded. **Q1. This is a test** Q1. Based on your analysis, state your conclusion. Some answer text here.',
'qnum': 1
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type 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
|