| clean_pattern_name |
Ran ran; our contract draft was wrong, not the code |
IBM/polysql/src/polysql/evaluation/analysis/insights_parser.py code served (permissive licence) · get_code("63dd6bd59e1246a6") 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 clean_pattern_name(pattern: str) -> str:
"""Remove formatting characters from pattern names."""
pattern = re.sub('\\*\\*', '', pattern)
pattern = re.sub('`', '', pattern)
return pattern.strip()
ARGS = {
"pattern": "**`example_pattern`**"
}
- 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
|
| default_name |
Ran ran; our contract draft was wrong, not the code |
dlt-hub/dlt/dlt/_workspace/run_context.py code served (permissive licence) · get_code("5e0181410a2e77a6") 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 os
ARGS = {
"run_dir": "/tmp/test_run_directory"
}
- 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_db_path |
Ran ran; our contract draft was wrong, not the code |
IBM/polysql/src/polysql/evaluation/analysis/prototype_transpilation.py code served (permissive licence) · get_code("b1b43f323abd05bc") 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 PosixPath. 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.
from pathlib import Path
ARGS = {
"dataset_path": "data/BIRD/dev_20240627",
"db_id": "test_db"
}
- 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 PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath 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_local_profile |
Ran ran, violated the contract we drafted |
dlt-hub/dlt/dlt/_workspace/profile.py code served (permissive licence) · get_code("2b25877faae19694") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
# The function is_local_profile checks if a name is in LOCAL_PROFILES
# It takes a single parameter: name (str)
# The function performs a simple membership check: name in LOCAL_PROFILES
ARGS = {
'name': 'dev'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| load_archer_dataset |
Ran ran; our contract draft was wrong, not the code |
IBM/polysql/src/polysql/utils/data_loaders.py code served (permissive licence) · get_code("7a35ac56f980ed72") 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 json
import tempfile
import os
# Create a temporary directory and a sample Archer dataset JSON file
temp_dir = tempfile.mkdtemp()
dataset_file = os.path.join(temp_dir, "archer_dataset.json")
# Create sample Archer format data
archer_data = [
{
"db_id": "database_1",
"query": "SELECT * FROM users WHERE age > 18",
"question": "Show all users over 18 years old",
"reasoning_type": "comparison",
"commonsense_knowledge": "Adult users are typically over 18"
},
{
"db_id": "database_2",
"query": "SELECT COUNT(*) FROM orders WHERE status = 'completed'",
"question": "How many completed orders are there?",
"reasoning_type": "aggregation",
"commonsense_knowledge": ""
},
{
"db_id": "database_3",
"query": "SELECT name FROM products WHERE price < 100",
"question": "Which products cost less than 100?",
"reasoning_type": "filtering",
"commonsense_knowledge": "Budget products are usually cheaper"
},
{
"db_id": "database_4",
"query": "SELECT id, name FROM customers ORDER BY created_at DESC",
"question": "List customers ordered by creation date",
"reasoning_type": "sorting",
"commonsense_knowledge": ""
}
]
# Write the sample data to the temporary file
with open(dataset_file, 'w') as f:
json.dump(archer_data, f)
# Define ARGS with valid arguments for load_archer_dataset
ARGS = {
"dataset_path": dataset_file,
"sample_size": 2,
"random_state": 0
}
- 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 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
|
| load_bird_dataset |
Ran ran; our contract draft was wrong, not the code |
IBM/polysql/src/polysql/utils/data_loaders.py code served (permissive licence) · get_code("7cda1bfb37d29ceb") 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 json
import os
import tempfile
import pandas as pd
# Create a temporary directory and dataset file
temp_dir = tempfile.mkdtemp()
dev_databases_dir = os.path.join(temp_dir, 'dev_databases')
os.makedirs(dev_databases_dir, exist_ok=True)
# Create sample database directories
for db_id in ['flight', 'hospital']:
db_path = os.path.join(dev_databases_dir, db_id)
os.makedirs(db_path, exist_ok=True)
# Create a dummy SQLite file
sqlite_file = os.path.join(db_path, f'{db_id}.sqlite')
open(sqlite_file, 'w').close()
# Create the BIRD dataset JSON file
dataset_file = os.path.join(temp_dir, 'bird_dataset.json')
bird_data = [
{
"question_id": 1,
"db_id": "flight",
"question": "How many flights are there?",
"evidence": "Count all records",
"SQL": "SELECT COUNT(*) FROM flights;",
"difficulty": "simple"
},
{
"question_id": 2,
"db_id": "hospital",
"question": "What is the average patient age?",
"evidence": "",
"SQL": "SELECT AVG(age) FROM patients;",
"difficulty": "moderate"
},
{
"question_id": 3,
"db_id": "flight",
"question": "List all airlines",
"evidence": "Get distinct airlines",
"SQL": "SELECT DISTINCT airline FROM flights;",
"difficulty": "challenging"
}
]
with open(dataset_file, 'w') as f:
json.dump(bird_data, f)
# Define the ARGS dictionary
ARGS = {
'dataset_path': dataset_file,
'sample_size': 2,
'random_state': 0
}
- 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 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
|
| load_bird_minidev_native |
Ran ran; our contract draft was wrong, not the code |
IBM/polysql/src/polysql/utils/data_loaders.py code served (permissive licence) · get_code("1a21a281eb75e727") 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 json
import tempfile
import os
import pandas as pd
# Create a temporary JSON file with sample BIRD MINIDEV data
temp_dir = tempfile.mkdtemp()
dataset_file = os.path.join(temp_dir, "minidev.json")
sample_data = [
{
"db_id": "database_1",
"question_id": 1,
"question": "What is the total number of employees?",
"evidence": "We need to count all employees in the system",
"SQL": "SELECT COUNT(*) FROM employees;"
},
{
"db_id": "database_2",
"question_id": 2,
"question": "List all departments",
"evidence": "",
"SQL": "SELECT * FROM departments;"
},
{
"db_id": "database_3",
"question_id": 3,
"question": "Find employees in sales department",
"evidence": "Sales is one of our main departments",
"SQL": "SELECT * FROM employees WHERE department='sales';"
},
{
"db_id": "database_4",
"question_id": 4,
"question": "What is the average salary?",
"evidence": "We want to know compensation across the company",
"SQL": "SELECT AVG(salary) FROM employees;"
}
]
with open(dataset_file, 'w') as f:
json.dump(sample_data, f)
ARGS = {
"dataset_path": dataset_file,
"sample_size": 2,
"random_state": 0,
"db_type": "mysql"
}
- 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 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
|
| load_csv_results |
Ran ran; our contract draft was wrong, not the code |
IBM/polysql/src/polysql/evaluation/analysis/csv_analysis.py code served (permissive licence) · get_code("4aef8896fddb374d") 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 tempfile
from pathlib import Path
import pandas as pd
# Create a temporary CSV file with sample data
temp_dir = tempfile.TemporaryDirectory()
temp_csv_path = Path(temp_dir.name) / "results.csv"
# Create sample dataframe and save to CSV
sample_data = {
'metric_1': [0.85, 0.92, 0.78],
'metric_2': [100, 120, 95],
'model_name': ['model_a', 'model_b', 'model_c']
}
sample_df = pd.DataFrame(sample_data)
sample_df.to_csv(temp_csv_path, index=False)
ARGS = {
'csv_path': temp_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 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
|
| load_experiment_data |
Ran ran; our contract draft was wrong, not the code |
IBM/polysql/src/polysql/evaluation/analysis/results.py code served (permissive licence) · get_code("9cd2b46f4daf4690") 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 json
import tempfile
from pathlib import Path
import pandas as pd
import os
# Create a temporary directory for experiment data
temp_dir = tempfile.mkdtemp()
exp_dir = Path(temp_dir)
# Create sample JSON experiment files
exp_data_1 = {
"exp_config": {
"dataset_name": "BIRD",
"dataset_path": "/data/bird",
"model_name": "test_model_1",
"gen_type": "few_shot"
},
"predictions": [
{
"question_id": "q1",
"db_id": "db1",
"predicted_sql": "SELECT * FROM table1",
"results_equal": True
},
{
"question_id": "q2",
"db_id": "db1",
"predicted_sql": "SELECT col1 FROM table2",
"results_equal": False
}
]
}
exp_data_2 = {
"exp_config": {
"dataset_name": "BIRD",
"dataset_path": "/data/bird",
"model_name": "test_model_2",
"gen_type": "zero_shot"
},
"predictions": [
{
"question_id": "q3",
"db_id": "db2",
"predicted_sql": "SELECT * FROM table3",
"results_equal": True
}
]
}
# Write experiment JSON files
json_file_1 = exp_dir / "experiment_1.json"
with open(json_file_1, 'w') as f:
json.dump(exp_data_1, f)
json_file_2 = exp_dir / "experiment_2.json"
with open(json_file_2, 'w') as f:
json.dump(exp_data_2, f)
# Create enriched results CSV file
enriched_data = {
"question_id": ["q1", "q2", "q3"],
"db_id": ["db1", "db1", "db2"],
"model_name": ["test_model_1", "test_model_1", "test_model_2"],
"gen_type": ["few_shot", "few_shot", "zero_shot"],
"error_classification": ["correct", "syntax_error", "correct"],
"explanation": ["matches expected", "invalid syntax", "matches expected"],
"sqlite_correct": [True, False, True]
}
enriched_df = pd.DataFrame(enriched_data)
enriched_csv_path = exp_dir / "all_results_enriched.csv"
enriched_df.to_csv(enriched_csv_path, index=False)
ARGS = {
"exp_dir": exp_dir
}
- 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 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
|
| normalize_for_fuzzy_match |
Ran ran; our contract draft was wrong, not the code |
IBM/polysql/src/polysql/evaluation/analysis/transpilation.py code served (permissive licence) · get_code("f35d98ec2223d9f9") 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
ARGS = {
"name": "border_color"
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| normalize_identifier |
Ran ran; our contract draft was wrong, not the code |
IBM/polysql/src/polysql/evaluation/analysis/transpilation.py code served (permissive licence) · get_code("620a0540008901c9") 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 normalize_identifier(name: str) -> str:
"""Normalize identifier to snake_case for matching.
Handles: CamelCase, PascalCase, mixed_Case_Names, and acronyms (CDSCode → cds_code)
"""
name = re.sub('([a-z0-9])([A-Z])', '\\1_\\2', name)
name = re.sub('([A-Z]+)([A-Z][a-z])', '\\1_\\2', name)
return name.lower()
ARGS = {
"name": "CDSCode"
}
- 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
|
| parse_pattern_totals_section |
Ran ran; our contract draft was wrong, not the code |
IBM/polysql/src/polysql/evaluation/analysis/insights_parser.py code served (permissive licence) · get_code("6137f7ccd8e19fba") 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 sample markdown text with a Pattern Totals section
text = """
# Report
## 1. Introduction
Some introduction text here.
## 2. Pattern Totals
| Pattern | Count | Question IDs |
|---------|-------|--------------|
| **Pattern A** | 5 | 1, 2, 3 |
| `Pattern B` | 10 | 4, 5 |
| Pattern C | 7 | – |
| Pattern D | 3 | 6 |
## 3. Conclusion
Some conclusion text here.
"""
ARGS = {
'text': text
}
- 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
|
| parse_summary_section |
Ran ran; our contract draft was wrong, not the code |
IBM/polysql/src/polysql/evaluation/analysis/insights_parser.py code served (permissive licence) · get_code("aea9f446edb7a1d5") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import re
def parse_summary_section(text: str) -> dict:
"""Extract summary statistics from the Summary section (handles multiple formats)."""
summary = {}
for pattern in ['\\*\\*experiment_id\\*\\*', '`experiment_id`']:
match = re.search(f'{pattern}.*?`([^`]+)`', text)
if match:
summary['experiment_id'] = match.group(1)
break
for field in ['total', 'executed', 'correct']:
for pattern in [f'\\*\\*{field}\\*\\*', f'`{field}`']:
match = re.search(f'{pattern}.*?\\|\\s*(\\d+)', text)
if match:
summary[field] = int(match.group(1))
break
for pattern in ['\\*\\*accuracy\\*\\*', '`accuracy`']:
match = re.search(f'{pattern}.*?\\|\\s*([\\d.]+)', text)
if match:
summary['accuracy'] = float(match.group(1))
break
for field in ['model_name', 'model_engine', 'gen_type']:
for pattern in [f'\\*\\*{field}\\*\\*', f'`{field}`']:
match = re.search(f'{pattern}.*?`([^`]+)`', text)
if match:
summary[field] = match.group(1)
break
for pattern in ['\\*\\*instructions_level\\*\\*', '`instructions_level`']:
match = re.search(f'{pattern}.*?\\|\\s*(\\d+)', text)
if match:
summary['instructions_level'] = int(match.group(1))
break
return summary
# Test text with multiple format variations
test_text = """
**experiment_id** | `exp_001`
**total** | 100
**executed** | 95
**correct** | 89
**accuracy** | 0.9368
**model_name** | `gpt-4`
**model_engine** | `openai`
**gen_type** | `completion`
**instructions_level** | 3
"""
ARGS = {
'text': test_text
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| prepare_predictions_from_df |
Ran ran; our contract draft was wrong, not the code |
IBM/polysql/src/polysql/evaluation/analysis/csv_analysis.py code served (permissive licence) · get_code("5859522505d94ecf") 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 pandas as pd
import numpy as np
# Create a sample DataFrame with the required columns
df = pd.DataFrame({
'question': [
'What is the total revenue?',
'How many customers are there?',
'List all orders from 2023'
],
'gold_sql': [
'SELECT SUM(revenue) FROM sales;',
'SELECT COUNT(*) FROM customers;',
'SELECT * FROM orders WHERE year = 2023;'
],
'predicted_sql': [
'SELECT SUM(amount) FROM sales;',
'SELECT COUNT(id) FROM customers;',
'SELECT * FROM orders WHERE YEAR(date) = 2023;'
],
'results_equal': [True, True, False],
'gold_error': [None, None, None],
'pred_error': [None, None, 'Column year does not exist'],
'full_prompt': [
'Prompt for revenue question',
'Prompt for customer count',
'Prompt for orders'
]
})
ARGS = {
'df': df,
'sample_size': None
}
- 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 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
|