SKSurrogate 0.2.0__tar.gz → 0.8.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sksurrogate-0.2.0/License.txt → sksurrogate-0.8.0/LICENSE +1 -1
- sksurrogate-0.8.0/MANIFEST.in +18 -0
- sksurrogate-0.8.0/PKG-INFO +481 -0
- sksurrogate-0.8.0/SKSurrogate/DataProcess.py +966 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/SKSurrogate/NpyProximation.py +21 -0
- sksurrogate-0.8.0/SKSurrogate/__init__.py +293 -0
- sksurrogate-0.8.0/SKSurrogate/_logutil.py +69 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/SKSurrogate/aml.py +663 -209
- sksurrogate-0.8.0/SKSurrogate/artifacts.py +164 -0
- sksurrogate-0.8.0/SKSurrogate/compare.py +834 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/SKSurrogate/deployment.py +2 -2
- sksurrogate-0.8.0/SKSurrogate/deps.py +140 -0
- sksurrogate-0.8.0/SKSurrogate/design.py +185 -0
- sksurrogate-0.8.0/SKSurrogate/ensembling.py +1723 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/SKSurrogate/eoa.py +113 -36
- sksurrogate-0.8.0/SKSurrogate/forecast_intervals.py +220 -0
- sksurrogate-0.8.0/SKSurrogate/forecast_metrics.py +416 -0
- sksurrogate-0.8.0/SKSurrogate/inference.py +408 -0
- sksurrogate-0.8.0/SKSurrogate/manifest.py +497 -0
- sksurrogate-0.8.0/SKSurrogate/mltrace.py +4396 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/SKSurrogate/modelbundle.py +419 -14
- sksurrogate-0.8.0/SKSurrogate/monitoring.py +1247 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/SKSurrogate/retraining.py +22 -1
- sksurrogate-0.8.0/SKSurrogate/scoring.py +47 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/SKSurrogate/sensapprx.py +66 -39
- sksurrogate-0.8.0/SKSurrogate/structsearch.py +2233 -0
- sksurrogate-0.8.0/SKSurrogate/surrogate_family.py +116 -0
- sksurrogate-0.8.0/SKSurrogate/temporal.py +2276 -0
- sksurrogate-0.8.0/SKSurrogate.egg-info/PKG-INFO +481 -0
- sksurrogate-0.8.0/SKSurrogate.egg-info/SOURCES.txt +267 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/SKSurrogate.egg-info/entry_points.txt +1 -0
- sksurrogate-0.8.0/SKSurrogate.egg-info/requires.txt +93 -0
- sksurrogate-0.8.0/SKSurrogate.egg-info/top_level.txt +2 -0
- sksurrogate-0.8.0/docs/architecture.rst +66 -0
- sksurrogate-0.8.0/docs/auth-and-sharing.rst +282 -0
- sksurrogate-0.8.0/docs/changelog/0.1.1.rst +125 -0
- sksurrogate-0.8.0/docs/changelog/0.2.0.rst +29 -0
- sksurrogate-0.8.0/docs/changelog/0.3.0.rst +439 -0
- sksurrogate-0.8.0/docs/changelog/0.3.1-benchmarks-ensembles-and-calibration.rst +158 -0
- sksurrogate-0.8.0/docs/changelog/0.3.1-experiments-auth-and-fixes.rst +292 -0
- sksurrogate-0.8.0/docs/changelog/0.3.1-scoring-search-and-partitions.rst +437 -0
- sksurrogate-0.8.0/docs/changelog/0.3.1-time-series-and-forecasting.rst +458 -0
- sksurrogate-0.8.0/docs/changelog/0.3.1-web-ui-data-page-and-jobs.rst +378 -0
- sksurrogate-0.8.0/docs/changelog/0.4.0.rst +63 -0
- sksurrogate-0.8.0/docs/changelog/0.5.0.rst +48 -0
- sksurrogate-0.8.0/docs/changelog/0.6.0.rst +114 -0
- sksurrogate-0.8.0/docs/changelog/0.8.0.rst +104 -0
- sksurrogate-0.8.0/docs/changelog/index.rst +77 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/code.rst +3 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/conf.py +32 -5
- sksurrogate-0.8.0/docs/controlplane.rst +780 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/dataproc.rst +81 -0
- sksurrogate-0.8.0/docs/ensembles.rst +450 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/eoa.rst +20 -7
- sksurrogate-0.8.0/docs/experiment-design.rst +190 -0
- sksurrogate-0.8.0/docs/forecasting.rst +853 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/hilbert.rst +6 -0
- sksurrogate-0.8.0/docs/images/auth-settings.png +0 -0
- sksurrogate-0.8.0/docs/images/experiments-preflight.png +0 -0
- sksurrogate-0.8.0/docs/images/experiments-visual-searchspace.png +0 -0
- sksurrogate-0.8.0/docs/images/make_stability_contour.py +280 -0
- sksurrogate-0.8.0/docs/images/preprocessing-eda.png +0 -0
- sksurrogate-0.8.0/docs/images/preprocessing-flags.png +0 -0
- sksurrogate-0.8.0/docs/images/preprocessing-tier3.png +0 -0
- sksurrogate-0.8.0/docs/images/stability_contour.png +0 -0
- sksurrogate-0.8.0/docs/images/ui-ensembles.png +0 -0
- sksurrogate-0.8.0/docs/images/ui-evaluation-comparison.png +0 -0
- sksurrogate-0.8.0/docs/images/ui-explain-explanations.png +0 -0
- sksurrogate-0.8.0/docs/images/ui-explain-guarantees.png +0 -0
- sksurrogate-0.8.0/docs/images/ui-ignored-columns.png +0 -0
- sksurrogate-0.8.0/docs/images/ui-logs.png +0 -0
- sksurrogate-0.8.0/docs/images/ui-preprocessing.png +0 -0
- sksurrogate-0.8.0/docs/images/ui-project-synthesis.png +0 -0
- sksurrogate-0.8.0/docs/images/ui-registry.png +0 -0
- sksurrogate-0.8.0/docs/images/ui-serving.png +0 -0
- sksurrogate-0.8.0/docs/images/webui-backtest.png +0 -0
- sksurrogate-0.8.0/docs/images/webui-temporal-panel.png +0 -0
- sksurrogate-0.8.0/docs/images/wt-01-dashboard.png +0 -0
- sksurrogate-0.8.0/docs/images/wt-02-datasets-inspect.png +0 -0
- sksurrogate-0.8.0/docs/images/wt-03-datasets-validate.png +0 -0
- sksurrogate-0.8.0/docs/images/wt-04-datasets-registered.png +0 -0
- sksurrogate-0.8.0/docs/images/wt-05-features-sensitivity.png +0 -0
- sksurrogate-0.8.0/docs/images/wt-06-features-ranking.png +0 -0
- sksurrogate-0.8.0/docs/images/wt-07-experiments-quickstart.png +0 -0
- sksurrogate-0.8.0/docs/images/wt-08-experiments-result.png +0 -0
- sksurrogate-0.8.0/docs/images/wt-09-bundles-train.png +0 -0
- sksurrogate-0.8.0/docs/images/wt-10-bundles-list.png +0 -0
- sksurrogate-0.8.0/docs/images/wt-11-evaluation.png +0 -0
- sksurrogate-0.8.0/docs/images/wt-12-explain-importance.png +0 -0
- sksurrogate-0.8.0/docs/images/wt-13-explain-intervals.png +0 -0
- sksurrogate-0.8.0/docs/images/wt-14-quality-gate.png +0 -0
- sksurrogate-0.8.0/docs/images/wt-15-registry.png +0 -0
- sksurrogate-0.8.0/docs/images/wt-16-inference.png +0 -0
- sksurrogate-0.8.0/docs/images/wt-17-monitoring.png +0 -0
- sksurrogate-0.8.0/docs/images/wt-18-monitoring-drift.png +0 -0
- sksurrogate-0.8.0/docs/images/wt-19-projects.png +0 -0
- sksurrogate-0.8.0/docs/images/wt-20-design.png +0 -0
- sksurrogate-0.8.0/docs/index.rst +66 -0
- sksurrogate-0.8.0/docs/inference.rst +269 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/intro.rst +27 -7
- sksurrogate-0.8.0/docs/mcp-server.rst +281 -0
- sksurrogate-0.8.0/docs/mltrace.rst +947 -0
- sksurrogate-0.8.0/docs/model-comparison.rst +139 -0
- sksurrogate-0.8.0/docs/modelbundles.rst +327 -0
- sksurrogate-0.8.0/docs/monitoring.rst +471 -0
- sksurrogate-0.8.0/docs/notebooks.rst +58 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/opd.rst +8 -3
- sksurrogate-0.8.0/docs/release.rst +54 -0
- sksurrogate-0.8.0/docs/research-projects.rst +303 -0
- sksurrogate-0.8.0/docs/search-contract.rst +170 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/sensitivity.rst +75 -2
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/surrogate.rst +144 -7
- sksurrogate-0.8.0/docs/telemetry.rst +312 -0
- sksurrogate-0.8.0/docs/ui-manual.rst +1435 -0
- sksurrogate-0.8.0/docs/walkthrough.rst +578 -0
- sksurrogate-0.8.0/docs/workflow.rst +114 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/examples/example01.py +1 -1
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/examples/example02.py +5 -2
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/examples/example03_mltrace.py +9 -9
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/examples/example05_full_classification.py +2 -2
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/examples/example06_full_regression.py +2 -2
- sksurrogate-0.8.0/examples/smoke_aml.py +56 -0
- sksurrogate-0.8.0/readme.rst +367 -0
- sksurrogate-0.8.0/requirements-api.txt +10 -0
- sksurrogate-0.8.0/requirements-core.txt +17 -0
- sksurrogate-0.8.0/requirements-dev.txt +11 -0
- sksurrogate-0.8.0/requirements-extras.txt +22 -0
- sksurrogate-0.8.0/requirements.txt +22 -0
- sksurrogate-0.8.0/setup.py +185 -0
- sksurrogate-0.8.0/sksurrogate_mcp/__init__.py +51 -0
- sksurrogate-0.8.0/sksurrogate_mcp/openapi_ops.json +766 -0
- sksurrogate-0.8.0/sksurrogate_mcp/server.py +1656 -0
- sksurrogate-0.8.0/tests/api_snapshot.py +45 -0
- sksurrogate-0.8.0/tests/conftest.py +34 -0
- sksurrogate-0.8.0/tests/test_acl.py +328 -0
- sksurrogate-0.8.0/tests/test_api_experiments.py +689 -0
- sksurrogate-0.8.0/tests/test_api_explanations.py +583 -0
- sksurrogate-0.8.0/tests/test_api_jobs.py +128 -0
- sksurrogate-0.8.0/tests/test_api_key_auth.py +232 -0
- sksurrogate-0.8.0/tests/test_api_logs.py +276 -0
- sksurrogate-0.8.0/tests/test_api_route_smoke.py +101 -0
- sksurrogate-0.8.0/tests/test_api_safety.py +105 -0
- sksurrogate-0.8.0/tests/test_api_simplification.py +183 -0
- sksurrogate-0.8.0/tests/test_api_synthesis.py +408 -0
- sksurrogate-0.8.0/tests/test_artifact_schema.py +124 -0
- sksurrogate-0.8.0/tests/test_auth_users.py +523 -0
- sksurrogate-0.8.0/tests/test_backtest.py +622 -0
- sksurrogate-0.8.0/tests/test_baseline_mixed_types.py +146 -0
- sksurrogate-0.8.0/tests/test_benchmark_analysis.py +104 -0
- sksurrogate-0.8.0/tests/test_benchmark_archive_readers.py +152 -0
- sksurrogate-0.8.0/tests/test_benchmark_cost_model.py +66 -0
- sksurrogate-0.8.0/tests/test_benchmark_datasets.py +129 -0
- sksurrogate-0.8.0/tests/test_benchmark_design_readiness.py +136 -0
- sksurrogate-0.8.0/tests/test_benchmark_dgps.py +187 -0
- sksurrogate-0.8.0/tests/test_benchmark_methods.py +100 -0
- sksurrogate-0.8.0/tests/test_benchmark_stats.py +186 -0
- sksurrogate-0.8.0/tests/test_benchmark_synth.py +324 -0
- sksurrogate-0.8.0/tests/test_bundle_integrity_gate.py +88 -0
- sksurrogate-0.8.0/tests/test_compare.py +236 -0
- sksurrogate-0.8.0/tests/test_comparison.py +249 -0
- sksurrogate-0.8.0/tests/test_compute_settings.py +420 -0
- sksurrogate-0.8.0/tests/test_cspace_cli.py +87 -0
- sksurrogate-0.8.0/tests/test_cspace_pipelines.py +192 -0
- sksurrogate-0.8.0/tests/test_cspace_runner.py +99 -0
- sksurrogate-0.8.0/tests/test_cspace_space.py +120 -0
- sksurrogate-0.8.0/tests/test_dataset_registration_guards.py +78 -0
- sksurrogate-0.8.0/tests/test_datetime_features.py +222 -0
- sksurrogate-0.8.0/tests/test_design_endpoints.py +105 -0
- sksurrogate-0.8.0/tests/test_eda_diagnostics.py +219 -0
- sksurrogate-0.8.0/tests/test_eda_tier3.py +217 -0
- sksurrogate-0.8.0/tests/test_ensemble_endpoints.py +960 -0
- sksurrogate-0.8.0/tests/test_ensembling.py +1291 -0
- sksurrogate-0.8.0/tests/test_eoa_aliases.py +98 -0
- sksurrogate-0.8.0/tests/test_eoa_checkpoint.py +118 -0
- sksurrogate-0.8.0/tests/test_explanation_guarantees.py +213 -0
- sksurrogate-0.8.0/tests/test_forecast_dgps.py +70 -0
- sksurrogate-0.8.0/tests/test_forecast_features.py +418 -0
- sksurrogate-0.8.0/tests/test_forecast_inference.py +708 -0
- sksurrogate-0.8.0/tests/test_forecast_intervals.py +352 -0
- sksurrogate-0.8.0/tests/test_forecast_metrics.py +372 -0
- sksurrogate-0.8.0/tests/test_ignored_columns.py +238 -0
- sksurrogate-0.8.0/tests/test_job_control.py +455 -0
- sksurrogate-0.8.0/tests/test_layer_boundaries.py +89 -0
- sksurrogate-0.8.0/tests/test_leakage_guards.py +305 -0
- sksurrogate-0.8.0/tests/test_logging_telemetry.py +381 -0
- sksurrogate-0.8.0/tests/test_manifest.py +228 -0
- sksurrogate-0.8.0/tests/test_mcp_server.py +1251 -0
- sksurrogate-0.8.0/tests/test_mcp_snapshot_drift.py +125 -0
- sksurrogate-0.8.0/tests/test_mid_pipeline_sampler.py +68 -0
- sksurrogate-0.8.0/tests/test_mixed_type_experiments.py +336 -0
- sksurrogate-0.8.0/tests/test_naming_aliases.py +250 -0
- sksurrogate-0.8.0/tests/test_optimized_paths.py +3283 -0
- sksurrogate-0.8.0/tests/test_optional_deps.py +239 -0
- sksurrogate-0.8.0/tests/test_partition_defaults.py +170 -0
- sksurrogate-0.8.0/tests/test_phase1_endpoints.py +762 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/tests/test_phase2_endpoints.py +16 -1
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/tests/test_phase3_endpoints.py +155 -2
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/tests/test_phase4_endpoints.py +65 -14
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/tests/test_phase5_endpoints.py +59 -2
- sksurrogate-0.8.0/tests/test_phase6_endpoints.py +452 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/tests/test_phase7_endpoints.py +52 -4
- sksurrogate-0.8.0/tests/test_prediction_download.py +216 -0
- sksurrogate-0.8.0/tests/test_preflight.py +93 -0
- sksurrogate-0.8.0/tests/test_preprocessing.py +630 -0
- sksurrogate-0.8.0/tests/test_preprocessing_temporal.py +263 -0
- sksurrogate-0.8.0/tests/test_problem_type.py +284 -0
- sksurrogate-0.8.0/tests/test_projects_endpoints.py +1125 -0
- sksurrogate-0.8.0/tests/test_quantile_evaluation.py +64 -0
- sksurrogate-0.8.0/tests/test_rate_limit.py +103 -0
- sksurrogate-0.8.0/tests/test_real_noise_gp_probe.py +52 -0
- sksurrogate-0.8.0/tests/test_repo_layout.py +171 -0
- sksurrogate-0.8.0/tests/test_reports.py +660 -0
- sksurrogate-0.8.0/tests/test_reset.py +222 -0
- sksurrogate-0.8.0/tests/test_search_determinism.py +158 -0
- sksurrogate-0.8.0/tests/test_search_invariants.py +174 -0
- sksurrogate-0.8.0/tests/test_sensitivity_numeric.py +344 -0
- sksurrogate-0.8.0/tests/test_sensitivity_temporal.py +212 -0
- sksurrogate-0.8.0/tests/test_serving_endpoints.py +278 -0
- sksurrogate-0.8.0/tests/test_sklearn_compat.py +289 -0
- sksurrogate-0.8.0/tests/test_surrogate_diagnostics.py +204 -0
- sksurrogate-0.8.0/tests/test_synthetic_partition.py +100 -0
- sksurrogate-0.8.0/tests/test_target_edit.py +148 -0
- sksurrogate-0.8.0/tests/test_temporal_baseline_bundle.py +169 -0
- sksurrogate-0.8.0/tests/test_temporal_contract.py +675 -0
- sksurrogate-0.8.0/tests/test_temporal_ensembles.py +183 -0
- sksurrogate-0.8.0/tests/test_temporal_experiments.py +318 -0
- sksurrogate-0.8.0/tests/test_temporal_learning_curves.py +133 -0
- sksurrogate-0.8.0/tests/test_temporal_monitoring.py +150 -0
- sksurrogate-0.8.0/tests/test_time_series_evaluation.py +85 -0
- sksurrogate-0.8.0/tests/test_upload_limits.py +70 -0
- sksurrogate-0.2.0/MANIFEST.in +0 -10
- sksurrogate-0.2.0/PKG-INFO +0 -161
- sksurrogate-0.2.0/SKSurrogate/DataProcess.py +0 -409
- sksurrogate-0.2.0/SKSurrogate/__init__.py +0 -112
- sksurrogate-0.2.0/SKSurrogate/inference.py +0 -224
- sksurrogate-0.2.0/SKSurrogate/mltrace.py +0 -2138
- sksurrogate-0.2.0/SKSurrogate/monitoring.py +0 -360
- sksurrogate-0.2.0/SKSurrogate/structsearch.py +0 -1427
- sksurrogate-0.2.0/SKSurrogate.egg-info/PKG-INFO +0 -161
- sksurrogate-0.2.0/SKSurrogate.egg-info/SOURCES.txt +0 -95
- sksurrogate-0.2.0/SKSurrogate.egg-info/requires.txt +0 -21
- sksurrogate-0.2.0/SKSurrogate.egg-info/top_level.txt +0 -1
- sksurrogate-0.2.0/docs/controlplane.rst +0 -85
- sksurrogate-0.2.0/docs/images/ui-experiments.png +0 -0
- sksurrogate-0.2.0/docs/images/ui-registry.png +0 -0
- sksurrogate-0.2.0/docs/index.rst +0 -38
- sksurrogate-0.2.0/docs/inference.rst +0 -85
- sksurrogate-0.2.0/docs/mltrace.rst +0 -425
- sksurrogate-0.2.0/docs/modelbundles.rst +0 -154
- sksurrogate-0.2.0/docs/monitoring.rst +0 -142
- sksurrogate-0.2.0/docs/phase10.rst +0 -122
- sksurrogate-0.2.0/docs/phase9.rst +0 -254
- sksurrogate-0.2.0/docs/release.rst +0 -44
- sksurrogate-0.2.0/docs/ui-manual.rst +0 -490
- sksurrogate-0.2.0/readme.rst +0 -109
- sksurrogate-0.2.0/requirements.txt +0 -22
- sksurrogate-0.2.0/setup.py +0 -77
- sksurrogate-0.2.0/tests/test_optimized_paths.py +0 -1408
- sksurrogate-0.2.0/tests/test_phase1_endpoints.py +0 -323
- sksurrogate-0.2.0/tests/test_phase6_endpoints.py +0 -216
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/SKSurrogate/ci.py +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/SKSurrogate/execution.py +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/SKSurrogate/synthdat.py +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/SKSurrogate.egg-info/dependency_links.txt +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/Makefile +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/images/best1.png +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/images/best10.png +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/images/best11.png +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/images/best12.png +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/images/best2.png +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/images/best3.png +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/images/best4.png +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/images/best5.png +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/images/best6.png +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/images/best7.png +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/images/best8.png +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/images/best9.png +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/images/correlations.png +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/images/funnel.png +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/images/lego.png +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/images/points.png +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/images/points_fit_optm.png +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/images/polyreg.png +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/images/ui-bundles.png +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/images/ui-dashboard.png +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/images/ui-datasets.png +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/images/ui-evaluation.png +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/images/ui-features.png +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/images/ui-inference.png +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/images/ui-jobs.png +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/images/ui-monitoring.png +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/images/ui-quality-gates.png +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/images/ui-retraining.png +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/images/ui-settings.png +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/images/weights.png +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/docs/make.bat +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/examples/benchmark_phase10.py +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/examples/example04_end_to_end.py +0 -0
- {sksurrogate-0.2.0 → sksurrogate-0.8.0}/setup.cfg +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
include readme.rst
|
|
2
|
+
include LICENSE
|
|
3
|
+
include requirements.txt
|
|
4
|
+
# requirements.txt is an umbrella that -r's these; pip resolves the paths
|
|
5
|
+
# relative to it, so an sdist without them cannot be installed from
|
|
6
|
+
# requirements.txt.
|
|
7
|
+
include requirements-core.txt
|
|
8
|
+
include requirements-extras.txt
|
|
9
|
+
include requirements-api.txt
|
|
10
|
+
include requirements-dev.txt
|
|
11
|
+
include docs/*.rst
|
|
12
|
+
recursive-include docs/changelog *.rst
|
|
13
|
+
include docs/conf.py
|
|
14
|
+
include docs/Makefile
|
|
15
|
+
include docs/make.bat
|
|
16
|
+
include docs/images/*
|
|
17
|
+
recursive-include examples *.py
|
|
18
|
+
recursive-include tests *.py conftest.py
|
|
@@ -0,0 +1,481 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: SKSurrogate
|
|
3
|
+
Version: 0.8.0
|
|
4
|
+
Summary: scikit-learn-native surrogate tuner for hyperparameter and AutoML pipeline search; a drop-in replacement for BayesSearchCV, with a small core install and opt-in extras.
|
|
5
|
+
Home-page: https://github.com/mghasemi/sksurrogate
|
|
6
|
+
Author: Mehdi Ghasemi
|
|
7
|
+
Author-email: mehdi.ghasemi@gmail.com
|
|
8
|
+
License: MIT
|
|
9
|
+
Project-URL: Source, https://github.com/mghasemi/sksurrogate
|
|
10
|
+
Project-URL: Documentation, https://sksurrogate.readthedocs.io/
|
|
11
|
+
Project-URL: Zenodo (software), https://doi.org/10.5281/zenodo.23631823
|
|
12
|
+
Project-URL: Zenodo (benchmark data), https://doi.org/10.5281/zenodo.23629024
|
|
13
|
+
Keywords: hyperparameter optimization,surrogate,scikit-learn,AutoML,Bayesian optimization,trust region,evolutionary optimization,drift detection,Auto Machine Learning,Optimization,Surrogate Optimization,Machine Learning,Regression,Random Search
|
|
14
|
+
Classifier: Development Status :: 4 - Beta
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
|
+
Description-Content-Type: text/x-rst
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: numpy>=1.22
|
|
27
|
+
Requires-Dist: scipy>=1.10
|
|
28
|
+
Requires-Dist: pandas
|
|
29
|
+
Requires-Dist: scikit-learn>=1.5
|
|
30
|
+
Requires-Dist: joblib>=1.2
|
|
31
|
+
Requires-Dist: peewee
|
|
32
|
+
Requires-Dist: tqdm>=4.66.3
|
|
33
|
+
Provides-Extra: lightgbm
|
|
34
|
+
Requires-Dist: lightgbm>=4.6; extra == "lightgbm"
|
|
35
|
+
Provides-Extra: xgboost
|
|
36
|
+
Requires-Dist: xgboost>=2.1; extra == "xgboost"
|
|
37
|
+
Provides-Extra: rgf
|
|
38
|
+
Requires-Dist: rgf-python>=3.12.0; extra == "rgf"
|
|
39
|
+
Provides-Extra: gbm
|
|
40
|
+
Requires-Dist: lightgbm>=4.6; extra == "gbm"
|
|
41
|
+
Requires-Dist: xgboost>=2.1; extra == "gbm"
|
|
42
|
+
Provides-Extra: estimators
|
|
43
|
+
Requires-Dist: lightgbm>=4.6; extra == "estimators"
|
|
44
|
+
Requires-Dist: xgboost>=2.1; extra == "estimators"
|
|
45
|
+
Requires-Dist: rgf-python>=3.12.0; extra == "estimators"
|
|
46
|
+
Requires-Dist: category-encoders; extra == "estimators"
|
|
47
|
+
Provides-Extra: sensitivity
|
|
48
|
+
Requires-Dist: SALib; extra == "sensitivity"
|
|
49
|
+
Provides-Extra: explain
|
|
50
|
+
Requires-Dist: eli5; extra == "explain"
|
|
51
|
+
Requires-Dist: skrebate; extra == "explain"
|
|
52
|
+
Provides-Extra: imbalance
|
|
53
|
+
Requires-Dist: imbalanced-learn; extra == "imbalance"
|
|
54
|
+
Provides-Extra: categorical
|
|
55
|
+
Requires-Dist: category-encoders; extra == "categorical"
|
|
56
|
+
Provides-Extra: plots
|
|
57
|
+
Requires-Dist: matplotlib; extra == "plots"
|
|
58
|
+
Provides-Extra: dask
|
|
59
|
+
Requires-Dist: dask[distributed]>=2024.1; extra == "dask"
|
|
60
|
+
Provides-Extra: api
|
|
61
|
+
Requires-Dist: fastapi>0.109; extra == "api"
|
|
62
|
+
Requires-Dist: uvicorn[standard]>=0.11.7; extra == "api"
|
|
63
|
+
Requires-Dist: python-multipart>=0.0.31; extra == "api"
|
|
64
|
+
Provides-Extra: ui
|
|
65
|
+
Requires-Dist: fastapi>0.109; extra == "ui"
|
|
66
|
+
Requires-Dist: uvicorn[standard]>=0.11.7; extra == "ui"
|
|
67
|
+
Requires-Dist: python-multipart>=0.0.31; extra == "ui"
|
|
68
|
+
Provides-Extra: benchmark
|
|
69
|
+
Requires-Dist: openml<0.16,>=0.15; extra == "benchmark"
|
|
70
|
+
Requires-Dist: optuna; extra == "benchmark"
|
|
71
|
+
Requires-Dist: scikit-posthocs>=0.9; extra == "benchmark"
|
|
72
|
+
Provides-Extra: automl
|
|
73
|
+
Requires-Dist: autogluon.tabular; extra == "automl"
|
|
74
|
+
Requires-Dist: flaml[automl]; extra == "automl"
|
|
75
|
+
Provides-Extra: forecasting
|
|
76
|
+
Provides-Extra: mcp
|
|
77
|
+
Requires-Dist: httpx>=0.27; extra == "mcp"
|
|
78
|
+
Requires-Dist: mcp<3,>=2.3; extra == "mcp"
|
|
79
|
+
Provides-Extra: test
|
|
80
|
+
Requires-Dist: pytest; extra == "test"
|
|
81
|
+
Requires-Dist: pygments; extra == "test"
|
|
82
|
+
Requires-Dist: hypothesis>=6.100; extra == "test"
|
|
83
|
+
Provides-Extra: all
|
|
84
|
+
Requires-Dist: lightgbm>=4.6; extra == "all"
|
|
85
|
+
Requires-Dist: xgboost>=2.1; extra == "all"
|
|
86
|
+
Requires-Dist: rgf-python>=3.12.0; extra == "all"
|
|
87
|
+
Requires-Dist: category-encoders; extra == "all"
|
|
88
|
+
Requires-Dist: SALib; extra == "all"
|
|
89
|
+
Requires-Dist: eli5; extra == "all"
|
|
90
|
+
Requires-Dist: skrebate; extra == "all"
|
|
91
|
+
Requires-Dist: imbalanced-learn; extra == "all"
|
|
92
|
+
Requires-Dist: matplotlib; extra == "all"
|
|
93
|
+
Requires-Dist: dask[distributed]>=2024.1; extra == "all"
|
|
94
|
+
Requires-Dist: fastapi>0.109; extra == "all"
|
|
95
|
+
Requires-Dist: uvicorn[standard]>=0.11.7; extra == "all"
|
|
96
|
+
Requires-Dist: python-multipart>=0.0.31; extra == "all"
|
|
97
|
+
Requires-Dist: openml<0.16,>=0.15; extra == "all"
|
|
98
|
+
Requires-Dist: optuna; extra == "all"
|
|
99
|
+
Requires-Dist: scikit-posthocs>=0.9; extra == "all"
|
|
100
|
+
Dynamic: author
|
|
101
|
+
Dynamic: author-email
|
|
102
|
+
Dynamic: classifier
|
|
103
|
+
Dynamic: description
|
|
104
|
+
Dynamic: description-content-type
|
|
105
|
+
Dynamic: home-page
|
|
106
|
+
Dynamic: keywords
|
|
107
|
+
Dynamic: license
|
|
108
|
+
Dynamic: license-file
|
|
109
|
+
Dynamic: project-url
|
|
110
|
+
Dynamic: provides-extra
|
|
111
|
+
Dynamic: requires-dist
|
|
112
|
+
Dynamic: requires-python
|
|
113
|
+
Dynamic: summary
|
|
114
|
+
|
|
115
|
+
|CI| |Doc| |Licence|
|
|
116
|
+
|
|
117
|
+
|Logo|
|
|
118
|
+
|
|
119
|
+
SKSurrogate
|
|
120
|
+
==================
|
|
121
|
+
**Lightweight, maintained, scikit-learn-native surrogate tuner — a drop-in replacement for
|
|
122
|
+
``BayesSearchCV``.**
|
|
123
|
+
|
|
124
|
+
``SKSurrogate`` searches expensive objectives (hyperparameters, AutoML pipelines) with a
|
|
125
|
+
surrogate response surface built on ``scikit-learn``. The tuner is a ``BaseSearchCV``
|
|
126
|
+
subclass, so it plugs into existing scikit-learn code with the same ``fit``/``predict``
|
|
127
|
+
contract as ``GridSearchCV``, ``RandomizedSearchCV``, or ``BayesSearchCV`` — no new estimator
|
|
128
|
+
API, no framework lock-in.
|
|
129
|
+
|
|
130
|
+
Why not Optuna / vanilla BO?
|
|
131
|
+
----------------------------
|
|
132
|
+
- **Inequality constraints** (``ineq``): constrain the search region directly, rather than
|
|
133
|
+
through penalty tricks or rejection sampling.
|
|
134
|
+
- **Trust-region contraction dynamics** (``contraction=0.9``): TuRBO/DYCORS-style radius
|
|
135
|
+
contraction that keeps the search focused as it converges, scaling to medium- and
|
|
136
|
+
high-dimensional spaces.
|
|
137
|
+
- **scikit-learn-native**: the tuner *is* a ``BaseSearchCV`` — it composes with pipelines,
|
|
138
|
+
cross-validation, and the rest of the scikit-learn ecosystem.
|
|
139
|
+
- **Drift-aware** (see below): it records the identity of the data it optimized, so you can
|
|
140
|
+
detect drift before inference.
|
|
141
|
+
|
|
142
|
+
The hybrid loop
|
|
143
|
+
---------------
|
|
144
|
+
Two cooperating search layers are the centerpiece of the package:
|
|
145
|
+
|
|
146
|
+
- **Evolutionary pipeline selector** (``EOA``): explores the space of transformers and
|
|
147
|
+
estimators to assemble candidate pipelines.
|
|
148
|
+
- **Local surrogate tuner** (``SurrogateRandomCV``): fits a response surface to the best
|
|
149
|
+
candidates and focuses evaluations where the surrogate predicts improvement.
|
|
150
|
+
|
|
151
|
+
This hybrid — global structure search plus local surrogate refinement — is what makes
|
|
152
|
+
``SKSurrogate`` a pipeline *designer* rather than just a hyperparameter tuner.
|
|
153
|
+
|
|
154
|
+
Since v0.2 the default response surface is a stock, un-tuned RBF Gaussian process (chosen over
|
|
155
|
+
the previous cubic Hilbert polynomial on the evidence of the equal-budget benchmark suite); a
|
|
156
|
+
custom regressor based on Hilbert Space techniques is still available (``HilbertRegressor``),
|
|
157
|
+
and all ``scikit-learn`` regressors are accepted for optimization.
|
|
158
|
+
|
|
159
|
+
Understand what you tuned
|
|
160
|
+
-------------------------
|
|
161
|
+
Once a run has finished, ``SKSurrogate`` explains *what* the fitted model depends on — not just
|
|
162
|
+
*where* the search stopped:
|
|
163
|
+
|
|
164
|
+
- **Model explanations**: permutation importance, partial dependence, and accumulated local
|
|
165
|
+
effects for a stored model bundle show which features drive its predictions globally, while
|
|
166
|
+
an exact row-level explanation reconstructs one prediction from its baseline as ordered
|
|
167
|
+
feature contributions. Every response carries the explained quantity, the model's
|
|
168
|
+
provenance, a checked reconstruction status, an out-of-distribution flag for rows, and
|
|
169
|
+
grouped/stability-checked importance for correlated features. Available through the
|
|
170
|
+
control plane (``explain``, ``ale`` and ``explain/row`` endpoints) and in the web UI; see
|
|
171
|
+
the `control-plane guide <https://sksurrogate.readthedocs.io/en/latest/controlplane.html>`_
|
|
172
|
+
and the `scientific workflow guide <https://sksurrogate.readthedocs.io/en/latest/mltrace.html>`_.
|
|
173
|
+
- **Paired model comparison**: refits stored bundles on one shared fold list and reports
|
|
174
|
+
oriented deltas with percentile bootstrap intervals, Holm-adjusted Wilcoxon p-values,
|
|
175
|
+
Cliff's ordinal effect size, a score/complexity/cost Pareto front and calibration — with
|
|
176
|
+
the exploratory-selection caveat stated in the payload. See the
|
|
177
|
+
`model-comparison guide <https://sksurrogate.readthedocs.io/en/latest/model-comparison.html>`_.
|
|
178
|
+
- **Sensitivity analysis**: Sobol, Morris, and moment-independent δ indices quantify which
|
|
179
|
+
inputs dominate output variance — useful for pruning expensive models or diagnosing a tuned
|
|
180
|
+
pipeline. See the `sensitivity analysis guide <https://sksurrogate.readthedocs.io/en/latest/sensitivity.html>`_.
|
|
181
|
+
- **Data diagnostics before a run**: the Data page profiles a registered partition —
|
|
182
|
+
distributions, target composition, target/feature associations, collinearity, identifier
|
|
183
|
+
and leakage flags, Little's MCAR, Anderson–Darling normality, bootstrap effect sizes,
|
|
184
|
+
half-sample stability, partition-to-partition drift — and exports the same tables as a
|
|
185
|
+
Markdown report. The Experiments page repeats the actionable findings as advisory
|
|
186
|
+
pre-flight checks, so a score is never read without its data caveats. See the
|
|
187
|
+
`monitoring guide <https://sksurrogate.readthedocs.io/en/latest/monitoring.html>`_.
|
|
188
|
+
|
|
189
|
+
All of these are descriptive analyses: the model-attribution views show how the learned response
|
|
190
|
+
depends on its inputs, and the data diagnostics describe the partition — none of them is a causal claim.
|
|
191
|
+
|
|
192
|
+
Observe what a run did
|
|
193
|
+
----------------------
|
|
194
|
+
Search progress goes through the standard library ``logging`` module (``SKSurrogate`` loggers, with
|
|
195
|
+
``WARNING``/``ERROR`` for degraded surrogate fits, stagnation and failures), and the core exposes
|
|
196
|
+
per-trial telemetry: a per-refit ``fit_score``, ``init``/``explore``/``surrogate_exploit`` sampling
|
|
197
|
+
tags, a ``callbacks`` hook that delivers one event per evaluated candidate, and a JSON-safe
|
|
198
|
+
``to_audit_dict()`` export. The control plane captures those records per background job into a
|
|
199
|
+
**Logs** page with severity, dataset/task and research-project filters — see the
|
|
200
|
+
`telemetry contract <https://sksurrogate.readthedocs.io/en/latest/telemetry.html>`_,
|
|
201
|
+
the `log endpoints <https://sksurrogate.readthedocs.io/en/latest/controlplane.html>`_
|
|
202
|
+
and the `UI manual <https://sksurrogate.readthedocs.io/en/latest/ui-manual.html>`_.
|
|
203
|
+
|
|
204
|
+
Serve what you built
|
|
205
|
+
--------------------
|
|
206
|
+
A finished run leaves a portable ``ModelBundle`` behind: a schema-checked input contract, a
|
|
207
|
+
``prediction``/``model_version``/``request_id`` output frame, and atomic CSV writes — scoreable
|
|
208
|
+
in batch through ``SKSurrogate.predict_batch`` or the ``sksurrogate-batch-predict`` CLI, or
|
|
209
|
+
online through the dependency-free ``SKSurrogate.serve`` WSGI adapter. In the control plane you
|
|
210
|
+
declare which model a task serves: a **serving pin** naming either an exact model version
|
|
211
|
+
(frozen, later promotions leave it alone) or a registry alias (follows promote/rollback), after
|
|
212
|
+
which clients score through ``POST /api/serving/{task}/predict`` without naming a model at all
|
|
213
|
+
(409 while nothing is served). The web UI states the same declaration: a
|
|
214
|
+
``Serving <version> · <task>`` pill in the top bar while a model is served, and a **Serving**
|
|
215
|
+
card on the Inference page that sets, replaces and stops it. See the
|
|
216
|
+
`inference guide <https://sksurrogate.readthedocs.io/en/latest/inference.html>`_ and the
|
|
217
|
+
`control-plane guide <https://sksurrogate.readthedocs.io/en/latest/controlplane.html>`_.
|
|
218
|
+
|
|
219
|
+
Trained bundles can also be combined into one model with scikit-learn's own meta-estimators —
|
|
220
|
+
voting, averaging, stacking, bagging and boosting over a selection of models — from the
|
|
221
|
+
library (``SKSurrogate.ensembling``), the ``/api/ensembles`` routes or the web UI's
|
|
222
|
+
**Ensembles** page. The result is an ordinary bundle, so the same evaluation, registry and
|
|
223
|
+
serving paths apply to it; its reported scores carry the caveat that member selection was made
|
|
224
|
+
on the same data.
|
|
225
|
+
|
|
226
|
+
A combination can then be refined: every member's probabilities can be **calibrated**
|
|
227
|
+
(Platt/isotonic, with the Brier score and log loss recorded before and after on identical
|
|
228
|
+
folds), the member **weights can be fitted** on out-of-fold member output (a convex simplex
|
|
229
|
+
least-squares, a random search over the task's metric, or Caruana greedy selection), and the
|
|
230
|
+
whole procedure can be re-priced by an **honest nested estimate** that refits the members, the
|
|
231
|
+
calibration and the weight search inside every outer fold. See the
|
|
232
|
+
`combining-models guide <https://sksurrogate.readthedocs.io/en/latest/ensembles.html>`_.
|
|
233
|
+
|
|
234
|
+
Quick start
|
|
235
|
+
-----------
|
|
236
|
+
``SurrogateRandomCV`` is a drop-in for ``RandomizedSearchCV``; ranges can be written as plain
|
|
237
|
+
tuples (integers or floats) and lists (categorical values)::
|
|
238
|
+
|
|
239
|
+
from sklearn.svm import SVC
|
|
240
|
+
from SKSurrogate import SurrogateRandomCV
|
|
241
|
+
|
|
242
|
+
search = SurrogateRandomCV(
|
|
243
|
+
SVC(),
|
|
244
|
+
param_distributions={"C": (1e-3, 10.0), "kernel": ["poly", "rbf"], "degree": (1, 4)},
|
|
245
|
+
n_iter=30,
|
|
246
|
+
).fit(X, y)
|
|
247
|
+
search.best_params_, search.best_score_
|
|
248
|
+
|
|
249
|
+
For automatic pipeline design, ``AML(preset="classification").fit(X, y)`` (or
|
|
250
|
+
``preset="regression"``) needs no search configuration. For pandas DataFrames,
|
|
251
|
+
the preset automatically fits numeric, categorical, datetime, and text
|
|
252
|
+
preprocessing inside each cross-validation fold when ``cat_cols`` is omitted.
|
|
253
|
+
Array-like inputs should already be numeric; ``cat_cols`` retains the explicit
|
|
254
|
+
categorical-encoding path. ``fit(X, y, strategy="eoa")`` selects evolutionary
|
|
255
|
+
search.
|
|
256
|
+
|
|
257
|
+
More workflows are covered in the
|
|
258
|
+
`surrogate-search guide <https://sksurrogate.readthedocs.io/en/latest/surrogate.html>`_,
|
|
259
|
+
`preprocessing guide <https://sksurrogate.readthedocs.io/en/latest/dataproc.html>`_,
|
|
260
|
+
`scientific workflow guide <https://sksurrogate.readthedocs.io/en/latest/mltrace.html>`_,
|
|
261
|
+
`experiment design guide <https://sksurrogate.readthedocs.io/en/latest/experiment-design.html>`_,
|
|
262
|
+
`research projects guide <https://sksurrogate.readthedocs.io/en/latest/research-projects.html>`_,
|
|
263
|
+
and `monitoring guide <https://sksurrogate.readthedocs.io/en/latest/monitoring.html>`_.
|
|
264
|
+
For the API and UI, see the
|
|
265
|
+
`control-plane guide <https://sksurrogate.readthedocs.io/en/latest/controlplane.html>`_
|
|
266
|
+
`UI manual <https://sksurrogate.readthedocs.io/en/latest/ui-manual.html>`_ and
|
|
267
|
+
`worked example with screenshots <https://sksurrogate.readthedocs.io/en/latest/walkthrough.html>`_.
|
|
268
|
+
|
|
269
|
+
Run the web UI and API with Docker
|
|
270
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
271
|
+
|
|
272
|
+
A prebuilt image of the current release is published on Docker Hub as
|
|
273
|
+
``mghasemi/sksurrogate`` (`overview <https://hub.docker.com/r/mghasemi/sksurrogate/>`_)::
|
|
274
|
+
|
|
275
|
+
docker run --rm -p 8013:8013 -v sksurrogate-data:/data mghasemi/sksurrogate:latest # UI and API on http://localhost:8013
|
|
276
|
+
|
|
277
|
+
Datasets, experiments, logs and model bundles live in the named volume mounted at
|
|
278
|
+
``/data``; the image ships no user data. On first use ``docker run`` pulls the image
|
|
279
|
+
automatically; to upgrade an existing deployment to a new release, re-pull first —
|
|
280
|
+
``run`` will not refresh a cached copy (or pin a version tag such as ``0.8.0``)::
|
|
281
|
+
|
|
282
|
+
docker pull mghasemi/sksurrogate:latest
|
|
283
|
+
|
|
284
|
+
From a source checkout (Docker with Compose required)::
|
|
285
|
+
|
|
286
|
+
docker compose --profile prod up --build -d # UI and API on http://localhost:8013
|
|
287
|
+
docker compose --profile dev up --build # hot reload; UI on http://localhost:5174
|
|
288
|
+
|
|
289
|
+
Set ``SKSURROGATE_PORT`` to change the port and ``SKSURROGATE_API_KEY`` to
|
|
290
|
+
require an API key; for any published port also set
|
|
291
|
+
``SKSURROGATE_REQUIRE_AUTH=1`` so the container refuses to start without a key.
|
|
292
|
+
With ``SKSURROGATE_REQUIRE_AUTH`` enabled the UI asks for a username and
|
|
293
|
+
password instead, and every dataset, bundle and project belongs to an account
|
|
294
|
+
that can share it with others; bootstrap the first administrator with
|
|
295
|
+
``SKSURROGATE_ADMIN_USERNAME``/``SKSURROGATE_ADMIN_PASSWORD`` or
|
|
296
|
+
``python -m api.auth_cli create-admin``, then create per-user API keys in
|
|
297
|
+
**Settings → API keys**. Data persists in the ``sksurrogate-data`` volume. See
|
|
298
|
+
the `control-plane guide <https://sksurrogate.readthedocs.io/en/latest/controlplane.html>`_
|
|
299
|
+
and the `authentication and sharing chapter
|
|
300
|
+
<https://sksurrogate.readthedocs.io/en/latest/auth-and-sharing.html>`_ for details.
|
|
301
|
+
|
|
302
|
+
Benchmarks
|
|
303
|
+
----------
|
|
304
|
+
The surrogate-guided search is validated against strong HPO/AutoML baselines at **equal
|
|
305
|
+
evaluation budgets** (candidate-model evaluations, not wall-clock). Mean final cross-validated
|
|
306
|
+
accuracy over 7 seeds at a budget of 30 evaluations (full protocol, figures, and the raw-results
|
|
307
|
+
archive DOI `10.5281/zenodo.23629024 <https://doi.org/10.5281/zenodo.23629024>`_ are in
|
|
308
|
+
`docs/benchmarks.md <docs/benchmarks.md>`_):
|
|
309
|
+
|
|
310
|
+
+------------+----------------------------+--------------+--------+------------+
|
|
311
|
+
| dataset | SKSurrogate (RBF-GP, v0.2) | no surrogate | random | Optuna-TPE |
|
|
312
|
+
+============+============================+==============+========+============+
|
|
313
|
+
| arrhythmia | 0.7020 | 0.6910 | 0.6941 | **0.7036** |
|
|
314
|
+
+------------+----------------------------+--------------+--------+------------+
|
|
315
|
+
| credit-g | 0.7423 | 0.7391 | 0.7405 | **0.7436** |
|
|
316
|
+
+------------+----------------------------+--------------+--------+------------+
|
|
317
|
+
| galaxy3 | 0.6473 | 0.6448 | 0.6484 | **0.6507** |
|
|
318
|
+
+------------+----------------------------+--------------+--------+------------+
|
|
319
|
+
| ionosphere | **0.9352** | 0.9347 | 0.9347 | 0.9337 |
|
|
320
|
+
+------------+----------------------------+--------------+--------+------------+
|
|
321
|
+
| optdigits | 0.9403 | 0.9392 | 0.9380 | **0.9405** |
|
|
322
|
+
+------------+----------------------------+--------------+--------+------------+
|
|
323
|
+
| spambase | 0.9280 | 0.9269 | 0.9272 | **0.9286** |
|
|
324
|
+
+------------+----------------------------+--------------+--------+------------+
|
|
325
|
+
|
|
326
|
+
The RBF-GP response surface matches the top baseline within ~0.002 on every dataset and edges
|
|
327
|
+
it out on the hardest case (ionosphere); the with-vs-without surrogate ablation
|
|
328
|
+
(``srs-no-surrogate``) shows the surrogate raises or matches final accuracy on every dataset.
|
|
329
|
+
At the extended budget of 60 evaluations, SKSurrogate (RBF-GP) leads all six datasets.
|
|
330
|
+
Median-evaluations-to-target and seed-averaged best-so-far curves are in the benchmark report.
|
|
331
|
+
|
|
332
|
+
Optimize with confidence: detect drift before inference
|
|
333
|
+
-------------------------------------------------------
|
|
334
|
+
``SKSurrogate`` records a deterministic dataset fingerprint and a JSON-serializable schema for
|
|
335
|
+
each tracked dataset. Each call to ``mltrack.register_data(...)`` stores dataset metadata,
|
|
336
|
+
including the target column, row count, column names, dtypes, nullability, and categorical
|
|
337
|
+
values. This lets a run be identified and later compared against a different dataset or a
|
|
338
|
+
refreshed training sample — a differentiator that Optuna, TPOT, and SMAC all lack, because they
|
|
339
|
+
ignore data identity entirely.
|
|
340
|
+
|
|
341
|
+
The tracker also exposes ``validate_data(...)`` and ``validate_prediction_data(...)`` to compare
|
|
342
|
+
incoming data against the stored schema before training or inference. By default the checks are
|
|
343
|
+
strict: missing columns, reordered columns, dtype mismatches, and unknown categorical values
|
|
344
|
+
fail with actionable errors. For compatibility workflows, these checks can be relaxed explicitly
|
|
345
|
+
with ``missing_columns='ignore'`` or ``unknown_categories='ignore'``.
|
|
346
|
+
|
|
347
|
+
The intended workflow is:
|
|
348
|
+
|
|
349
|
+
1. Register the training dataset with ``mltrack.register_data(frame, target)``.
|
|
350
|
+
2. Validate training data before fitting with ``tracker.validate_data(frame, target=...)``.
|
|
351
|
+
3. Validate prediction inputs with ``tracker.validate_prediction_data(frame)`` before calling
|
|
352
|
+
``predict`` on a model or pipeline.
|
|
353
|
+
4. Use the stored ``dataset_fingerprint`` and ``dataset_schema`` metadata for reproducibility,
|
|
354
|
+
drift checks, and auditability.
|
|
355
|
+
|
|
356
|
+
Installation
|
|
357
|
+
------------
|
|
358
|
+
From PyPI::
|
|
359
|
+
|
|
360
|
+
pip install sksurrogate
|
|
361
|
+
|
|
362
|
+
or from source (development)::
|
|
363
|
+
|
|
364
|
+
pip install git+https://github.com/mghasemi/sksurrogate.git
|
|
365
|
+
|
|
366
|
+
The base install is intentionally small: it pulls seven packages
|
|
367
|
+
(``numpy``, ``scipy``, ``pandas``, ``scikit-learn``, ``joblib``, ``peewee``,
|
|
368
|
+
``tqdm``) and nothing compiled beyond scikit-learn. Measured on Python 3.12,
|
|
369
|
+
a cold resolveless install takes ~7 s / 250 MB of site-packages, and
|
|
370
|
+
``import SKSurrogate`` takes ~0.55 s.
|
|
371
|
+
|
|
372
|
+
Optional extras
|
|
373
|
+
---------------
|
|
374
|
+
Every other backend is imported lazily and installed through an extra. Naming a
|
|
375
|
+
component whose backend is absent raises an error that names the extra::
|
|
376
|
+
|
|
377
|
+
SKSurrogate needs the optional package 'xgboost' for the XGBoost estimator, but it is not installed.
|
|
378
|
+
Install it with: pip install "sksurrogate[xgboost]"
|
|
379
|
+
|
|
380
|
+
.. list-table::
|
|
381
|
+
:header-rows: 1
|
|
382
|
+
|
|
383
|
+
* - Extra
|
|
384
|
+
- Adds
|
|
385
|
+
- Needed for
|
|
386
|
+
* - ``[lightgbm]`` / ``[xgboost]`` / ``[rgf]``
|
|
387
|
+
- one boosting backend each
|
|
388
|
+
- the corresponding catalog rows
|
|
389
|
+
* - ``[gbm]``
|
|
390
|
+
- lightgbm + xgboost
|
|
391
|
+
- both tree-boosting families
|
|
392
|
+
* - ``[estimators]``
|
|
393
|
+
- gbm + rgf + category-encoders
|
|
394
|
+
- the full estimator library
|
|
395
|
+
* - ``[sensitivity]``
|
|
396
|
+
- SALib
|
|
397
|
+
- ``SensAprx`` (Sobol / Morris / delta)
|
|
398
|
+
* - ``[explain]``
|
|
399
|
+
- eli5, skrebate
|
|
400
|
+
- permutation-importance and ReliefF/SURF feature weights
|
|
401
|
+
* - ``[imbalance]``
|
|
402
|
+
- imbalanced-learn
|
|
403
|
+
- sampler steps in a pipeline
|
|
404
|
+
* - ``[categorical]``
|
|
405
|
+
- category-encoders
|
|
406
|
+
- ``cat_cols`` encoding
|
|
407
|
+
* - ``[plots]``
|
|
408
|
+
- matplotlib
|
|
409
|
+
- diagnostic plots
|
|
410
|
+
* - ``[api]`` / ``[ui]``
|
|
411
|
+
- FastAPI, uvicorn, python-multipart
|
|
412
|
+
- the control-plane API and web UI (see the
|
|
413
|
+
`guide <https://sksurrogate.readthedocs.io/en/latest/controlplane.html>`_)
|
|
414
|
+
* - ``[dask]``
|
|
415
|
+
- dask[distributed]
|
|
416
|
+
- the distributed execution backend
|
|
417
|
+
* - ``[all]``
|
|
418
|
+
- every extra above
|
|
419
|
+
- CI, Docker, "just make everything work" (~938 MB)
|
|
420
|
+
* - ``[mcp]``
|
|
421
|
+
- httpx, the MCP Python SDK
|
|
422
|
+
- the agent-facing MCP server (console script ``sksurrogate-mcp``). Kept
|
|
423
|
+
out of ``[all]`` so container images stay SDK-free; see the
|
|
424
|
+
`MCP chapter <https://sksurrogate.readthedocs.io/en/latest/mcp-server.html>`_
|
|
425
|
+
|
|
426
|
+
``[automl]`` (AutoGluon + PyTorch) is kept separate on purpose: it is multi-GB
|
|
427
|
+
and only used by the benchmark studies.
|
|
428
|
+
|
|
429
|
+
Dependencies
|
|
430
|
+
----------------
|
|
431
|
+
``SKSurrogate`` depends on `NumPy <http://www.numpy.org/>`_,
|
|
432
|
+
`scipy <https://www.scipy.org/>`_, and `scikit-learn <https://scikit-learn.org/stable/>`_,
|
|
433
|
+
for its main functionalities, plus `pandas <https://pandas.pydata.org/>`_,
|
|
434
|
+
`joblib <https://joblib.readthedocs.io/>`_, `peewee <https://github.com/coleifer/peewee>`_
|
|
435
|
+
(the run tracker's SQLite ORM) and `tqdm <https://github.com/tqdm/tqdm>`_.
|
|
436
|
+
Everything else — `matplotlib <https://matplotlib.org/>`_,
|
|
437
|
+
`SALib <https://github.com/SALib/SALib>`_, LightGBM, XGBoost, RGF, eli5,
|
|
438
|
+
skrebate, imbalanced-learn, category-encoders — is an optional extra, imported
|
|
439
|
+
only by the code path that uses it.
|
|
440
|
+
|
|
441
|
+
Documentation
|
|
442
|
+
----------------
|
|
443
|
+
The documentation is produced by `Sphinx <http://www.sphinx-doc.org/en/stable/>`_ and is intended to cover code usage
|
|
444
|
+
as well as a bit of theory to explain each method briefly.
|
|
445
|
+
For more details refer to the documentation at `sksurrogate.rtfd.io <http://sksurrogate.readthedocs.io/>`_.
|
|
446
|
+
|
|
447
|
+
License
|
|
448
|
+
================
|
|
449
|
+
This code is distributed under `MIT license <https://en.wikipedia.org/wiki/MIT_License>`_:
|
|
450
|
+
|
|
451
|
+
MIT License
|
|
452
|
+
----------------
|
|
453
|
+
|
|
454
|
+
Copyright (c) 2019--2026 Mehdi Ghasemi
|
|
455
|
+
|
|
456
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
457
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
458
|
+
in the Software without restriction, including without limitation the rights
|
|
459
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
460
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
461
|
+
furnished to do so, subject to the following conditions:
|
|
462
|
+
|
|
463
|
+
The above copyright notice and this permission notice shall be included in all
|
|
464
|
+
copies or substantial portions of the Software.
|
|
465
|
+
|
|
466
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
467
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
468
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
469
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
470
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
471
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
472
|
+
SOFTWARE.
|
|
473
|
+
|
|
474
|
+
.. |Logo| image:: ./docs/images/funnel.png
|
|
475
|
+
.. |CI| image:: https://github.com/mghasemi/sksurrogate/actions/workflows/ci.yml/badge.svg?branch=master
|
|
476
|
+
:target: https://github.com/mghasemi/sksurrogate/actions/workflows/ci.yml
|
|
477
|
+
.. |Doc| image:: https://readthedocs.org/projects/sksurrogate/badge/?version=latest
|
|
478
|
+
:target: https://sksurrogate.readthedocs.io/en/latest/?badge=latest
|
|
479
|
+
:alt: Documentation Status
|
|
480
|
+
.. |Licence| image:: https://img.shields.io/badge/license-MIT-blue.svg
|
|
481
|
+
:target: https://github.com/mghasemi/sksurrogate/blob/master/LICENSE
|