| IsotonicCalibrator |
Ran ran on a synthesized input · constructed an object; no result was computed |
lyrain2001/auto-fill/inference/run_specialists.py code served (permissive licence) · get_code("d6f87d7c42c8c129") 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 an instance of its own class, IsotonicCalibrator: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
from sklearn.isotonic import IsotonicRegression
# Create simple calibration data
# X should be confidence scores (typically between 0 and 1)
# y should be true labels or accuracy indicators (between 0 and 1)
X_data = [0.1, 0.3, 0.5, 0.7, 0.9, 0.2, 0.4, 0.6, 0.8]
y_data = [0.0, 0.2, 0.4, 0.6, 1.0, 0.1, 0.5, 0.7, 0.95]
ARGS = {
"X": X_data,
"y": y_data,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type IsotonicCalibrator — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a IsotonicCalibrator 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
|
| _is_datetime_equal |
Ran ran, violated the contract we drafted |
lyrain2001/auto-fill/inference/run_specialists.py code served (permissive licence) · get_code("e327a54c2b334583") 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 re
from datetime import datetime, timezone
from dateutil.parser import isoparse
_ISO_RE = re.compile('\n^\\d{4}-\\d{2}-\\d{2}\n(?:\n [T ]\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d{1,9})?)?\n (?:Z|[+\\-]\\d{2}:\\d{2})?\n)?\n$\n', re.X)
_TIME_RE = re.compile('^\\d{1,2}:\\d{2}(?::\\d{2}(?:\\.\\d{1,9})?)?$')
_YMD_ALLOW = ['%Y/%m/%d', '%Y/%m/%d %H:%M', '%Y/%m/%d %H:%M:%S', '%Y-%m-%d %H:%M', '%Y-%m-%d %H:%M:%S']
def _parse_dt_strict(s: str):
s = str(s).strip()
if _ISO_RE.match(s):
try:
return isoparse(s)
except Exception:
return None
for fmt in _YMD_ALLOW:
try:
return datetime.strptime(s, fmt)
except ValueError:
pass
return None
def _parse_time_strict(s: str):
s = str(s).strip()
if not _TIME_RE.match(s):
return None
for fmt in ('%H:%M', '%H:%M:%S', '%H:%M:%S.%f'):
try:
return datetime.strptime(s, fmt).time()
except ValueError:
pass
return None
def _is_datetime_equal(a, b) -> bool:
sa, sb = (str(a).strip(), str(b).strip())
da, db = (_parse_dt_strict(sa), _parse_dt_strict(sb))
if da is not None and db is not None:
if da.tzinfo is not None:
da = da.astimezone(timezone.utc)
if db.tzinfo is not None:
db = db.astimezone(timezone.utc)
return da.replace(tzinfo=None) == db.replace(tzinfo=None)
ta, tb = (_parse_time_strict(sa), _parse_time_strict(sb))
if ta is not None and tb is not None:
return ta == tb
return False
ARGS = {
'a': '2023-12-25 10:30:45',
'b': '2023-12-25 10:30:45',
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- dateutil — 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
|
| _is_numeric_equal |
Ran ran, violated the contract we drafted |
lyrain2001/auto-fill/inference/run_specialists.py code served (permissive licence) · get_code("b055f061e25d25f1") 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 decimal import Decimal, InvalidOperation, ROUND_HALF_UP
ARGS = {
"a": 3.14159,
"b": 3.14160,
"decimals": 5,
}
- 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
|
| _is_numlike |
Ran ran, violated the contract we drafted |
lyrain2001/auto-fill/inference/run_specialists.py code served (permissive licence) · get_code("6898237b8a95f0a5") 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 math
import re
from decimal import Decimal, InvalidOperation, ROUND_HALF_UP
_NUMERIC_RE = re.compile('^[+-]?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:[eE][+-]?\\d+)?$')
def _is_numlike(x) -> bool:
if isinstance(x, (int, float)):
return math.isfinite(float(x))
s = str(x).strip()
if not _NUMERIC_RE.match(s):
return False
lo = s.lower()
if lo in {'nan', 'inf', '+inf', '-inf', 'infinity', '+infinity', '-infinity'}:
return False
try:
Decimal(s)
return True
except InvalidOperation:
return False
# Test cases for the function
test_cases = [
42, # int - finite
3.14, # float - finite
"123.45", # string numeric
"1e-5", # scientific notation
"-42.5", # negative
"+99", # positive sign
".5", # decimal starting with dot
"5.", # decimal ending with dot
float('nan'), # NaN - should be rejected
float('inf'), # infinity - should be rejected
"not a number", # invalid string
"", # empty string
" 42 ", # whitespace padded
"-1.5e+3", # negative scientific
]
ARGS = {
'x': 42
}
- 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
|
| _looks_like_nan |
Ran ran, violated the contract we drafted |
lyrain2001/auto-fill/inference/run_specialists.py code served (permissive licence) · get_code("531119ec050dccd6") 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 math
_NAN_TOKENS = {'nan', 'null', ''}
def _looks_like_nan(x) -> bool:
if isinstance(x, float) and math.isnan(x):
return True
return str(x).strip().lower() in _NAN_TOKENS
# Test cases for the function
ARGS = {
'x': float('nan')
}
- 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
|
| _parse_dt_strict |
Ran ran; our contract draft was wrong, not the code |
lyrain2001/auto-fill/inference/run_specialists.py code served (permissive licence) · get_code("b9a1d080d0876b14") 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 datetime. 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
from datetime import datetime, timezone
from dateutil.parser import isoparse
_ISO_RE = re.compile('\n^\\d{4}-\\d{2}-\\d{2}\n(?:\n [T ]\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d{1,9})?)?\n (?:Z|[+\\-]\\d{2}:\\d{2})?\n)?\n$\n', re.X)
_YMD_ALLOW = ['%Y/%m/%d', '%Y/%m/%d %H:%M', '%Y/%m/%d %H:%M:%S', '%Y-%m-%d %H:%M', '%Y-%m-%d %H:%M:%S']
def _parse_dt_strict(s: str):
s = str(s).strip()
if _ISO_RE.match(s):
try:
return isoparse(s)
except Exception:
return None
for fmt in _YMD_ALLOW:
try:
return datetime.strptime(s, fmt)
except ValueError:
pass
return None
ARGS = {
's': '2024-01-15 14:30:45'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- dateutil — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type datetime — a datetime output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a datetime 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_time_strict |
Ran ran; our contract draft was wrong, not the code |
lyrain2001/auto-fill/inference/run_specialists.py code served (permissive licence) · get_code("267691bc3361e4fb") 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 time. 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
from datetime import datetime, timezone
_TIME_RE = re.compile('^\\d{1,2}:\\d{2}(?::\\d{2}(?:\\.\\d{1,9})?)?$')
def _parse_time_strict(s: str):
s = str(s).strip()
if not _TIME_RE.match(s):
return None
for fmt in ('%H:%M', '%H:%M:%S', '%H:%M:%S.%f'):
try:
return datetime.strptime(s, fmt).time()
except ValueError:
pass
return None
ARGS = {
's': '14:30:45.123456'
}
- 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 time — a time output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a time 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
|
| _run_knowledge |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
lyrain2001/auto-fill/inference/run_specialists.py code served (permissive licence) · get_code("5e767453236da0c5") 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 torch
from typing import Dict, Any
# Mock the vllm_engine module
class MockVLLMEngine:
def __init__(self):
self.model_name = "mock_model"
def mock_load_vllm_engine(model_path: str) -> MockVLLMEngine:
return MockVLLMEngine()
def mock_query_vllm_batch(engine, prompts, temperature=0.1, max_tokens=4096, use_conf=False, enable_logprobs=True):
# Return a list with one result dict for each prompt
return [
{
'value': 'test_value',
'confidence': 0.95,
'thinking': 'This is the raw thinking process.',
'runtime': 1.234,
'prompt_tokens': 50,
'completion_tokens': 100
}
]
def mock_build_prompt_knowledge(table_md: str) -> str:
return f"Knowledge prompt for:\n{table_md}"
# Patch the imports
import sys
from unittest.mock import MagicMock
autofill_mock = MagicMock()
autofill_mock.models.vllm_engine.load_vllm_engine = mock_load_vllm_engine
autofill_mock.models.vllm_engine.query_vllm_batch = mock_query_vllm_batch
autofill_mock.utils.prompts.build_prompt_knowledge = mock_build_prompt_knowledge
sys.modules['autofill'] = autofill_mock
sys.modules['autofill.models'] = autofill_mock.models
sys.modules['autofill.models.vllm_engine'] = autofill_mock.models.vllm_engine
sys.modules['autofill.utils'] = autofill_mock.utils
sys.modules['autofill.utils.prompts'] = autofill_mock.utils.prompts
ARGS = {
'model_path': '/tmp/mock_model',
'table_md': '| Column1 | Column2 |\n|---------|----------|\n| Value1 | Value2 |',
'gpu_id': '0'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- autofill, 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
|
| _run_reasoning |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
lyrain2001/auto-fill/inference/run_specialists.py code served (permissive licence) · get_code("67629bd7d40e3141") 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 numpy as np
from unittest.mock import Mock, MagicMock, patch
import sys
torch.manual_seed(0)
# Mock the vllm_engine module since we can't actually load it
class MockVLLMEngine:
def __init__(self):
self.model_path = None
def mock_load_vllm_engine(model_path):
engine = MockVLLMEngine()
engine.model_path = model_path
return engine
def mock_query_vllm_batch(engine, prompts, temperature=0.8, max_tokens=32768, use_conf=True):
# Return a list with one result dict matching what the function expects
result = {
'value': 'test_value',
'confidence': 0.95,
'thinking': 'This is the reasoning process',
'runtime': 1.234,
'prompt_tokens': 128,
'completion_tokens': 256
}
return [result]
def mock_build_prompt_reasoning(table_md):
return f"Reasoning prompt for: {table_md}"
# Patch the imports in the function's module
sys.modules['autofill'] = MagicMock()
sys.modules['autofill.models'] = MagicMock()
sys.modules['autofill.models.vllm_engine'] = MagicMock()
sys.modules['autofill.utils'] = MagicMock()
sys.modules['autofill.utils.prompts'] = MagicMock()
sys.modules['autofill.models.vllm_engine'].load_vllm_engine = mock_load_vllm_engine
sys.modules['autofill.models.vllm_engine'].query_vllm_batch = mock_query_vllm_batch
sys.modules['autofill.utils.prompts'].build_prompt_reasoning = mock_build_prompt_reasoning
ARGS = {
'model_path': '/path/to/mock/model',
'table_md': '| Column A | Column B |\n|----------|----------|\n| Value 1 | Value 2 |',
'gpu_id': '0'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- autofill, numpy, 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
|
| apply_calibrator_scalar |
Ran ran, honoured the contract we drafted |
lyrain2001/auto-fill/inference/run_specialists.py code served (permissive licence) · get_code("7471cc2636adbd7c") 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 numpy as np
from sklearn.isotonic import IsotonicRegression
class IsotonicCalibrator:
"""Wrapper around sklearn IsotonicRegression, loadable from saved X, y (e.g. calibrators.json)."""
def __init__(self, X, y):
self._iso = IsotonicRegression(y_min=0.0, y_max=1.0, out_of_bounds='clip')
self._iso.fit(np.array(X), np.array(y))
def predict(self, conf):
return float(self._iso.predict([[conf]])[0])
@property
def regressor(self):
"""The underlying sklearn IsotonicRegression (for batch prediction with apply_calibrator)."""
return self._iso
def apply_calibrator_scalar(conf, calibrator, specialist):
"""
Apply calibrator to a single confidence.
Reasoning specialist raw confidence is 0–100; scaled to [0,1] before calibration.
Returns calibrated confidence in [0,1], or raw (clipped) if no calibrator.
"""
if specialist == 'reasoning':
conf = conf / 100.0
conf = max(0.0, min(1.0, float(conf)))
if calibrator is not None:
return calibrator.predict(conf)
return conf
# Create a calibrator by fitting on some sample data
X_train = [0.1, 0.3, 0.5, 0.7, 0.9]
y_train = [0.05, 0.25, 0.55, 0.75, 0.95]
calibrator = IsotonicCalibrator(X_train, y_train)
# Build ARGS dictionary with all parameters
ARGS = {
'conf': 45.0,
'calibrator': calibrator,
'specialist': 'reasoning'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, sklearn — 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
|
| clean_df |
Ran ran; our contract draft was wrong, not the code |
lyrain2001/auto-fill/inference/run_specialists.py code served (permissive licence) · get_code("2fa73afd403c81c6") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned DataFrame. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import pandas as pd
import numpy as np
# Create a sample DataFrame with various data types and missing markers
df = pd.DataFrame({
'col1': ['1', '2', '[MISSING]', '4'],
'col2': ['5.5', '6.5', 'MISSING', '8.5'],
'col3': [' text ', ' more ', '', ' '],
'col4': [1, 2, 3, 4],
' col5 ': ['9', '10', '11', '12']
})
ARGS = {
'df': df
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| coerce_numeric |
Ran ran, honoured the contract we drafted |
lyrain2001/auto-fill/inference/run_specialists.py code served (permissive licence) · get_code("c87169896bac662d") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Series. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import math
import re
import pandas as pd
import numpy as np
ARGS = {
"series": pd.Series([
1,
2.5,
"3.14",
"4e10",
None,
"not_a_number",
True,
np.int32(42),
np.float64(3.14),
" -5.2 ",
"4e23458544504994",
"inf",
"-inf"
])
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Series — a Series output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Series output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| csv_to_markdown |
Ran ran; our contract draft was wrong, not the code |
lyrain2001/auto-fill/inference/run_specialists.py code served (permissive licence) · get_code("35d79f4bcc9d3b74") 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 tempfile
from pathlib import Path
import pandas as pd
# Create a temporary CSV file for testing
with tempfile.NamedTemporaryFile(mode='w', suffix='.csv', delete=False) as f:
csv_path = Path(f.name)
f.write("Name,Age,City\n")
f.write("Alice,30,New York\n")
f.write("Bob,25,Los Angeles\n")
f.write("Charlie,35,Chicago\n")
ARGS = {
"csv_path": csv_path
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- pandas — 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
|
| ensemble_predictions |
Ran ran; our contract draft was wrong, not the code |
lyrain2001/auto-fill/inference/run_specialists.py code served (permissive licence) · get_code("8f953b08aac40684") 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 numpy as np
ARGS = {
'predictions': [
('42.5', 0.95, 'model_a'),
('42.50', 0.87, 'model_b'),
('100', 0.92, 'model_c'),
('100.0', 0.88, 'model_d'),
],
'vote': True,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- dateutil, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| is_correct |
Ran ran, violated the contract we drafted |
lyrain2001/auto-fill/inference/run_specialists.py code served (permissive licence) · get_code("0f5bade67326da22") 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 math
import re
from datetime import datetime, timezone
from decimal import Decimal, InvalidOperation, ROUND_HALF_UP
from dateutil.parser import isoparse
_ISO_RE = re.compile('\n^\\d{4}-\\d{2}-\\d{2}\n(?:\n [T ]\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d{1,9})?)?\n (?:Z|[+\\-]\\d{2}:\\d{2})?\n)?\n$\n', re.X)
_NAN_TOKENS = {'nan', 'null', ''}
_NUMERIC_RE = re.compile('^[+-]?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:[eE][+-]?\\d+)?$')
_TIME_RE = re.compile('^\\d{1,2}:\\d{2}(?::\\d{2}(?:\\.\\d{1,9})?)?$')
_YMD_ALLOW = ['%Y/%m/%d', '%Y/%m/%d %H:%M', '%Y/%m/%d %H:%M:%S', '%Y-%m-%d %H:%M', '%Y-%m-%d %H:%M:%S']
def _is_datetime_equal(a, b) -> bool:
sa, sb = (str(a).strip(), str(b).strip())
da, db = (_parse_dt_strict(sa), _parse_dt_strict(sb))
if da is not None and db is not None:
if da.tzinfo is not None:
da = da.astimezone(timezone.utc)
if db.tzinfo is not None:
db = db.astimezone(timezone.utc)
return da.replace(tzinfo=None) == db.replace(tzinfo=None)
ta, tb = (_parse_time_strict(sa), _parse_time_strict(sb))
if ta is not None and tb is not None:
return ta == tb
return False
def _is_numeric_equal(a, b, decimals: int=5) -> bool:
try:
da, db = (Decimal(str(a).strip()), Decimal(str(b).strip()))
if da == db:
return True
step = Decimal('1').scaleb(-decimals)
return da.quantize(step, ROUND_HALF_UP) == db.quantize(step, ROUND_HALF_UP)
except InvalidOperation:
return False
def _is_numlike(x) -> bool:
if isinstance(x, (int, float)):
return math.isfinite(float(x))
s = str(x).strip()
if not _NUMERIC_RE.match(s):
return False
lo = s.lower()
if lo in {'nan', 'inf', '+inf', '-inf', 'infinity', '+infinity', '-infinity'}:
return False
try:
Decimal(s)
return True
except InvalidOperation:
return False
def _looks_like_nan(x) -> bool:
if isinstance(x, float) and math.isnan(x):
return True
return str(x).strip().lower() in _NAN_TOKENS
def _parse_dt_strict(s: str):
s = str(s).strip()
if _ISO_RE.match(s):
try:
return isoparse(s)
except Exception:
return None
for fmt in _YMD_ALLOW:
try:
return datetime.strptime(s, fmt)
except ValueError:
pass
return None
def _parse_time_strict(s: str):
s = str(s).strip()
if not _TIME_RE.match(s):
return None
for fmt in ('%H:%M', '%H:%M:%S', '%H:%M:%S.%f'):
try:
return datetime.strptime(s, fmt).time()
except ValueError:
pass
return None
def is_correct(pred, gt, decimals: int=5) -> bool:
"""
Determine whether a predicted cell value matches the ground truth.
Handles numeric equality (with rounding), datetime/time-string comparison,
and case-insensitive string comparison. NaN values on both sides are
considered equal.
"""
if _looks_like_nan(pred) and _looks_like_nan(gt) and (pred is not None):
return True
if _is_numlike(pred) and _is_numlike(gt):
if _is_numeric_equal(pred, gt, decimals):
return True
return False
if _is_datetime_equal(pred, gt):
return True
return str(pred).strip().lower() == str(gt).strip().lower()
ARGS = {
"pred": "42.12345",
"gt": "42.12346",
"decimals": 4
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- dateutil — 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
|
| locate_missing |
Ran ran, honoured the contract we drafted |
lyrain2001/auto-fill/inference/run_specialists.py code served (permissive licence) · get_code("57fe3487df770bb6") 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 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 pandas as pd
import numpy as np
# Create a DataFrame with a missing marker in it
df = pd.DataFrame({
'col1': [1.0, 2.0, 3.0],
'col2': [4.0, '[MISSING]', 6.0],
'col3': [7.0, 8.0, 9.0]
})
ARGS = {
'df': df
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple, ndim 1, dtype family int — 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
|
| parse_code_reply |
Ran ran; our contract draft was wrong, not the code |
lyrain2001/auto-fill/inference/run_specialists.py code served (permissive licence) · get_code("2fdd9ec170b207d6") 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 json
import re
# Analyze parse_code_reply function:
# - raw_reply: str parameter
# - Function uses: re.sub(), re.search(), json.loads()
# - Expects raw_reply to potentially contain <think>...</think> blocks
# - Expects JSON object with 'code' field after thinking block
ARGS = {
"raw_reply": '<think>Let me solve this</think>\n{"code": "print(\'hello world\')", "other_field": "value"}'
}
- 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
|
| _run_coding |
Not yet run unverified (harvested, no recorded run) |
lyrain2001/auto-fill/inference/run_specialists.py code served (permissive licence) · get_code("396346e56cf2d0c0") How it ran |
| ensemble_specialist_outputs |
Not yet run unverified (harvested, no recorded run) |
lyrain2001/auto-fill/inference/run_specialists.py code served (permissive licence) · get_code("10d03d4fb3bda006") How it ran |
| execute_code |
Not yet run unverified (harvested, no recorded run) |
lyrain2001/auto-fill/inference/run_specialists.py code served (permissive licence) · get_code("c21b4338fc97b984") How it ran |
| run_all_specialists |
Not yet run unverified (harvested, no recorded run) |
lyrain2001/auto-fill/inference/run_specialists.py code served (permissive licence) · get_code("8f6ba9a8edf9d3b9") How it ran |
| run_code_on_table |
Not yet run unverified (harvested, no recorded run) |
lyrain2001/auto-fill/inference/run_specialists.py code served (permissive licence) · get_code("db072a2540b1b619") How it ran |