text stringlengths 0 1.87k |
|---|
ANTI_TAMPER: verifier integrity preflight passed |
============================= test session starts ============================== |
platform linux -- Python 3.12.13, pytest-8.4.2, pluggy-1.6.0 -- /usr/local/bin/python3 |
rootdir: /root |
configfile: ../dev/null |
plugins: json-ctrf-0.3.5 |
collecting ... collected 10 items |
../root::test_artifact_schema_and_source_protocol FAILED [ 10%] |
../root::test_prediction_alignment_and_persistence PASSED [ 20%] |
../root::test_forecast_matches_independent_svd_ridge PASSED [ 30%] |
../root::test_serialized_model_is_correct_and_reproduces_predictions PASSED [ 40%] |
../root::test_forecast_report_metrics_are_recomputed_correctly PASSED [ 50%] |
../root::test_information_tensor_matches_independent_knn_recomputation PASSED [ 60%] |
../root::test_peak_arrays_rankings_and_memory_metrics FAILED [ 70%] |
../root::test_conditional_information_matches_independent_frenzel_pompe_recomputation FAILED [ 80%] |
../root::test_conditional_peaks_and_predictive_summary FAILED [ 90%] |
../root::test_hidden_adversarial_lag_and_overlap_probes PASSED [100%] |
=================================== FAILURES =================================== |
___________________ test_artifact_schema_and_source_protocol ___________________ |
def test_artifact_schema_and_source_protocol() -> None: |
forecast_reference = independent_forecast_reference() |
predictions = submitted_predictions() |
information = submitted_information() |
conditional_information = submitted_conditional_information() |
report_path = ROOT / "reservoir_report.json" |
model_path = ROOT / "reservoir_model.npz" |
memory_report_path = ROOT / "memory_report.json" |
predictive_report_path = ROOT / "predictive_information_report.json" |
assert report_path.is_file(), "missing /root/reservoir_report.json" |
assert model_path.is_file(), "missing /root/reservoir_model.npz" |
assert memory_report_path.is_file(), "missing /root/memory_report.json" |
assert predictive_report_path.is_file(), "missing /root/predictive_information_report.json" |
report = load_strict_json(report_path) |
assert set(report) == { |
"schema_version", |
"protocol", |
"targets", |
} |
assert report["schema_version"] == "1.0" |
assert report["protocol"] == { |
"horizon_rows": HORIZON, |
"horizon_seconds": 120.0, |
"washout_rows": WASHOUT, |
"train_state_start": WASHOUT, |
"train_state_stop": TRAIN_STOP, |
"test_state_start": TRAIN_STOP, |
"test_state_stop": TEST_STOP, |
"alpha": ALPHA, |
"standardize_features": False, |
"n_features": len(FEATURE_NAMES), |
} |
assert set(report["targets"]) == set(TARGET_NAMES) |
for target in TARGET_NAMES: |
assert set(report["targets"][target]) == FORECAST_METRIC_NAMES |
with np.load(model_path, allow_pickle=False) as model: |
assert set(model.files) == { |
"feature_names", |
"target_names", |
"coefficients", |
"intercept", |
"alpha", |
} |
assert model["coefficients"].shape == (106, 3) |
assert model["intercept"].shape == (3,) |
assert model["alpha"].shape == () |
assert tuple(model["feature_names"].astype(str)) == FEATURE_NAMES |
assert tuple(model["target_names"].astype(str)) == TARGET_NAMES |
assert predictions["predicted"].shape == forecast_reference["test_prediction"].shape |
np.testing.assert_array_equal( |
integral_seconds(information["lags_seconds"], "lags_seconds"), |
LAGS_SECONDS, |
) |
assert tuple(information["feature_names"].astype(str)) == FEATURE_NAMES |
assert tuple(information["target_names"].astype(str)) == TARGET_NAMES |
assert information["mi_nats"].shape == (108, 106, 3) |
assert information["peak_lag_seconds"].shape == (106, 3) |
assert information["peak_mi_nats"].shape == (106, 3) |
integral_seconds(information["peak_lag_seconds"], "peak_lag_seconds") |
assert np.isfinite(information["mi_nats"]).all() |
assert np.isfinite(information["peak_mi_nats"]).all() |
assert np.all(information["mi_nats"] >= 0.0) |
np.testing.assert_array_equal( |
integral_seconds(conditional_information["lags_seconds"], "conditional lags_seconds"), |
CMI_LAGS_SECONDS, |
) |
assert tuple(conditional_information["feature_names"].astype(str)) == FEATURE_NAMES |
assert tuple(conditional_information["target_names"].astype(str)) == TARGET_NAMES |
assert conditional_information["cmi_nats"].shape == (12, 106, 3) |
assert conditional_information["peak_lag_seconds"].shape == (106, 3) |
assert conditional_information["peak_cmi_nats"].shape == (106, 3) |
integral_seconds( |
conditional_information["peak_lag_seconds"], |
"conditional peak_lag_seconds", |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 160