| aggregate_metrics |
Ran ran; our contract draft was wrong, not the code |
genwro-ai/V4FinBench/src/v4finbench/evaluation/results.py code served (permissive licence) · get_code("096f3c88d898b899") 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 metrics DataFrame with various metric columns and grouping columns
np.random.seed(0)
metrics_data = {
'model': ['model_a', 'model_a', 'model_a', 'model_b', 'model_b', 'model_b'],
'horizon': [1, 1, 2, 1, 1, 2],
'fold': [0, 1, 0, 0, 1, 0],
'accuracy': [0.92, 0.89, 0.91, 0.88, 0.90, 0.87],
'precision': [0.85, 0.82, 0.84, 0.80, 0.83, 0.79],
'recall': [0.88, 0.86, 0.87, 0.84, 0.87, 0.83],
'f1': [0.86, 0.84, 0.85, 0.82, 0.85, 0.81],
'roc_auc': [0.94, 0.91, 0.93, 0.90, 0.92, 0.89],
'average_precision': [0.91, 0.88, 0.90, 0.87, 0.89, 0.86],
}
metrics_df = pd.DataFrame(metrics_data)
ARGS = {
'metrics': metrics_df,
'group_columns': None,
'metric_columns': 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 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
|
| aggregate_metrics_file |
Ran ran; our contract draft was wrong, not the code |
genwro-ai/V4FinBench/src/v4finbench/evaluation/results.py code served (permissive licence) · get_code("5fe170dd2c0ca69f") 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 tempfile
from pathlib import Path
# Create a temporary directory for output
temp_dir = tempfile.mkdtemp()
# Create a sample metrics DataFrame with the expected columns
metrics_data = {
'model': ['model_a', 'model_a', 'model_b', 'model_b'],
'horizon': [1, 1, 1, 1],
'fold': [1, 2, 1, 2],
'accuracy': [0.85, 0.87, 0.82, 0.84],
'precision': [0.88, 0.89, 0.81, 0.83],
'recall': [0.82, 0.85, 0.80, 0.82],
'f1': [0.85, 0.87, 0.805, 0.825],
'roc_auc': [0.91, 0.93, 0.89, 0.90],
'average_precision': [0.90, 0.92, 0.88, 0.89],
}
metrics_df = pd.DataFrame(metrics_data)
# Write the metrics DataFrame to a temporary CSV file
input_csv_path = Path(temp_dir) / 'metrics_input.csv'
metrics_df.to_csv(input_csv_path, index=False)
# Define output path
output_csv_path = Path(temp_dir) / 'metrics_output.csv'
# Define ARGS dictionary with all parameters for aggregate_metrics_file
ARGS = {
'input_path': str(input_csv_path),
'output_path': str(output_csv_path),
'group_columns': None,
'metric_columns': None,
}
- 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
|
| binary_classification_metrics |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
genwro-ai/V4FinBench/src/v4finbench/evaluation/metrics.py code served (permissive licence) · get_code("ddf928a34f2d6803") 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 numpy as np
# Set random seed for reproducibility
np.random.seed(0)
# Create sample data for binary classification
# y_true: binary labels (0 or 1)
y_true = np.array([0, 1, 1, 0, 1, 0, 1, 1])
# y_score: predicted probabilities or scores (should be between 0 and 1)
y_score = np.array([0.1, 0.9, 0.8, 0.2, 0.7, 0.3, 0.6, 0.95])
# threshold: classification threshold
threshold = 0.5
ARGS = {
'y_true': y_true,
'y_score': y_score,
'threshold': threshold
}
- 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 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
|
| closest_points_to_centers |
Ran ran, honoured the contract we drafted |
genwro-ai/V4FinBench/src/v4finbench/sampling/prototypes.py code served (permissive licence) · get_code("650b2e0f82d5f934") 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 ndarray, ndim 2, dtype family float, shape (2, 4) 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
# Construct small test data
# X: array of points with shape (n_points, n_features)
# centers: array of center points with shape (n_centers, n_features)
X = np.array([
[0.0, 0.0, 1.0, 2.0],
[1.0, 1.0, 1.0, 2.0],
[5.0, 5.0, 5.0, 5.0],
[6.0, 6.0, 6.0, 6.0],
], dtype=np.float64)
centers = np.array([
[0.5, 0.5, 1.0, 2.0],
[5.5, 5.5, 5.5, 5.5],
], dtype=np.float64)
ARGS = {
"X": X,
"centers": centers,
}
- 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 ndarray, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) 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
|
| collect_best_epoch_files |
Ran ran; our contract draft was wrong, not the code |
genwro-ai/V4FinBench/src/v4finbench/evaluation/results.py code served (permissive licence) · get_code("a9cbb2a670b62fcc") 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
import json
from pathlib import Path
import pandas as pd
# Create a temporary directory structure with best_epoch.json files
temp_dir = tempfile.mkdtemp()
root_path = Path(temp_dir)
# Create the directory structure h*/fold_*/
for h_idx in range(2):
h_dir = root_path / f"h{h_idx}"
h_dir.mkdir(exist_ok=True)
for fold_idx in range(2):
fold_dir = h_dir / f"fold_{fold_idx}"
fold_dir.mkdir(exist_ok=True)
# Create a best_epoch.json file
epoch_data = {
"epoch": fold_idx + 1,
"loss": 0.5 + fold_idx * 0.1,
"accuracy": 0.9 - fold_idx * 0.05,
"validation_loss": 0.6 + fold_idx * 0.1
}
best_epoch_file = fold_dir / "best_epoch.json"
with open(best_epoch_file, 'w', encoding='utf-8') as f:
json.dump(epoch_data, f)
ARGS = {
"root": temp_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
|
| create_llama_train_test_splits |
Ran ran; our contract draft was wrong, not the code |
genwro-ai/V4FinBench/src/v4finbench/llama/sampling.py code served (permissive licence) · get_code("4896721a3d17e723") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import pandas as pd
import numpy as np
from dataclasses import dataclass
@dataclass(frozen=True)
class LlamaSplitConfig:
train_size: int = 20000
test_size: int = 100000
min_positive_ratio_train: float = 0.1
min_positive_ratio_test: float = 0.1
seed: int = 42
target_col: str = 'main_label'
deduplicate_cols: tuple[str, ...] = ('company', 'year')
# Create a sample DataFrame with the required columns
np.random.seed(42)
n_rows = 150000
df = pd.DataFrame({
'company': np.random.choice(['CompanyA', 'CompanyB', 'CompanyC'], n_rows),
'year': np.random.choice([2020, 2021, 2022, 2023], n_rows),
'main_label': np.random.choice([0, 1], n_rows, p=[0.85, 0.15]),
'feature1': np.random.randn(n_rows),
'feature2': np.random.randn(n_rows),
})
config = LlamaSplitConfig(
train_size=20000,
test_size=100000,
min_positive_ratio_train=0.1,
min_positive_ratio_test=0.1,
seed=42,
target_col='main_label',
deduplicate_cols=('company', 'year')
)
ARGS = {
'df': df,
'config': config
}
- 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 — a tuple output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| create_prototypes |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
genwro-ai/V4FinBench/src/v4finbench/sampling/prototypes.py code served (permissive licence) · get_code("682c1fcc4724b46c") 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 ndarray, ndim 2, dtype family float, shape (3, 4) 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
# Create small sample data
np.random.seed(42)
X = np.random.randn(10, 4).astype(np.float64) # 10 samples, 4 features
n_prototypes = 3
random_state = 42
use_mini_batch = True
ARGS = {
'X': X,
'n_prototypes': n_prototypes,
'random_state': random_state,
'use_mini_batch': use_mini_batch
}
- 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 ndarray, ndim 2, dtype family float, shape (3, 4) — shape (3, 4) as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| extract_yes_no |
Ran ran; our contract draft was wrong, not the code |
genwro-ai/V4FinBench/src/v4finbench/llama/inference.py code served (permissive licence) · get_code("06b7e6ed36a9edd0") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
torch.manual_seed(0)
ARGS = {
'text': 'The answer is YES and NO, but YES comes first.'
}
- 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
|
| find_best_f1_threshold |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
genwro-ai/V4FinBench/src/v4finbench/evaluation/thresholds.py code served (permissive licence) · get_code("73b632c5e68f5f05") 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
# Set random seed for reproducibility
np.random.seed(0)
# Create sample data for binary classification
# y_true: binary labels (0 or 1)
# y_score: predicted probabilities for the positive class
y_true = np.array([0, 1, 1, 0, 1, 0, 1, 1])
y_score = np.array([0.1, 0.9, 0.8, 0.2, 0.7, 0.3, 0.85, 0.95])
ARGS = {
"y_true": y_true,
"y_score": y_score,
}
- 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
|
| finetune_config_from_mapping |
Ran ran; our contract draft was wrong, not the code |
genwro-ai/V4FinBench/src/v4finbench/models/tabpfn_finetune.py code served (permissive licence) · get_code("1ed23c7ecdca7696") 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 TabPFNFinetuneConfig. 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 dataclasses import dataclass
from typing import Any
# The function finetune_config_from_mapping takes a single parameter: values (dict)
# We need to construct a dict that will be passed to it
# Based on the function body, it accesses keys like:
# - 'finetuning' (dict with 'epochs', 'learning_rate', 'batch_size', 'meta_batch_size')
# - 'sampling_strategy'
# - 'n_inference_context_samples' / 'n_context_samples'
# - 'max_train_samples'
# - 'max_eval_samples'
# - 'minority_to_majority_ratio'
# - 'random_seed' / 'random_state'
# - 'device'
# - 'model_path'
# - 'epochs'
# - 'learning_rate'
# - 'batch_size'
# - 'meta_batch_size'
# - 'loss_function'
# - 'focal_alpha'
# - 'focal_gamma'
# - 'save_checkpoints'
values_dict = {
'finetuning': {
'epochs': 5,
'learning_rate': 1e-5,
'batch_size': 512,
'meta_batch_size': 2,
},
'sampling_strategy': 'prototype_undersampling',
'n_inference_context_samples': 5000,
'n_context_samples': 5000,
'max_train_samples': 1000,
'max_eval_samples': 500,
'minority_to_majority_ratio': 0.4,
'random_seed': 42,
'random_state': 42,
'device': 'cpu',
'model_path': None,
'epochs': 10,
'learning_rate': 5e-6,
'batch_size': 1024,
'meta_batch_size': 1,
'loss_function': 'focal_loss',
'focal_alpha': 0.3,
'focal_gamma': 2.5,
'save_checkpoints': True,
}
ARGS = {
'values': values_dict,
}
- 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 TabPFNFinetuneConfig — a TabPFNFinetuneConfig output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a TabPFNFinetuneConfig 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
|
| iter_param_candidates |
Ran ran; our contract draft was wrong, not the code |
genwro-ai/V4FinBench/src/v4finbench/models/baselines.py code served (permissive licence) · get_code("3ed700e545db6b5b") 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
import numpy as np
from collections.abc import Iterable
from typing import Any
from sklearn.model_selection import ParameterGrid, ParameterSampler
torch.manual_seed(0)
# Construct param_grid with mixed value types
param_grid = {
"learning_rate": [0.001, 0.01, 0.1],
"batch_size": 32,
"hidden_units": [64, 128],
"dropout": 0.5,
"optimizer": ["adam", "sgd"],
}
# Set other parameters
max_candidates = 5
random_state = 42
ARGS = {
"param_grid": param_grid,
"max_candidates": max_candidates,
"random_state": random_state,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, sklearn, 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
|
| labels_from_predictions |
Ran ran; our contract draft was wrong, not the code |
genwro-ai/V4FinBench/src/v4finbench/llama/metrics.py code served (permissive licence) · get_code("91cbe00e646e7e95") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
import pandas as pd
# Create a sample DataFrame with the required columns
df = pd.DataFrame({
'assistant': ['YES', 'NO', 'yes', 'NO', 'INVALID', '1'],
'prediction': ['YES', 'NO', 'NO', 'YES', 'YES', 'NO'],
'main_label': [1, 0, 1, 0, np.nan, 1]
})
ARGS = {
'df': df,
'label_col': 'assistant',
'prediction_col': 'prediction'
}
- 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 — a tuple output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| normalize_param_grid |
Ran ran; our contract draft was wrong, not the code |
genwro-ai/V4FinBench/src/v4finbench/models/baselines.py code served (permissive licence) · get_code("5e993c6b3b9fab7d") 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
torch.manual_seed(0)
# Build a param_grid dict with mixed value types
# The function normalizes all values to lists
param_grid = {
"learning_rate": 0.001,
"batch_size": 32,
"hidden_sizes": [64, 128, 256],
"dropout": 0.5,
"activation": ["relu", "tanh"],
"epochs": 100,
"optimizer": "adam",
}
ARGS = {
"param_grid": param_grid,
}
- 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 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
|
| normalize_yes_no_logprobs |
Ran ran, honoured the contract we drafted |
genwro-ai/V4FinBench/src/v4finbench/llama/inference.py code served (permissive licence) · get_code("200dbab01c7804de") 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 math
def normalize_yes_no_logprobs(logp_yes: float, logp_no: float) -> tuple[float, float]:
max_logp = max(logp_yes, logp_no)
yes_exp = math.exp(logp_yes - max_logp)
no_exp = math.exp(logp_no - max_logp)
denom = yes_exp + no_exp
return (yes_exp / denom, no_exp / denom)
ARGS = {
"logp_yes": -0.5,
"logp_no": -2.3,
}
- 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
|
| prepare_source_dataframe |
Ran ran; our contract draft was wrong, not the code |
genwro-ai/V4FinBench/src/v4finbench/llama/sampling.py code served (permissive licence) · get_code("6478b20be7f7a385") 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
# Create a sample DataFrame with the required columns
df = pd.DataFrame({
'company': ['A', 'A', 'B', 'C', 'C'],
'year': [2020, 2020, 2021, 2022, 2022],
'main_label': [0, 1, 1, 0, 1],
'feature1': [1.0, 2.0, 3.0, 4.0, 5.0]
})
ARGS = {
'df': df,
'target_col': 'main_label',
'deduplicate_cols': ('company', 'year')
}
- 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
|
| sample_balanced_split |
Ran ran; our contract draft was wrong, not the code |
genwro-ai/V4FinBench/src/v4finbench/llama/sampling.py code served (permissive licence) · get_code("9eb1372d53f02661") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import pandas as pd
import numpy as np
# Create a sample DataFrame with a binary target column
np.random.seed(42)
n_rows = 100
df = pd.DataFrame({
'main_label': np.random.choice([0, 1], size=n_rows, p=[0.6, 0.4]),
'feature_1': np.random.randn(n_rows),
'feature_2': np.random.randn(n_rows),
'feature_3': np.random.randn(n_rows),
})
ARGS = {
'df': df,
'size': 30,
'min_positive_ratio': 0.4,
'target_col': 'main_label',
'seed': 42,
}
- 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 — a tuple output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| select_context_samples |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
genwro-ai/V4FinBench/src/v4finbench/models/tabpfn.py code served (permissive licence) · get_code("cad4573adbcac42c") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
# Create sample data
np.random.seed(42)
X = np.random.randn(10, 4) # 10 samples, 4 features
y = np.random.randn(10) # 10 target values
ARGS = {
"X": X,
"y": y,
"n_context_samples": 5,
"random_state": 42
}
- 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 tuple — a tuple output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| tabpfn_config_from_mapping |
Ran ran; our contract draft was wrong, not the code |
genwro-ai/V4FinBench/src/v4finbench/models/tabpfn.py code served (permissive licence) · get_code("89953823403f74dc") 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 TabPFNRunConfig. 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 dataclasses import dataclass
from typing import Any
torch.manual_seed(0)
# Minimal setup for the function arguments
ARGS = {
'values': {
'sampling_strategy': 'stratified',
'n_context_samples': 5000,
'max_train_samples': 1000,
'max_eval_samples': 500,
'minority_to_majority_ratio': 0.5,
'random_seed': 123,
'device': 'cpu',
'model_path': '/fake/path/model.pt'
}
}
- 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 TabPFNRunConfig — a TabPFNRunConfig output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a TabPFNRunConfig 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
|
| format_company_data |
Not yet run unverified (harvested, no recorded run) |
genwro-ai/V4FinBench/src/v4finbench/llama/formatting.py code served (permissive licence) · get_code("bc6707e32e57b56c") How it ran |
| format_llama_value |
Not yet run unverified (harvested, no recorded run) |
genwro-ai/V4FinBench/src/v4finbench/llama/formatting.py code served (permissive licence) · get_code("7fcfde8127a28eb8") How it ran |
| row_to_llama_record |
Not yet run unverified (harvested, no recorded run) |
genwro-ai/V4FinBench/src/v4finbench/llama/formatting.py code served (permissive licence) · get_code("2a1f9f164d0075af") How it ran |