| analyze_faithfulness_determinism_tradeoff |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
ibm-client-engineering/output-drift-financial-llms/econometrics/analyze_real_data.py code served (permissive licence) · get_code("ab9dc624b00a431e") 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 pandas as pd
import numpy as np
# Create a sample DataFrame with the required columns
np.random.seed(0)
# Generate data for temperature 0.0 (which is what the function filters for)
n_samples = 20
data_t0 = {
'temp': [0.0] * n_samples,
'determinism_rate': np.random.uniform(70, 95, n_samples),
'faithfulness_rate': np.random.uniform(75, 95, n_samples)
}
# Also add some data with other temperatures to ensure filtering works
n_samples_other = 10
data_other = {
'temp': [0.5] * n_samples_other + [1.0] * n_samples_other,
'determinism_rate': np.random.uniform(50, 90, n_samples_other * 2),
'faithfulness_rate': np.random.uniform(50, 90, n_samples_other * 2)
}
# Combine data
all_data = {
'temp': data_t0['temp'] + data_other['temp'],
'determinism_rate': list(data_t0['determinism_rate']) + list(data_other['determinism_rate']),
'faithfulness_rate': list(data_t0['faithfulness_rate']) + list(data_other['faithfulness_rate'])
}
df = pd.DataFrame(all_data)
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 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
|
| analyze_model_tiers |
Ran ran; our contract draft was wrong, not the code |
ibm-client-engineering/output-drift-financial-llms/econometrics/analyze_real_data.py code served (permissive licence) · get_code("109125dea3af89f5") 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 pandas as pd
import numpy as np
# Create sample DataFrame with required columns
data = {
'tier': ['basic', 'basic', 'pro', 'pro', 'enterprise', 'enterprise'],
'model': ['gpt2', 'gpt2', 'gpt3.5', 'gpt4', 'gpt4-turbo', 'gpt4-turbo'],
'determinism_rate': [0.85, 0.87, 0.92, 0.95, 0.98, 0.97],
'faithfulness_rate': [0.78, 0.80, 0.88, 0.91, 0.94, 0.93],
'task': ['classification', 'summarization', 'classification', 'qa', 'classification', 'qa'],
}
df = pd.DataFrame(data)
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 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
|
| compute_measurement_error_covariance |
Ran ran, honoured the contract we drafted |
ibm-client-engineering/output-drift-financial-llms/econometrics/validation_debiasing.py code served (permissive licence) · get_code("ad4a8061dcc44459") 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 3, 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
from typing import Dict, List, Tuple, Optional
from dataclasses import dataclass
@dataclass
class ValidationSample:
"""Validation subsample with human and LLM labels.
Attributes:
texts: Input texts (e.g., headlines, earnings calls)
y_true: Human-labeled ground truth
y_llm: LLM-generated labels
y_llm_runs: Multiple LLM runs for drift estimation (n x k array)
metadata: Additional info (timestamps, model configs, etc.)
"""
texts: List[str]
y_true: np.ndarray
y_llm: np.ndarray
y_llm_runs: Optional[np.ndarray] = None
indices: Optional[np.ndarray] = None
metadata: Optional[Dict] = None
def __post_init__(self):
assert len(self.texts) == len(self.y_true) == len(self.y_llm)
if self.y_llm_runs is not None:
assert self.y_llm_runs.shape[0] == len(self.texts)
# Create a small validation sample
n_samples = 5
k_runs = 3
texts = ["text_1", "text_2", "text_3", "text_4", "text_5"]
y_true = np.array([1.0, 0.5, -0.2, 0.8, 1.5])
y_llm = np.array([0.9, 0.6, -0.1, 0.7, 1.4])
# Multiple LLM runs for drift estimation: (5, 3)
y_llm_runs = np.array([
[1.0, 0.9, 0.95],
[0.5, 0.6, 0.55],
[-0.2, -0.1, -0.15],
[0.7, 0.8, 0.75],
[1.4, 1.5, 1.45]
])
validation_sample = ValidationSample(
texts=texts,
y_true=y_true,
y_llm=y_llm,
y_llm_runs=y_llm_runs,
indices=np.arange(n_samples),
metadata={"model": "gpt-3.5", "timestamp": "2024-01-01"}
)
ARGS = {
"validation": validation_sample,
"include_drift": True
}
- 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, ndim 3, dtype family float — a tuple output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| compute_ngram_fingerprint |
Ran ran; our contract draft was wrong, not the code |
ibm-client-engineering/output-drift-financial-llms/econometrics/leakage_detection.py code served (permissive licence) · get_code("fb0cde7b90c7bbe7") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned set. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import hashlib
from typing import List, Dict, Tuple, Optional, Set
# Test the function with valid arguments
text_sample = "The company reported strong earnings in Q1 2024 with revenue growth across all segments"
ARGS = {
"text": text_sample,
"n": 8,
"num_hashes": 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 set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| compute_tf_vector |
Ran ran, honoured the contract we drafted |
ibm-client-engineering/output-drift-financial-llms/econometrics/semantic_divergence_econometric.py code served (permissive licence) · get_code("aeafd2672665514a") 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 1, dtype family float, shape (7,) 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.feature_extraction.text import TfidfVectorizer
from typing import Optional, Set
# Example 1: Simple case with no vectorizer provided
text_simple = "The company shows strong growth"
vectorizer_none = None
vocab_none = None
ARGS = {
"text": text_simple,
"vectorizer": vectorizer_none,
"vocab": vocab_none,
}
- 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 1, dtype family float, shape (7,) — shape (7,) as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| compute_token_mismatch |
Ran ran, honoured the contract we drafted |
ibm-client-engineering/output-drift-financial-llms/econometrics/semantic_divergence_econometric.py code served (permissive licence) · get_code("ed2de81ea3093e9c") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import re
def compute_token_mismatch(text1: str, text2: str) -> float:
"""Compute Jaccard complement = 1 - Jaccard similarity.
Measures vocabulary-level mismatch (word set overlap).
Args:
text1, text2: Input texts
Returns:
Mismatch in [0, 1] (0=identical tokens, 1=no overlap)
Example:
>>> mismatch = compute_token_mismatch("apple stock rises", "apple stock falls")
>>> print(mismatch) # 0.33 (1 different word out of 3 unique)
"""
tokens1 = set(re.findall('\\b\\w+\\b', text1.lower()))
tokens2 = set(re.findall('\\b\\w+\\b', text2.lower()))
intersection = len(tokens1 & tokens2)
union = len(tokens1 | tokens2)
jaccard = intersection / union if union > 0 else 0.0
mismatch = 1.0 - jaccard
return mismatch
ARGS = {
"text1": "apple stock rises today",
"text2": "apple stock falls tomorrow"
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| detect_temporal_leakage |
Ran ran; our contract draft was wrong, not the code |
ibm-client-engineering/output-drift-financial-llms/econometrics/leakage_detection.py code served (permissive licence) · get_code("8aac78959bcae7bb") 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.
from datetime import datetime
import re
# Test samples with various date formats
test_samples = [
"On 2024-03-15, the company reported earnings for Q1 2024.",
"Historical data from 2020-01-10 shows growth.",
"In March 15, 2025, we expect new products.",
"Q2 2024 results were announced on 04/15/2024.",
"The old report from 2019 is still relevant."
]
# Model name
model_name = "gpt-4"
# Optional cutoff date override (None to use default)
cutoff_date = None
# Construct ARGS dictionary
ARGS = {
"test_samples": test_samples,
"model_name": model_name,
"cutoff_date": cutoff_date
}
- 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 — 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
|
| estimate_categorical_drift_rate |
Ran ran, honoured the contract we drafted |
ibm-client-engineering/output-drift-financial-llms/econometrics/drift_variance_estimator.py code served (permissive licence) · get_code("b96061d3b5f18fb1") 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
from typing import List, Dict, Tuple, Optional
from collections import Counter
def estimate_categorical_drift_rate(runs: np.ndarray) -> Tuple[float, int]:
"""For categorical outputs, compute drift rate = proportion disagreeing with mode.
Args:
runs: Array of k runs (can be strings, ints, etc.)
Returns:
(drift_rate, mode_count)
Example:
>>> runs = np.array(['positive', 'positive', 'positive'])
>>> drift_rate, mode_count = estimate_categorical_drift_rate(runs)
>>> print(drift_rate) # 0.0 (perfect agreement)
>>>
>>> runs = np.array(['positive', 'negative', 'positive'])
>>> drift_rate, mode_count = estimate_categorical_drift_rate(runs)
>>> print(drift_rate) # 0.33 (1/3 disagree)
"""
counts = Counter(runs)
mode_value, mode_count = counts.most_common(1)[0]
k = len(runs)
drift_rate = (k - mode_count) / k
return (drift_rate, mode_count)
# Setup code to construct valid arguments
runs_example_1 = np.array(['positive', 'positive', 'positive'])
runs_example_2 = np.array(['positive', 'negative', 'positive'])
runs_example_3 = np.array([1, 1, 2, 1, 3])
ARGS = {
"runs": runs_example_2
}
- 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, 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
|
| estimate_drift_variance |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
ibm-client-engineering/output-drift-financial-llms/econometrics/validation_debiasing.py code served (permissive licence) · get_code("0e9d3bde9f3a6912") 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 1, dtype family float, shape (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 sample data for y_llm_runs
# Shape (n, k) where n=4 samples and k=3 runs per sample
y_llm_runs = np.array([
[1.0, 1.0, 1.0],
[0.0, 1.0, 0.0],
[-1.0, 0.0, 1.0],
[2.0, 2.5, 1.5]
], dtype=np.float32)
ARGS = {
'y_llm_runs': y_llm_runs,
'method': 'sample_variance'
}
- 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 1, dtype family float, shape (4,) — shape (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
|
| estimate_sample_drift_variance |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
ibm-client-engineering/output-drift-financial-llms/econometrics/drift_variance_estimator.py code served (permissive licence) · get_code("6446d46ba40ef240") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
# Set random seed for reproducibility
np.random.seed(0)
# Create test data for a single sample across k runs
# Case 1: Perfect consistency (low drift)
runs_consistent = np.array([1.0, 1.0, 1.0])
# Case 2: High drift
runs_drift = np.array([0.0, 1.0, 0.0])
# Case 3: Moderate drift with more runs
runs_moderate = np.array([2.5, 2.7, 2.3, 2.6, 2.8])
ARGS = {
"runs": runs_moderate,
"method": "variance"
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| extract_dates_from_text |
Ran ran; our contract draft was wrong, not the code |
ibm-client-engineering/output-drift-financial-llms/econometrics/leakage_detection.py code served (permissive licence) · get_code("5076293b4c331597") 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
from datetime import datetime, timedelta
ARGS = {
"text": "On 2024-03-15, the company reported earnings for Q1 2024. Also on 03/15/2024 and March 15, 2024 we had important dates. Q2 2023 is also mentioned."
}
- 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
|
| get_supported_models |
Ran ran; our contract draft was wrong, not the code |
ibm-client-engineering/output-drift-financial-llms/harness/load_models.py code served (permissive licence) · get_code("ec5cceabd14e66b3") 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 torch.nn as nn
# Create a minimal provider class with list_models method
class MinimalProvider:
def list_models(self):
return ['model_a', 'model_b', 'model_c']
# Create an instance of the provider
provider_instance = MinimalProvider()
# Define ARGS mapping all parameters
ARGS = {
'provider': provider_instance
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| naive_ols_regression |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
ibm-client-engineering/output-drift-financial-llms/econometrics/validation_debiasing.py code served (permissive licence) · get_code("8ad577384dcbd4e6") 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 2, 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
from typing import Dict, List, Tuple, Optional
import statsmodels.api as sm
# Set random seed for reproducibility
np.random.seed(42)
# Create sample data
# y_llm: dependent variable (LLM labels) - shape (n_samples,)
n_samples = 15
y_llm = np.random.randn(n_samples)
# X: independent variables - shape (n_samples, n_features)
# Using 3 features to have distinct dimensions from y_llm
n_features = 3
X = np.random.randn(n_samples, n_features)
# add_constant: boolean flag
add_constant = True
ARGS = {
"y_llm": y_llm,
"X": X,
"add_constant": add_constant,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, statsmodels — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple, ndim 2, 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
|
| resolve_model_name |
Ran ran; our contract draft was wrong, not the code |
ibm-client-engineering/output-drift-financial-llms/harness/load_models.py code served (permissive licence) · get_code("f8a9742e520382f7") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
from typing import Dict, Any
class MockProvider:
"""Mock provider with optional _normalize_model_id method"""
def _normalize_model_id(self, model_id: str) -> str:
# Normalize by converting to lowercase and replacing underscores
return model_id.lower().replace("_", "-")
class ProviderWithoutNormalize:
"""Mock provider without _normalize_model_id method"""
pass
# Create aliases dictionary
aliases = {
"gpt2_small": "gpt2",
"bert_base": "bert-base-uncased",
"custom_model": "model-v1"
}
# Create provider instance with _normalize_model_id
provider_with_normalize = MockProvider()
# Create provider instance without _normalize_model_id
provider_without_normalize = ProviderWithoutNormalize()
# Define arguments
ARGS = {
"model": "gpt2_small",
"provider": provider_with_normalize,
"aliases": aliases
}
- 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 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
|
| run_multi_run_analysis |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
ibm-client-engineering/output-drift-financial-llms/econometrics/drift_variance_estimator.py code served (permissive licence) · get_code("759c8d14d87fe68c") 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 DriftAnalysis. 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 typing import List, Dict, Tuple, Optional
# Set random seed for reproducibility
np.random.seed(0)
# Create sample data for run_multi_run_analysis
n_samples = 5 # number of samples
n_runs = 3 # number of runs per sample
# Create sample IDs
sample_ids = [f"sample_{i}" for i in range(n_samples)]
# Create runs_matrix with shape (n_samples, n_runs)
# Mix of low-drift and high-drift samples
runs_matrix = np.array([
[0.8, 0.8, 0.9], # low drift sample
[0.5, -0.2, 0.7], # high drift sample
[1.0, 1.0, 1.0], # zero drift sample
[0.3, 0.4, 0.35], # low drift sample
[0.1, 0.9, 0.2] # high drift sample
], dtype=np.float32)
# Test both categorical and continuous modes
ARGS = {
"sample_ids": sample_ids,
"runs_matrix": runs_matrix,
"categorical": False,
"drift_threshold": 0.1
}
- 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 DriftAnalysis — a DriftAnalysis output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DriftAnalysis 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
|
| analyze_task_structure_effect |
Not yet run unverified (harvested, no recorded run) |
ibm-client-engineering/output-drift-financial-llms/econometrics/analyze_real_data.py code served (permissive licence) · get_code("a23a29a8df70cbb3") How it ran |
| compute_cosine_divergence |
Not yet run unverified (harvested, no recorded run) |
ibm-client-engineering/output-drift-financial-llms/econometrics/semantic_divergence_econometric.py code served (permissive licence) · get_code("11ee49b80af0b23d") How it ran |