ins-pricing 0.1.11__py3-none-any.whl → 0.2.0__py3-none-any.whl
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.
- ins_pricing/README.md +9 -6
- ins_pricing/__init__.py +3 -11
- ins_pricing/cli/BayesOpt_entry.py +24 -0
- ins_pricing/{modelling → cli}/BayesOpt_incremental.py +197 -64
- ins_pricing/cli/Explain_Run.py +25 -0
- ins_pricing/{modelling → cli}/Explain_entry.py +169 -124
- ins_pricing/cli/Pricing_Run.py +25 -0
- ins_pricing/cli/__init__.py +1 -0
- ins_pricing/cli/bayesopt_entry_runner.py +1312 -0
- ins_pricing/cli/utils/__init__.py +1 -0
- ins_pricing/cli/utils/cli_common.py +320 -0
- ins_pricing/cli/utils/cli_config.py +375 -0
- ins_pricing/{modelling → cli/utils}/notebook_utils.py +74 -19
- {ins_pricing_gemini/modelling → ins_pricing/cli}/watchdog_run.py +2 -2
- ins_pricing/{modelling → docs/modelling}/BayesOpt_USAGE.md +69 -49
- ins_pricing/docs/modelling/README.md +34 -0
- ins_pricing/modelling/__init__.py +57 -6
- ins_pricing/modelling/core/__init__.py +1 -0
- ins_pricing/modelling/{bayesopt → core/bayesopt}/config_preprocess.py +64 -1
- ins_pricing/modelling/{bayesopt → core/bayesopt}/core.py +150 -810
- ins_pricing/modelling/core/bayesopt/model_explain_mixin.py +296 -0
- ins_pricing/modelling/core/bayesopt/model_plotting_mixin.py +548 -0
- ins_pricing/modelling/core/bayesopt/models/__init__.py +27 -0
- ins_pricing/modelling/core/bayesopt/models/model_ft_components.py +316 -0
- ins_pricing/modelling/core/bayesopt/models/model_ft_trainer.py +808 -0
- ins_pricing/modelling/core/bayesopt/models/model_gnn.py +675 -0
- ins_pricing/modelling/core/bayesopt/models/model_resn.py +435 -0
- ins_pricing/modelling/core/bayesopt/trainers/__init__.py +19 -0
- ins_pricing/modelling/core/bayesopt/trainers/trainer_base.py +1020 -0
- ins_pricing/modelling/core/bayesopt/trainers/trainer_ft.py +787 -0
- ins_pricing/modelling/core/bayesopt/trainers/trainer_glm.py +195 -0
- ins_pricing/modelling/core/bayesopt/trainers/trainer_gnn.py +312 -0
- ins_pricing/modelling/core/bayesopt/trainers/trainer_resn.py +261 -0
- ins_pricing/modelling/core/bayesopt/trainers/trainer_xgb.py +348 -0
- ins_pricing/modelling/{bayesopt → core/bayesopt}/utils.py +2 -2
- ins_pricing/modelling/core/evaluation.py +115 -0
- ins_pricing/production/__init__.py +4 -0
- ins_pricing/production/preprocess.py +71 -0
- ins_pricing/setup.py +10 -5
- {ins_pricing_gemini/modelling/tests → ins_pricing/tests/modelling}/test_plotting.py +2 -2
- {ins_pricing-0.1.11.dist-info → ins_pricing-0.2.0.dist-info}/METADATA +4 -4
- ins_pricing-0.2.0.dist-info/RECORD +125 -0
- {ins_pricing-0.1.11.dist-info → ins_pricing-0.2.0.dist-info}/top_level.txt +0 -1
- ins_pricing/modelling/BayesOpt_entry.py +0 -633
- ins_pricing/modelling/Explain_Run.py +0 -36
- ins_pricing/modelling/Pricing_Run.py +0 -36
- ins_pricing/modelling/README.md +0 -33
- ins_pricing/modelling/bayesopt/models.py +0 -2196
- ins_pricing/modelling/bayesopt/trainers.py +0 -2446
- ins_pricing/modelling/cli_common.py +0 -136
- ins_pricing/modelling/tests/test_plotting.py +0 -63
- ins_pricing/modelling/watchdog_run.py +0 -211
- ins_pricing-0.1.11.dist-info/RECORD +0 -169
- ins_pricing_gemini/__init__.py +0 -23
- ins_pricing_gemini/governance/__init__.py +0 -20
- ins_pricing_gemini/governance/approval.py +0 -93
- ins_pricing_gemini/governance/audit.py +0 -37
- ins_pricing_gemini/governance/registry.py +0 -99
- ins_pricing_gemini/governance/release.py +0 -159
- ins_pricing_gemini/modelling/Explain_Run.py +0 -36
- ins_pricing_gemini/modelling/Pricing_Run.py +0 -36
- ins_pricing_gemini/modelling/__init__.py +0 -151
- ins_pricing_gemini/modelling/cli_common.py +0 -141
- ins_pricing_gemini/modelling/config.py +0 -249
- ins_pricing_gemini/modelling/config_preprocess.py +0 -254
- ins_pricing_gemini/modelling/core.py +0 -741
- ins_pricing_gemini/modelling/data_container.py +0 -42
- ins_pricing_gemini/modelling/explain/__init__.py +0 -55
- ins_pricing_gemini/modelling/explain/gradients.py +0 -334
- ins_pricing_gemini/modelling/explain/metrics.py +0 -176
- ins_pricing_gemini/modelling/explain/permutation.py +0 -155
- ins_pricing_gemini/modelling/explain/shap_utils.py +0 -146
- ins_pricing_gemini/modelling/features.py +0 -215
- ins_pricing_gemini/modelling/model_manager.py +0 -148
- ins_pricing_gemini/modelling/model_plotting.py +0 -463
- ins_pricing_gemini/modelling/models.py +0 -2203
- ins_pricing_gemini/modelling/notebook_utils.py +0 -294
- ins_pricing_gemini/modelling/plotting/__init__.py +0 -45
- ins_pricing_gemini/modelling/plotting/common.py +0 -63
- ins_pricing_gemini/modelling/plotting/curves.py +0 -572
- ins_pricing_gemini/modelling/plotting/diagnostics.py +0 -139
- ins_pricing_gemini/modelling/plotting/geo.py +0 -362
- ins_pricing_gemini/modelling/plotting/importance.py +0 -121
- ins_pricing_gemini/modelling/run_logging.py +0 -133
- ins_pricing_gemini/modelling/tests/conftest.py +0 -8
- ins_pricing_gemini/modelling/tests/test_cross_val_generic.py +0 -66
- ins_pricing_gemini/modelling/tests/test_distributed_utils.py +0 -18
- ins_pricing_gemini/modelling/tests/test_explain.py +0 -56
- ins_pricing_gemini/modelling/tests/test_geo_tokens_split.py +0 -49
- ins_pricing_gemini/modelling/tests/test_graph_cache.py +0 -33
- ins_pricing_gemini/modelling/tests/test_plotting_library.py +0 -150
- ins_pricing_gemini/modelling/tests/test_preprocessor.py +0 -48
- ins_pricing_gemini/modelling/trainers.py +0 -2447
- ins_pricing_gemini/modelling/utils.py +0 -1020
- ins_pricing_gemini/pricing/__init__.py +0 -27
- ins_pricing_gemini/pricing/calibration.py +0 -39
- ins_pricing_gemini/pricing/data_quality.py +0 -117
- ins_pricing_gemini/pricing/exposure.py +0 -85
- ins_pricing_gemini/pricing/factors.py +0 -91
- ins_pricing_gemini/pricing/monitoring.py +0 -99
- ins_pricing_gemini/pricing/rate_table.py +0 -78
- ins_pricing_gemini/production/__init__.py +0 -21
- ins_pricing_gemini/production/drift.py +0 -30
- ins_pricing_gemini/production/monitoring.py +0 -143
- ins_pricing_gemini/production/scoring.py +0 -40
- ins_pricing_gemini/reporting/__init__.py +0 -11
- ins_pricing_gemini/reporting/report_builder.py +0 -72
- ins_pricing_gemini/reporting/scheduler.py +0 -45
- ins_pricing_gemini/scripts/BayesOpt_incremental.py +0 -722
- ins_pricing_gemini/scripts/Explain_entry.py +0 -545
- ins_pricing_gemini/scripts/__init__.py +0 -1
- ins_pricing_gemini/scripts/train.py +0 -568
- ins_pricing_gemini/setup.py +0 -55
- ins_pricing_gemini/smoke_test.py +0 -28
- /ins_pricing/{modelling → cli/utils}/run_logging.py +0 -0
- /ins_pricing/modelling/{BayesOpt.py → core/BayesOpt.py} +0 -0
- /ins_pricing/modelling/{bayesopt → core/bayesopt}/__init__.py +0 -0
- /ins_pricing/{modelling/tests → tests/modelling}/conftest.py +0 -0
- /ins_pricing/{modelling/tests → tests/modelling}/test_cross_val_generic.py +0 -0
- /ins_pricing/{modelling/tests → tests/modelling}/test_distributed_utils.py +0 -0
- /ins_pricing/{modelling/tests → tests/modelling}/test_explain.py +0 -0
- /ins_pricing/{modelling/tests → tests/modelling}/test_geo_tokens_split.py +0 -0
- /ins_pricing/{modelling/tests → tests/modelling}/test_graph_cache.py +0 -0
- /ins_pricing/{modelling/tests → tests/modelling}/test_plotting_library.py +0 -0
- /ins_pricing/{modelling/tests → tests/modelling}/test_preprocessor.py +0 -0
- {ins_pricing-0.1.11.dist-info → ins_pricing-0.2.0.dist-info}/WHEEL +0 -0
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
import json
|
|
4
|
-
import os
|
|
5
|
-
from pathlib import Path
|
|
6
|
-
from typing import Any, Dict, Iterable, List, Optional, Sequence, Tuple
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
PLOT_MODEL_LABELS: Dict[str, Tuple[str, str]] = {
|
|
10
|
-
"glm": ("GLM", "pred_glm"),
|
|
11
|
-
"xgb": ("Xgboost", "pred_xgb"),
|
|
12
|
-
"resn": ("ResNet", "pred_resn"),
|
|
13
|
-
"ft": ("FTTransformer", "pred_ft"),
|
|
14
|
-
"gnn": ("GNN", "pred_gnn"),
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
PYTORCH_TRAINERS = {"resn", "ft", "gnn"}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
def dedupe_preserve_order(items: Iterable[str]) -> List[str]:
|
|
21
|
-
seen = set()
|
|
22
|
-
unique: List[str] = []
|
|
23
|
-
for item in items:
|
|
24
|
-
if item not in seen:
|
|
25
|
-
unique.append(item)
|
|
26
|
-
seen.add(item)
|
|
27
|
-
return unique
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
def build_model_names(prefixes: Sequence[str], suffixes: Sequence[str]) -> List[str]:
|
|
31
|
-
names: List[str] = []
|
|
32
|
-
for suffix in suffixes:
|
|
33
|
-
names.extend(f"{prefix}_{suffix}" for prefix in prefixes)
|
|
34
|
-
return names
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
def parse_model_pairs(raw_pairs: List) -> List[Tuple[str, str]]:
|
|
38
|
-
pairs: List[Tuple[str, str]] = []
|
|
39
|
-
for pair in raw_pairs:
|
|
40
|
-
if isinstance(pair, (list, tuple)) and len(pair) == 2:
|
|
41
|
-
pairs.append((str(pair[0]), str(pair[1])))
|
|
42
|
-
elif isinstance(pair, str):
|
|
43
|
-
parts = [p.strip() for p in pair.split(",") if p.strip()]
|
|
44
|
-
if len(parts) == 2:
|
|
45
|
-
pairs.append((parts[0], parts[1]))
|
|
46
|
-
return pairs
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
def resolve_path(value: Optional[str], base_dir: Path) -> Optional[Path]:
|
|
50
|
-
if value is None:
|
|
51
|
-
return None
|
|
52
|
-
if not isinstance(value, str) or not value.strip():
|
|
53
|
-
return None
|
|
54
|
-
p = Path(value)
|
|
55
|
-
if p.is_absolute():
|
|
56
|
-
return p
|
|
57
|
-
return (base_dir / p).resolve()
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
def resolve_config_path(raw: str, script_dir: Path) -> Path:
|
|
61
|
-
candidate = Path(raw)
|
|
62
|
-
if candidate.exists():
|
|
63
|
-
return candidate.resolve()
|
|
64
|
-
candidate2 = (script_dir / raw)
|
|
65
|
-
if candidate2.exists():
|
|
66
|
-
return candidate2.resolve()
|
|
67
|
-
raise FileNotFoundError(
|
|
68
|
-
f"Config file not found: {raw}. Tried: {Path(raw).resolve()} and {candidate2.resolve()}"
|
|
69
|
-
)
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
def load_config_json(path: Path, required_keys: Sequence[str]) -> Dict[str, Any]:
|
|
73
|
-
cfg = json.loads(path.read_text(encoding="utf-8"))
|
|
74
|
-
missing = [key for key in required_keys if key not in cfg]
|
|
75
|
-
if missing:
|
|
76
|
-
raise ValueError(f"Missing required keys in {path}: {missing}")
|
|
77
|
-
return cfg
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
def set_env(env_overrides: Dict[str, Any]) -> None:
|
|
81
|
-
"""Apply environment variables from config.json.
|
|
82
|
-
|
|
83
|
-
Notes (DDP/Optuna hang debugging):
|
|
84
|
-
- You can add these keys into config.json's `env` to debug distributed hangs:
|
|
85
|
-
- `TORCH_DISTRIBUTED_DEBUG=DETAIL`
|
|
86
|
-
- `NCCL_DEBUG=INFO`
|
|
87
|
-
- `BAYESOPT_DDP_BARRIER_DEBUG=1`
|
|
88
|
-
- `BAYESOPT_DDP_BARRIER_TIMEOUT=300`
|
|
89
|
-
- `BAYESOPT_CUDA_SYNC=1` (optional; can slow down)
|
|
90
|
-
- `BAYESOPT_CUDA_IPC_COLLECT=1` (optional; can slow down)
|
|
91
|
-
- This function uses `os.environ.setdefault`, so a value already set in the
|
|
92
|
-
shell will take precedence over config.json.
|
|
93
|
-
"""
|
|
94
|
-
for key, value in (env_overrides or {}).items():
|
|
95
|
-
os.environ.setdefault(str(key), str(value))
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
def _looks_like_url(value: str) -> bool:
|
|
99
|
-
value = str(value)
|
|
100
|
-
return "://" in value
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
def normalize_config_paths(cfg: Dict[str, Any], config_path: Path) -> Dict[str, Any]:
|
|
104
|
-
"""Resolve relative paths against the config.json directory.
|
|
105
|
-
|
|
106
|
-
Fields handled:
|
|
107
|
-
- data_dir / output_dir / optuna_storage / gnn_graph_cache
|
|
108
|
-
- best_params_files (dict: model_key -> path)
|
|
109
|
-
"""
|
|
110
|
-
base_dir = config_path.parent
|
|
111
|
-
out = dict(cfg)
|
|
112
|
-
|
|
113
|
-
for key in ("data_dir", "output_dir", "gnn_graph_cache"):
|
|
114
|
-
if key in out and isinstance(out.get(key), str):
|
|
115
|
-
resolved = resolve_path(out.get(key), base_dir)
|
|
116
|
-
if resolved is not None:
|
|
117
|
-
out[key] = str(resolved)
|
|
118
|
-
|
|
119
|
-
storage = out.get("optuna_storage")
|
|
120
|
-
if isinstance(storage, str) and storage.strip():
|
|
121
|
-
if not _looks_like_url(storage):
|
|
122
|
-
resolved = resolve_path(storage, base_dir)
|
|
123
|
-
if resolved is not None:
|
|
124
|
-
out["optuna_storage"] = str(resolved)
|
|
125
|
-
|
|
126
|
-
best_files = out.get("best_params_files")
|
|
127
|
-
if isinstance(best_files, dict):
|
|
128
|
-
resolved_map: Dict[str, str] = {}
|
|
129
|
-
for mk, path_str in best_files.items():
|
|
130
|
-
if not isinstance(path_str, str):
|
|
131
|
-
continue
|
|
132
|
-
resolved = resolve_path(path_str, base_dir)
|
|
133
|
-
resolved_map[str(mk)] = str(resolved) if resolved is not None else str(path_str)
|
|
134
|
-
out["best_params_files"] = resolved_map
|
|
135
|
-
|
|
136
|
-
return out
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
|
|
3
|
-
import numpy as np
|
|
4
|
-
import pandas as pd
|
|
5
|
-
import pytest
|
|
6
|
-
|
|
7
|
-
pytest.importorskip("torch")
|
|
8
|
-
pytest.importorskip("xgboost")
|
|
9
|
-
pytest.importorskip("optuna")
|
|
10
|
-
pytest.importorskip("statsmodels")
|
|
11
|
-
pytest.importorskip("shap")
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
def test_plotting_outputs(tmp_path, monkeypatch):
|
|
15
|
-
monkeypatch.setenv("MPLBACKEND", "Agg")
|
|
16
|
-
mpl_cfg = tmp_path / ".mplconfig"
|
|
17
|
-
cache_dir = tmp_path / ".cache"
|
|
18
|
-
(cache_dir / "fontconfig").mkdir(parents=True, exist_ok=True)
|
|
19
|
-
mpl_cfg.mkdir(parents=True, exist_ok=True)
|
|
20
|
-
monkeypatch.setenv("MPLCONFIGDIR", str(mpl_cfg))
|
|
21
|
-
monkeypatch.setenv("XDG_CACHE_HOME", str(cache_dir))
|
|
22
|
-
|
|
23
|
-
from ins_pricing.BayesOpt import BayesOptModel
|
|
24
|
-
import matplotlib.pyplot as plt
|
|
25
|
-
|
|
26
|
-
monkeypatch.setattr(plt, "show", lambda *args, **kwargs: None)
|
|
27
|
-
|
|
28
|
-
rng = np.random.default_rng(0)
|
|
29
|
-
train = pd.DataFrame(
|
|
30
|
-
{
|
|
31
|
-
"x1": rng.normal(size=30),
|
|
32
|
-
"y": rng.normal(size=30),
|
|
33
|
-
"w": rng.uniform(0.5, 1.5, size=30),
|
|
34
|
-
}
|
|
35
|
-
)
|
|
36
|
-
test = pd.DataFrame({"x1": rng.normal(size=20)})
|
|
37
|
-
|
|
38
|
-
model = BayesOptModel(
|
|
39
|
-
train,
|
|
40
|
-
test,
|
|
41
|
-
model_nme="demo",
|
|
42
|
-
resp_nme="y",
|
|
43
|
-
weight_nme="w",
|
|
44
|
-
factor_nmes=["x1"],
|
|
45
|
-
task_type="regression",
|
|
46
|
-
use_gpu=False,
|
|
47
|
-
output_dir=str(tmp_path),
|
|
48
|
-
)
|
|
49
|
-
|
|
50
|
-
for df in (model.train_data, model.test_data):
|
|
51
|
-
df["pred_xgb"] = rng.normal(size=len(df))
|
|
52
|
-
df["pred_resn"] = rng.normal(size=len(df))
|
|
53
|
-
df["w_pred_xgb"] = df["pred_xgb"] * df[model.weight_nme]
|
|
54
|
-
df["w_pred_resn"] = df["pred_resn"] * df[model.weight_nme]
|
|
55
|
-
|
|
56
|
-
model.plot_lift("Xgboost", "pred_xgb", n_bins=5)
|
|
57
|
-
model.plot_dlift(["xgb", "resn"], n_bins=5)
|
|
58
|
-
|
|
59
|
-
lift_path = tmp_path / "plot" / "01_demo_Xgboost_lift.png"
|
|
60
|
-
dlift_path = tmp_path / "plot" / "02_demo_dlift_xgb_vs_resn.png"
|
|
61
|
-
|
|
62
|
-
assert lift_path.exists()
|
|
63
|
-
assert dlift_path.exists()
|
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
import argparse
|
|
4
|
-
import os
|
|
5
|
-
import subprocess
|
|
6
|
-
import sys
|
|
7
|
-
import threading
|
|
8
|
-
import time
|
|
9
|
-
from typing import List, Optional
|
|
10
|
-
|
|
11
|
-
try:
|
|
12
|
-
from .run_logging import configure_run_logging # type: ignore
|
|
13
|
-
except Exception: # pragma: no cover
|
|
14
|
-
try:
|
|
15
|
-
from run_logging import configure_run_logging # type: ignore
|
|
16
|
-
except Exception: # pragma: no cover
|
|
17
|
-
configure_run_logging = None # type: ignore
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
def _split_argv(argv: List[str]) -> tuple[List[str], List[str]]:
|
|
21
|
-
if "--" not in argv:
|
|
22
|
-
raise ValueError("Missing '--' separator before the command to run.")
|
|
23
|
-
idx = argv.index("--")
|
|
24
|
-
return argv[:idx], argv[idx + 1 :]
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
def _kill_process_tree(pid: int) -> None:
|
|
28
|
-
if pid <= 0:
|
|
29
|
-
return
|
|
30
|
-
if os.name == "nt":
|
|
31
|
-
subprocess.run(
|
|
32
|
-
["taskkill", "/PID", str(pid), "/T", "/F"],
|
|
33
|
-
stdout=subprocess.DEVNULL,
|
|
34
|
-
stderr=subprocess.DEVNULL,
|
|
35
|
-
check=False,
|
|
36
|
-
)
|
|
37
|
-
return
|
|
38
|
-
try:
|
|
39
|
-
os.killpg(pid, 15)
|
|
40
|
-
time.sleep(2)
|
|
41
|
-
os.killpg(pid, 9)
|
|
42
|
-
except Exception:
|
|
43
|
-
try:
|
|
44
|
-
os.kill(pid, 9)
|
|
45
|
-
except Exception:
|
|
46
|
-
pass
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
def _reader_thread(
|
|
50
|
-
proc: subprocess.Popen, last_output_ts: dict, prefix: str = ""
|
|
51
|
-
) -> None:
|
|
52
|
-
assert proc.stdout is not None
|
|
53
|
-
for line in proc.stdout:
|
|
54
|
-
last_output_ts["ts"] = time.time()
|
|
55
|
-
if prefix:
|
|
56
|
-
sys.stdout.write(prefix)
|
|
57
|
-
sys.stdout.write(line)
|
|
58
|
-
sys.stdout.flush()
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
def _parse_args(before_cmd: List[str], cmd: List[str]) -> argparse.Namespace:
|
|
62
|
-
parser = argparse.ArgumentParser(
|
|
63
|
-
description=(
|
|
64
|
-
"Run a command under a simple watchdog: if there is no stdout/stderr "
|
|
65
|
-
"output for N seconds, kill the whole process tree and restart. "
|
|
66
|
-
"Designed to pair with optuna_storage so BayesOpt can resume."
|
|
67
|
-
)
|
|
68
|
-
)
|
|
69
|
-
parser.add_argument(
|
|
70
|
-
"--idle-seconds",
|
|
71
|
-
type=int,
|
|
72
|
-
default=7200,
|
|
73
|
-
help="Restart if there is no output for this many seconds (default: 7200).",
|
|
74
|
-
)
|
|
75
|
-
parser.add_argument(
|
|
76
|
-
"--max-restarts",
|
|
77
|
-
type=int,
|
|
78
|
-
default=50,
|
|
79
|
-
help="Maximum restart attempts (default: 50).",
|
|
80
|
-
)
|
|
81
|
-
parser.add_argument(
|
|
82
|
-
"--restart-delay-seconds",
|
|
83
|
-
type=int,
|
|
84
|
-
default=10,
|
|
85
|
-
help="Delay between restarts (default: 10).",
|
|
86
|
-
)
|
|
87
|
-
parser.add_argument(
|
|
88
|
-
"--stop-on-nonzero-exit",
|
|
89
|
-
action="store_true",
|
|
90
|
-
help="If the command exits non-zero, stop instead of restarting.",
|
|
91
|
-
)
|
|
92
|
-
args = parser.parse_args(before_cmd)
|
|
93
|
-
if not cmd:
|
|
94
|
-
parser.error("Empty command after '--'.")
|
|
95
|
-
return args
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
def run_with_watchdog(
|
|
99
|
-
cmd: List[str],
|
|
100
|
-
idle_seconds: int,
|
|
101
|
-
max_restarts: int,
|
|
102
|
-
restart_delay_seconds: int,
|
|
103
|
-
stop_on_nonzero_exit: bool,
|
|
104
|
-
) -> int:
|
|
105
|
-
idle_seconds = max(1, int(idle_seconds))
|
|
106
|
-
max_restarts = max(0, int(max_restarts))
|
|
107
|
-
restart_delay_seconds = max(0, int(restart_delay_seconds))
|
|
108
|
-
|
|
109
|
-
attempt = 0
|
|
110
|
-
while True:
|
|
111
|
-
attempt += 1
|
|
112
|
-
print(
|
|
113
|
-
f"[watchdog] start attempt={attempt} idle_seconds={idle_seconds} cmd={cmd}",
|
|
114
|
-
flush=True,
|
|
115
|
-
)
|
|
116
|
-
|
|
117
|
-
creationflags = 0
|
|
118
|
-
start_new_session = False
|
|
119
|
-
if os.name == "nt":
|
|
120
|
-
creationflags = getattr(subprocess, "CREATE_NEW_PROCESS_GROUP", 0)
|
|
121
|
-
else:
|
|
122
|
-
start_new_session = True
|
|
123
|
-
|
|
124
|
-
proc = subprocess.Popen(
|
|
125
|
-
cmd,
|
|
126
|
-
stdout=subprocess.PIPE,
|
|
127
|
-
stderr=subprocess.STDOUT,
|
|
128
|
-
text=True,
|
|
129
|
-
bufsize=1,
|
|
130
|
-
universal_newlines=True,
|
|
131
|
-
creationflags=creationflags,
|
|
132
|
-
start_new_session=start_new_session,
|
|
133
|
-
)
|
|
134
|
-
|
|
135
|
-
last_output_ts: dict = {"ts": time.time()}
|
|
136
|
-
reader = threading.Thread(
|
|
137
|
-
target=_reader_thread,
|
|
138
|
-
args=(proc, last_output_ts),
|
|
139
|
-
kwargs={"prefix": ""},
|
|
140
|
-
daemon=True,
|
|
141
|
-
)
|
|
142
|
-
reader.start()
|
|
143
|
-
|
|
144
|
-
killed_for_idle = False
|
|
145
|
-
exit_code: Optional[int] = None
|
|
146
|
-
while True:
|
|
147
|
-
exit_code = proc.poll()
|
|
148
|
-
if exit_code is not None:
|
|
149
|
-
break
|
|
150
|
-
idle_for = time.time() - float(last_output_ts["ts"])
|
|
151
|
-
if idle_for > idle_seconds:
|
|
152
|
-
killed_for_idle = True
|
|
153
|
-
print(
|
|
154
|
-
f"[watchdog] idle>{idle_seconds}s (idle_for={int(idle_for)}s), killing pid={proc.pid}",
|
|
155
|
-
flush=True,
|
|
156
|
-
)
|
|
157
|
-
_kill_process_tree(proc.pid)
|
|
158
|
-
break
|
|
159
|
-
time.sleep(5)
|
|
160
|
-
|
|
161
|
-
try:
|
|
162
|
-
proc.wait(timeout=30)
|
|
163
|
-
except Exception:
|
|
164
|
-
_kill_process_tree(proc.pid)
|
|
165
|
-
|
|
166
|
-
if exit_code is None:
|
|
167
|
-
exit_code = proc.poll() or 1
|
|
168
|
-
|
|
169
|
-
if exit_code == 0:
|
|
170
|
-
print("[watchdog] finished with exit_code=0", flush=True)
|
|
171
|
-
return 0
|
|
172
|
-
|
|
173
|
-
if stop_on_nonzero_exit and not killed_for_idle:
|
|
174
|
-
print(
|
|
175
|
-
f"[watchdog] command exited non-zero (exit_code={exit_code}); stop.",
|
|
176
|
-
flush=True,
|
|
177
|
-
)
|
|
178
|
-
return int(exit_code)
|
|
179
|
-
|
|
180
|
-
if attempt > max_restarts + 1:
|
|
181
|
-
print(
|
|
182
|
-
f"[watchdog] exceeded max_restarts={max_restarts}; last exit_code={exit_code}",
|
|
183
|
-
flush=True,
|
|
184
|
-
)
|
|
185
|
-
return int(exit_code)
|
|
186
|
-
|
|
187
|
-
print(
|
|
188
|
-
f"[watchdog] restart in {restart_delay_seconds}s (exit_code={exit_code}, killed_for_idle={killed_for_idle})",
|
|
189
|
-
flush=True,
|
|
190
|
-
)
|
|
191
|
-
if restart_delay_seconds:
|
|
192
|
-
time.sleep(restart_delay_seconds)
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
def main(argv: Optional[List[str]] = None) -> int:
|
|
196
|
-
if configure_run_logging:
|
|
197
|
-
configure_run_logging(prefix="watchdog")
|
|
198
|
-
argv = list(sys.argv[1:] if argv is None else argv)
|
|
199
|
-
before_cmd, cmd = _split_argv(argv)
|
|
200
|
-
args = _parse_args(before_cmd, cmd)
|
|
201
|
-
return run_with_watchdog(
|
|
202
|
-
cmd=cmd,
|
|
203
|
-
idle_seconds=args.idle_seconds,
|
|
204
|
-
max_restarts=args.max_restarts,
|
|
205
|
-
restart_delay_seconds=args.restart_delay_seconds,
|
|
206
|
-
stop_on_nonzero_exit=bool(args.stop_on_nonzero_exit),
|
|
207
|
-
)
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
if __name__ == "__main__":
|
|
211
|
-
raise SystemExit(main())
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
ins_pricing/README.md,sha256=vufPPg719SZzrtcplnIN5BJvBsXKzIgxCUeCrWUzobM,2495
|
|
2
|
-
ins_pricing/__init__.py,sha256=hhZymgqtvilNC4WrZFXuT3-o0INSoVuRR-HA5EqyGAY,3085
|
|
3
|
-
ins_pricing/setup.py,sha256=pdbJAaaaiWGa6Jp3bad-0Q-5rEAHdBpaTAv2CCXSYOQ,2035
|
|
4
|
-
ins_pricing/governance/README.md,sha256=XnXLS5RPzWhEiicJ3WtGmpN935jppHhPftA9Lo2DPnQ,511
|
|
5
|
-
ins_pricing/governance/__init__.py,sha256=d8tiDhOvHvAvgSohY1xv0vuEeHj8Gl1apQtw7ryEKM0,517
|
|
6
|
-
ins_pricing/governance/approval.py,sha256=cjJQjU1ziR-d-9wVSXyMyX6S5zijJqDWERZNxjqGAUE,2879
|
|
7
|
-
ins_pricing/governance/audit.py,sha256=f0aw-LaOxH5NGzxwczeLrGMJcxO-JDRn99BpI55KRn4,1040
|
|
8
|
-
ins_pricing/governance/registry.py,sha256=2uxQL6qMGY5IYWJti9MpaV_auvL--piJaasFrX20ghk,3139
|
|
9
|
-
ins_pricing/governance/release.py,sha256=ltyFIdeKbwj9fnEDxcQCURaQ5Zc_j0mqXFPNunmX_NQ,4743
|
|
10
|
-
ins_pricing/modelling/BayesOpt.py,sha256=i2tB3c6EeucjKAsHyicGDNU7DVVCTihg-TgSoM1y18E,3332
|
|
11
|
-
ins_pricing/modelling/BayesOpt_USAGE.md,sha256=x_CXot3RvGRYtt2xU2lrEfmtTbh2KGTryC3BJEZaoBw,39333
|
|
12
|
-
ins_pricing/modelling/BayesOpt_entry.py,sha256=H1eM1prU6U_FW1hdy2EmQ2k62hqCozy_vzRoV3HSVBw,24330
|
|
13
|
-
ins_pricing/modelling/BayesOpt_incremental.py,sha256=JKaRgsGY49OFE6cfQa5aAf8GzC2_bT7m8P99-S9E9Ss,30437
|
|
14
|
-
ins_pricing/modelling/Explain_Run.py,sha256=y-OKxmT475iRtDBukXh7jwiBiRmjh7ywCVhRFKk4EZw,962
|
|
15
|
-
ins_pricing/modelling/Explain_entry.py,sha256=e7EviU2fIWwyBsmoTq2ZM_rDKjZypQnFH68Q_rZVz1U,21330
|
|
16
|
-
ins_pricing/modelling/Pricing_Run.py,sha256=4BrUHhy4auzlbXopdocMV0Qn9_1b1Rjheq_sc5wM6D0,1009
|
|
17
|
-
ins_pricing/modelling/README.md,sha256=hRgDZotkNsdVgIvzAraKja_Id3m7TZJM_3-qtbkMdyM,1770
|
|
18
|
-
ins_pricing/modelling/__init__.py,sha256=bVDP11zjYvx6-nLwn2Gpa7qAriYVyjkBqaC569ww7RE,1228
|
|
19
|
-
ins_pricing/modelling/cli_common.py,sha256=RcClZFdnvLDy7oo4DQ034ggaL-0_4pWcboKwXAUdkzQ,4506
|
|
20
|
-
ins_pricing/modelling/notebook_utils.py,sha256=but3_avtrNFEKfG8YtfJisNfABVbpYjkHDzD1ZpJSDo,10611
|
|
21
|
-
ins_pricing/modelling/run_logging.py,sha256=V3Wh2EV6c1Mo0QTvfe4hl2J4LOR6bdQsT210o__YBWk,3677
|
|
22
|
-
ins_pricing/modelling/watchdog_run.py,sha256=-gv72vcZqTYCvtDgnQTbSUWH_3icmraf7F09IX8_etI,6176
|
|
23
|
-
ins_pricing/modelling/bayesopt/__init__.py,sha256=5WGZeQI9B1P9OXQUgq7XogcjAbv2oXnp076bW16e_ss,1955
|
|
24
|
-
ins_pricing/modelling/bayesopt/config_preprocess.py,sha256=3CP_zsCcZnCTb2qXkvFNStL6lKNYeOT3uNypVw8bB4I,12326
|
|
25
|
-
ins_pricing/modelling/bayesopt/core.py,sha256=y5I8RRrSrhHPAri_oHiJ046kIa8ClmLfLolenJA2_v8,66967
|
|
26
|
-
ins_pricing/modelling/bayesopt/models.py,sha256=ajUTKoaumz1mKYnT3Toi7tUHkNO1Wlqex8kpoI2cv2I,90892
|
|
27
|
-
ins_pricing/modelling/bayesopt/trainers.py,sha256=Lpd2p1bDjyjPc-_fdr4guRaKkzjmtcJpdkVjXm3TLO8,103719
|
|
28
|
-
ins_pricing/modelling/bayesopt/utils.py,sha256=B837DYa5-6IY6A0_e-NiZY-VAJKUaQFMWEQ-LDLx1yI,41815
|
|
29
|
-
ins_pricing/modelling/explain/__init__.py,sha256=CPoGzGu8TTO3FOXjxoXC13VkuIDCf3YTH6L3BqJq3Ok,1171
|
|
30
|
-
ins_pricing/modelling/explain/gradients.py,sha256=9TqCws_p49nFxVMcjVxe4KCZ7frezeL0uV_LCdoM5yo,11088
|
|
31
|
-
ins_pricing/modelling/explain/metrics.py,sha256=K_xOY7ZrHWhbJ79RNB7eXN3VXeTe8vq68ZLH2BlZufA,5389
|
|
32
|
-
ins_pricing/modelling/explain/permutation.py,sha256=YErQQtCbYzv3AbaWgOb3vvrUBRgjA-_iTZrJPBFGnxU,5616
|
|
33
|
-
ins_pricing/modelling/explain/shap_utils.py,sha256=IkijzxBeawyDIXiVxUUkvcC0MrHnttSKsMYOjM-wt-k,4353
|
|
34
|
-
ins_pricing/modelling/plotting/__init__.py,sha256=BBQKcE7IYUYObFrjpSnfNS6rmzc80Lae7oEqxKz-vEk,1058
|
|
35
|
-
ins_pricing/modelling/plotting/common.py,sha256=_kFq7JMA0LnKIp4bqAFvr-24VaHjj9pegDMm1qP9_7Y,1439
|
|
36
|
-
ins_pricing/modelling/plotting/curves.py,sha256=hGjpuALDwO0wDyWkIsBHZ4rqDGwPnkNdDZCIdgLW4II,18419
|
|
37
|
-
ins_pricing/modelling/plotting/diagnostics.py,sha256=AlkBtHuezRoDgMeXm56A1bK6Kn0rWOBy4Uts_xOocrs,5164
|
|
38
|
-
ins_pricing/modelling/plotting/geo.py,sha256=sRJTYOcAphNFM-oww4qbw9MoZneBCJtur96sYuqSNkw,11009
|
|
39
|
-
ins_pricing/modelling/plotting/importance.py,sha256=xs3l9uW_rCrakoA__fanIph6DK2jN_DugsKASAzteJU,3666
|
|
40
|
-
ins_pricing/modelling/tests/conftest.py,sha256=0KUXnkTgIGEIsf0J4uzIx5Kq4JkDyFo81Mv0qvIzW9k,180
|
|
41
|
-
ins_pricing/modelling/tests/test_cross_val_generic.py,sha256=iLZOFmdyrycB15lFWoQphkFlEjzZTozQXTLVOHLw2Qg,1721
|
|
42
|
-
ins_pricing/modelling/tests/test_distributed_utils.py,sha256=9cStpDw7jPdQwmm0Po-G2tB04uzSR1CoOUZMLuB61yI,466
|
|
43
|
-
ins_pricing/modelling/tests/test_explain.py,sha256=NZqKYuL-eSf9eC5ttjcMirfOc48ORMXZQm5PjmYk4jY,1445
|
|
44
|
-
ins_pricing/modelling/tests/test_geo_tokens_split.py,sha256=Ti57IynKB0aWOosr0g2RcZlDZyZC012XZ-hm6tWXBJg,1554
|
|
45
|
-
ins_pricing/modelling/tests/test_graph_cache.py,sha256=QEI5cLLtQ9_zwRR50KqUf8qxo9Jcp1WLxIGs4dSoMNk,821
|
|
46
|
-
ins_pricing/modelling/tests/test_plotting.py,sha256=OdN9YJGBauQtl5Il75YNpOAxN405Hx9gZwkwf7_hh5U,1868
|
|
47
|
-
ins_pricing/modelling/tests/test_plotting_library.py,sha256=SB5RjKTaPydK848V0xpqEaJtEWhRv6ZfnHmnnzjaPh4,4079
|
|
48
|
-
ins_pricing/modelling/tests/test_preprocessor.py,sha256=FqbKltV803Pd-ZY1xBc4XF1T-INDuUliaVcMIDPmBxI,1438
|
|
49
|
-
ins_pricing/pricing/README.md,sha256=PEcyw5oDkqJHOqnNdzBdbbpZwG4SOlnhMwY-owwQ0GI,1064
|
|
50
|
-
ins_pricing/pricing/__init__.py,sha256=XFplK3zkxPyNQZJd1Gn6_VvpwHLedMqxAd_Vn9tqsTE,881
|
|
51
|
-
ins_pricing/pricing/calibration.py,sha256=9j_kDW5Fxb9weDMaaRJE0QjAhT98lL0Ifhls6VIRnY0,1158
|
|
52
|
-
ins_pricing/pricing/data_quality.py,sha256=8FecBE60cABsTZE7HETuoKCEOXIrirGAFgg5wQCZrmU,4043
|
|
53
|
-
ins_pricing/pricing/exposure.py,sha256=rw8kKZ_1QdeGTCm13ck9NXrRBPt6TunxRw2s_qkHYkg,2575
|
|
54
|
-
ins_pricing/pricing/factors.py,sha256=RqZRXvW70rKkTIOxtK4MGeyDD3PrOFJ19hVc6rLYFzQ,2937
|
|
55
|
-
ins_pricing/pricing/monitoring.py,sha256=sGkPICaBYYwZPKGJtIeg6aURGs0dLhCBNudCTFeh3R4,3271
|
|
56
|
-
ins_pricing/pricing/rate_table.py,sha256=llDW95i7gR6cCtGFwcGqgpgFvOOPCURaJWmuQw1oce8,2473
|
|
57
|
-
ins_pricing/production/__init__.py,sha256=KLENzYi7WmVUMrL-GrvXK7tF5r_SCMq1-xLYUxk0URE,403
|
|
58
|
-
ins_pricing/production/drift.py,sha256=PwJk6dde9AEn-59PvF62f3_b3fQk4yeG5SQCh8F-c_A,774
|
|
59
|
-
ins_pricing/production/monitoring.py,sha256=A6Hyc5WSKhFkDZOIrqmFteuDee75CdcwdTq644vrk-U,4836
|
|
60
|
-
ins_pricing/production/scoring.py,sha256=yFmMmbYb7w_RC4uZOCMnAjLMRcjXQWIuT1nsfu-bwuc,1379
|
|
61
|
-
ins_pricing/reporting/README.md,sha256=kTVdB6pNewwh1HlCHrI2SzWTgprtQoQprLRQ2qLdgNA,486
|
|
62
|
-
ins_pricing/reporting/__init__.py,sha256=Se5Cdomv9_RwkIDizkw1yx4iCMcjhjTHb4pZK6K895c,242
|
|
63
|
-
ins_pricing/reporting/report_builder.py,sha256=53ZFqGUx2isAoigT5IDwvXkek67zN7-6IgKeGpJhO7c,2241
|
|
64
|
-
ins_pricing/reporting/scheduler.py,sha256=9koG_1cmWvLqrS66uzMJuAlYI2VTkynV19ssB2TtcKU,1336
|
|
65
|
-
ins_pricing_gemini/__init__.py,sha256=Dt60WIr47kXjTz6xfE5Y_PEGlFwlYpB79KAolY-4jV8,672
|
|
66
|
-
ins_pricing_gemini/setup.py,sha256=xtN89Fchm9cZZzkeHzam8ju5k4U0pkQWYirsB22O9Po,1690
|
|
67
|
-
ins_pricing_gemini/smoke_test.py,sha256=kpqFpF-29wr35wMpL0YI_EP87xxbr7wONi7Zzc71OFE,1034
|
|
68
|
-
ins_pricing_gemini/governance/__init__.py,sha256=d8tiDhOvHvAvgSohY1xv0vuEeHj8Gl1apQtw7ryEKM0,517
|
|
69
|
-
ins_pricing_gemini/governance/approval.py,sha256=cjJQjU1ziR-d-9wVSXyMyX6S5zijJqDWERZNxjqGAUE,2879
|
|
70
|
-
ins_pricing_gemini/governance/audit.py,sha256=f0aw-LaOxH5NGzxwczeLrGMJcxO-JDRn99BpI55KRn4,1040
|
|
71
|
-
ins_pricing_gemini/governance/registry.py,sha256=2uxQL6qMGY5IYWJti9MpaV_auvL--piJaasFrX20ghk,3139
|
|
72
|
-
ins_pricing_gemini/governance/release.py,sha256=ltyFIdeKbwj9fnEDxcQCURaQ5Zc_j0mqXFPNunmX_NQ,4743
|
|
73
|
-
ins_pricing_gemini/modelling/Explain_Run.py,sha256=y-OKxmT475iRtDBukXh7jwiBiRmjh7ywCVhRFKk4EZw,962
|
|
74
|
-
ins_pricing_gemini/modelling/Pricing_Run.py,sha256=4BrUHhy4auzlbXopdocMV0Qn9_1b1Rjheq_sc5wM6D0,1009
|
|
75
|
-
ins_pricing_gemini/modelling/__init__.py,sha256=csrWBr8eaSstDhkAUK1Gyxmunjb3wHhNdWX-Ce2Uylk,3559
|
|
76
|
-
ins_pricing_gemini/modelling/cli_common.py,sha256=ynitazjJ1brbQ5t0u9w9xNwhngNRTANSecl-KnOtVh0,4679
|
|
77
|
-
ins_pricing_gemini/modelling/config.py,sha256=HVibEHzUzPYIFhZUEixI_3vG16nGb014jKWzz5bYKZI,8881
|
|
78
|
-
ins_pricing_gemini/modelling/config_preprocess.py,sha256=53B-5wiQxVwtm2YOqSjPRFh_N70M3NzgutV0Fm0PUZI,10268
|
|
79
|
-
ins_pricing_gemini/modelling/core.py,sha256=Pi898qZziIcK5VeHBCU3BRPNh27elV2mdYs9yfOYVEk,32120
|
|
80
|
-
ins_pricing_gemini/modelling/data_container.py,sha256=jOvZNEWRvY2pxHCwWI1YWN1XWUP7r4fKG5fu1-fTdgk,1657
|
|
81
|
-
ins_pricing_gemini/modelling/features.py,sha256=OzyR_RRVkESpzvrlq6o7VCweudgOT7574ZpMZDcdTUs,8862
|
|
82
|
-
ins_pricing_gemini/modelling/model_manager.py,sha256=UaIDi3f3BcXo_QIS3jdS77n6OAaGtIQI4NUYCPPTroc,7039
|
|
83
|
-
ins_pricing_gemini/modelling/model_plotting.py,sha256=cQfimNGdzvN3fweAx1L2NGus0MODpTNtNiS_c_7M_FE,16620
|
|
84
|
-
ins_pricing_gemini/modelling/models.py,sha256=WTzkgx4JaClf-N458gpvyqW_cf6KozBFAM_FfGvKNic,91183
|
|
85
|
-
ins_pricing_gemini/modelling/notebook_utils.py,sha256=zPyHjsyUWl-aDJwxPzpQrXrFjZzWA7yepYsQ0lFKnTY,10638
|
|
86
|
-
ins_pricing_gemini/modelling/run_logging.py,sha256=V3Wh2EV6c1Mo0QTvfe4hl2J4LOR6bdQsT210o__YBWk,3677
|
|
87
|
-
ins_pricing_gemini/modelling/trainers.py,sha256=ejIhdgZxrMkSX-8Dt_ClzeED8iscCrf05VKiXHa9wQs,103676
|
|
88
|
-
ins_pricing_gemini/modelling/utils.py,sha256=An-4yDrRChxyGP1bg9T2xxEsVPJPwAhzGyO_DZ5rf4M,41741
|
|
89
|
-
ins_pricing_gemini/modelling/watchdog_run.py,sha256=-gv72vcZqTYCvtDgnQTbSUWH_3icmraf7F09IX8_etI,6176
|
|
90
|
-
ins_pricing_gemini/modelling/explain/__init__.py,sha256=CPoGzGu8TTO3FOXjxoXC13VkuIDCf3YTH6L3BqJq3Ok,1171
|
|
91
|
-
ins_pricing_gemini/modelling/explain/gradients.py,sha256=9TqCws_p49nFxVMcjVxe4KCZ7frezeL0uV_LCdoM5yo,11088
|
|
92
|
-
ins_pricing_gemini/modelling/explain/metrics.py,sha256=K_xOY7ZrHWhbJ79RNB7eXN3VXeTe8vq68ZLH2BlZufA,5389
|
|
93
|
-
ins_pricing_gemini/modelling/explain/permutation.py,sha256=YErQQtCbYzv3AbaWgOb3vvrUBRgjA-_iTZrJPBFGnxU,5616
|
|
94
|
-
ins_pricing_gemini/modelling/explain/shap_utils.py,sha256=IkijzxBeawyDIXiVxUUkvcC0MrHnttSKsMYOjM-wt-k,4353
|
|
95
|
-
ins_pricing_gemini/modelling/plotting/__init__.py,sha256=BBQKcE7IYUYObFrjpSnfNS6rmzc80Lae7oEqxKz-vEk,1058
|
|
96
|
-
ins_pricing_gemini/modelling/plotting/common.py,sha256=_kFq7JMA0LnKIp4bqAFvr-24VaHjj9pegDMm1qP9_7Y,1439
|
|
97
|
-
ins_pricing_gemini/modelling/plotting/curves.py,sha256=hGjpuALDwO0wDyWkIsBHZ4rqDGwPnkNdDZCIdgLW4II,18419
|
|
98
|
-
ins_pricing_gemini/modelling/plotting/diagnostics.py,sha256=Tb1duBgLJRU_apK_1a68SxsgCgg_KJ4tHazi8wPOx1Y,4267
|
|
99
|
-
ins_pricing_gemini/modelling/plotting/geo.py,sha256=sRJTYOcAphNFM-oww4qbw9MoZneBCJtur96sYuqSNkw,11009
|
|
100
|
-
ins_pricing_gemini/modelling/plotting/importance.py,sha256=xs3l9uW_rCrakoA__fanIph6DK2jN_DugsKASAzteJU,3666
|
|
101
|
-
ins_pricing_gemini/modelling/tests/conftest.py,sha256=0KUXnkTgIGEIsf0J4uzIx5Kq4JkDyFo81Mv0qvIzW9k,180
|
|
102
|
-
ins_pricing_gemini/modelling/tests/test_cross_val_generic.py,sha256=iLZOFmdyrycB15lFWoQphkFlEjzZTozQXTLVOHLw2Qg,1721
|
|
103
|
-
ins_pricing_gemini/modelling/tests/test_distributed_utils.py,sha256=9cStpDw7jPdQwmm0Po-G2tB04uzSR1CoOUZMLuB61yI,466
|
|
104
|
-
ins_pricing_gemini/modelling/tests/test_explain.py,sha256=NZqKYuL-eSf9eC5ttjcMirfOc48ORMXZQm5PjmYk4jY,1445
|
|
105
|
-
ins_pricing_gemini/modelling/tests/test_geo_tokens_split.py,sha256=Ti57IynKB0aWOosr0g2RcZlDZyZC012XZ-hm6tWXBJg,1554
|
|
106
|
-
ins_pricing_gemini/modelling/tests/test_graph_cache.py,sha256=QEI5cLLtQ9_zwRR50KqUf8qxo9Jcp1WLxIGs4dSoMNk,821
|
|
107
|
-
ins_pricing_gemini/modelling/tests/test_plotting.py,sha256=OdN9YJGBauQtl5Il75YNpOAxN405Hx9gZwkwf7_hh5U,1868
|
|
108
|
-
ins_pricing_gemini/modelling/tests/test_plotting_library.py,sha256=SB5RjKTaPydK848V0xpqEaJtEWhRv6ZfnHmnnzjaPh4,4079
|
|
109
|
-
ins_pricing_gemini/modelling/tests/test_preprocessor.py,sha256=FqbKltV803Pd-ZY1xBc4XF1T-INDuUliaVcMIDPmBxI,1438
|
|
110
|
-
ins_pricing_gemini/pricing/__init__.py,sha256=XFplK3zkxPyNQZJd1Gn6_VvpwHLedMqxAd_Vn9tqsTE,881
|
|
111
|
-
ins_pricing_gemini/pricing/calibration.py,sha256=9j_kDW5Fxb9weDMaaRJE0QjAhT98lL0Ifhls6VIRnY0,1158
|
|
112
|
-
ins_pricing_gemini/pricing/data_quality.py,sha256=8FecBE60cABsTZE7HETuoKCEOXIrirGAFgg5wQCZrmU,4043
|
|
113
|
-
ins_pricing_gemini/pricing/exposure.py,sha256=rw8kKZ_1QdeGTCm13ck9NXrRBPt6TunxRw2s_qkHYkg,2575
|
|
114
|
-
ins_pricing_gemini/pricing/factors.py,sha256=RqZRXvW70rKkTIOxtK4MGeyDD3PrOFJ19hVc6rLYFzQ,2937
|
|
115
|
-
ins_pricing_gemini/pricing/monitoring.py,sha256=sGkPICaBYYwZPKGJtIeg6aURGs0dLhCBNudCTFeh3R4,3271
|
|
116
|
-
ins_pricing_gemini/pricing/rate_table.py,sha256=llDW95i7gR6cCtGFwcGqgpgFvOOPCURaJWmuQw1oce8,2473
|
|
117
|
-
ins_pricing_gemini/production/__init__.py,sha256=KLENzYi7WmVUMrL-GrvXK7tF5r_SCMq1-xLYUxk0URE,403
|
|
118
|
-
ins_pricing_gemini/production/drift.py,sha256=PwJk6dde9AEn-59PvF62f3_b3fQk4yeG5SQCh8F-c_A,774
|
|
119
|
-
ins_pricing_gemini/production/monitoring.py,sha256=A6Hyc5WSKhFkDZOIrqmFteuDee75CdcwdTq644vrk-U,4836
|
|
120
|
-
ins_pricing_gemini/production/scoring.py,sha256=yFmMmbYb7w_RC4uZOCMnAjLMRcjXQWIuT1nsfu-bwuc,1379
|
|
121
|
-
ins_pricing_gemini/reporting/__init__.py,sha256=Se5Cdomv9_RwkIDizkw1yx4iCMcjhjTHb4pZK6K895c,242
|
|
122
|
-
ins_pricing_gemini/reporting/report_builder.py,sha256=53ZFqGUx2isAoigT5IDwvXkek67zN7-6IgKeGpJhO7c,2241
|
|
123
|
-
ins_pricing_gemini/reporting/scheduler.py,sha256=9koG_1cmWvLqrS66uzMJuAlYI2VTkynV19ssB2TtcKU,1336
|
|
124
|
-
ins_pricing_gemini/scripts/BayesOpt_incremental.py,sha256=L6pKQqA_Crl0U7pLSgRBAR66TQjxeRm5R0BjACwrULo,28139
|
|
125
|
-
ins_pricing_gemini/scripts/Explain_entry.py,sha256=84uqBShImbwkjKInPjsI0zGY_NCxMznUjXZSMYBfT5I,21459
|
|
126
|
-
ins_pricing_gemini/scripts/__init__.py,sha256=xquWzO2DHKf6zh7btqAcD98T4bCTYT6NhCHspushwWs,49
|
|
127
|
-
ins_pricing_gemini/scripts/train.py,sha256=8MDpLpW74UfF79rS9TfWT5NrTtE7yjPD7u3GoduGJqI,21173
|
|
128
|
-
user_packages/__init__.py,sha256=2A4JJiIriqlBBQf-ssnV40BMEY_MW07x01v5fVZLEPI,3217
|
|
129
|
-
user_packages legacy/BayesOpt.py,sha256=T8gisEsAWDOB0Pt-fGnH1GsEyGPKBYK2cBjlGbFC6bk,240270
|
|
130
|
-
user_packages legacy/BayesOpt_entry.py,sha256=xOy8mFNk5jIrR_qTKqVV-BEt9zm9UA4lzu52Mm4E7ik,19123
|
|
131
|
-
user_packages legacy/BayesOpt_incremental.py,sha256=Br291-4UrkQ6du2MU8iEguSFJ170cNjT2Gx-gUVCQgk,26699
|
|
132
|
-
user_packages legacy/Pricing_Run.py,sha256=iRJlW0Nr7lq594x_zhzfIK3duFrn92V1Cbug7hyrB2M,1011
|
|
133
|
-
user_packages legacy/__init__.py,sha256=_fuBWcyZWl6fPOClsZH_lvDhFIOWFzvnuA8Drp05txc,370
|
|
134
|
-
user_packages legacy/cli_common.py,sha256=U5vgmoedlZiSMVGt2rDjKEl_ge6hg3EIHwnkHgV0rdk,3963
|
|
135
|
-
user_packages legacy/notebook_utils.py,sha256=Jx9271qsdMUnWi0ep1zM6PqMYVjRiQtnJJo-h-HsoM0,8483
|
|
136
|
-
user_packages legacy/watchdog_run.py,sha256=8uI0tVtU3r1bnFgED5eg-ZOBBYKV9_qCrBWlQRHSuAM,5813
|
|
137
|
-
user_packages legacy/Try/BayesOpt Legacy251213.py,sha256=YAr6bnt58mh5Z6AfXsWjL7fyANmrLbxa6V3dacGQn5o,155961
|
|
138
|
-
user_packages legacy/Try/BayesOpt Legacy251215.py,sha256=R2mjaTONhI23lP2WmKu0axoFSynh0wZMeUoycpuD_Rw,155164
|
|
139
|
-
user_packages legacy/Try/BayesOpt lagecy251201.py,sha256=Gc6guUXudWvT6GxSbLw7P6Xu2vrtzuLTne3YskQ4O5U,145225
|
|
140
|
-
user_packages legacy/Try/BayesOpt lagecy251218.py,sha256=ZY6mShf05q1Ex1lGJZwBfoegFvHrM61ZF8an2j024Kk,165573
|
|
141
|
-
user_packages legacy/Try/BayesOpt legacy.py,sha256=NM9-oGwePnOo7tn9EUZM_Hf_irK9fEe5PEfsGrG3Cw4,132232
|
|
142
|
-
user_packages legacy/Try/BayesOpt.py,sha256=JDJq3KFA_Q7G2qvI4hlXB5wXnXrL6Pr_wb7nLQhiB8c,35210
|
|
143
|
-
user_packages legacy/Try/BayesOptAll.py,sha256=EkAL57wef53DLRCKOpniB4fy4tE-I-sKz9zjt4_X_bU,60324
|
|
144
|
-
user_packages legacy/Try/BayesOptAllPlatform.py,sha256=gMlOCwhWUATyzRcuqHReX9GuF_c-s0UH5Zl3xbHOkG4,37932
|
|
145
|
-
user_packages legacy/Try/BayesOptCPUGPU.py,sha256=xZnVo7l98Z0QC3sxrbw2SYYVXwml9TCz9rmt8a3t1YQ,71388
|
|
146
|
-
user_packages legacy/Try/BayesOptSearch.py,sha256=JwnPBCzLIUFVyJWHisTTfv1VPWXgK0izzyw6jgnREgU,35260
|
|
147
|
-
user_packages legacy/Try/BayesOptSearchOrigin.py,sha256=dgEoAUhEQBaSXcf6MzIwwJ29QatQvyhGY_S3sP0w6Js,35270
|
|
148
|
-
user_packages legacy/Try/BayesOptV1.py,sha256=sBRR9DhKlMB6IGtpVcx_HXpMbaU5BlgdulV8OhI2LaI,72794
|
|
149
|
-
user_packages legacy/Try/BayesOptV10.py,sha256=rqLgRZ9dYuCuCsH4so-cwPFhCFp7iPcjVhX6kST7AG4,119129
|
|
150
|
-
user_packages legacy/Try/BayesOptV11.py,sha256=2Un-ezvXwSgsefB_2-4ZJumazyChJBAff21FJkyqe3w,120405
|
|
151
|
-
user_packages legacy/Try/BayesOptV12.py,sha256=D1k-2R-GTAdHrOpD9t7VrjSKsAKWx4rc_k_mT0a13Ls,120417
|
|
152
|
-
user_packages legacy/Try/BayesOptV2.py,sha256=RkcHVE6whi63tatiV1wRF25LYPiYll9kWUmYACuHqR0,79754
|
|
153
|
-
user_packages legacy/Try/BayesOptV3.py,sha256=1Jdyc_CyUTHKeI_3NE3tCrbWe849eToublYsaqVzXg0,83634
|
|
154
|
-
user_packages legacy/Try/BayesOptV4.py,sha256=mcp4MeouEhc85WouvvljRMH40eetlvPw0TEJQ6IMjwA,89606
|
|
155
|
-
user_packages legacy/Try/BayesOptV5.py,sha256=eU5n6m9-A5Qph86Bv42oy3IcfF6di8EaFoc9fyf5gaY,90449
|
|
156
|
-
user_packages legacy/Try/BayesOptV6.py,sha256=rwvCb_HKoXREj7kcrvS5PRzI2-WyqW2tVDiUw9alIQo,106994
|
|
157
|
-
user_packages legacy/Try/BayesOptV7.py,sha256=EncqnYSmdGjyPKuqzpBprfuliZQBMyCVanSltHm5wqc,110011
|
|
158
|
-
user_packages legacy/Try/BayesOptV8Codex.py,sha256=9q_1hkSQYXlms_wHkdePQ_EJyXTAEIHbmN6AfYK8MBE,106975
|
|
159
|
-
user_packages legacy/Try/BayesOptV8Gemini.py,sha256=zNohNNKGEGTwi5Kw-p4JiY-1cJQKGF9sIv0f_Qu0xd8,105429
|
|
160
|
-
user_packages legacy/Try/BayesOptV9.py,sha256=17iUm9ogxh2vH1rJI5UH2Czkcv1bH-Cd4uJ-devpO1c,117273
|
|
161
|
-
user_packages legacy/Try/BayesOpt_entry legacy.py,sha256=vFd8nY73HAQVGGsfyjemXsv6Vzt3vji1dHBuCSfKbI0,10163
|
|
162
|
-
user_packages legacy/Try/ModelBayesOptSearch.py,sha256=Co--dkbKxqpl-2tP9zEYmcEosYtOrAxarypNi2svVoc,16772
|
|
163
|
-
user_packages legacy/Try/ResNetBayesOptSearch.py,sha256=mp38lBs-TE3lAc8t8o4He5y1iwGIgrlPerurh_xRmqs,10942
|
|
164
|
-
user_packages legacy/Try/XgbBayesOptSearch.py,sha256=pWjlyT5FSK4zNnng0ZrpTIF5o-wBwuavxFA0LE4B4oE,5534
|
|
165
|
-
user_packages legacy/Try/xgbbayesopt.py,sha256=Vow-wrxcwozbTDPKJcl3ZzYgShd-4oks5Kzs74kXUvA,22754
|
|
166
|
-
ins_pricing-0.1.11.dist-info/METADATA,sha256=BHjF3Dq2HMSYMcbat96OI4WIkBqCfUZnfe-zrw2XXKg,3651
|
|
167
|
-
ins_pricing-0.1.11.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
168
|
-
ins_pricing-0.1.11.dist-info/top_level.txt,sha256=CUUE4W0DghRtQubDfBbIr2Kcvhdu-rOXxDD8Atjm_-c,66
|
|
169
|
-
ins_pricing-0.1.11.dist-info/RECORD,,
|
ins_pricing_gemini/__init__.py
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"""Root package for ins_pricing."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
from importlib import import_module
|
|
5
|
-
import sys
|
|
6
|
-
|
|
7
|
-
# Root subpackages
|
|
8
|
-
_ROOT_SUBPACKAGES = {
|
|
9
|
-
"modelling": "ins_pricing.modelling",
|
|
10
|
-
"pricing": "ins_pricing.pricing",
|
|
11
|
-
"production": "ins_pricing.production",
|
|
12
|
-
"governance": "ins_pricing.governance",
|
|
13
|
-
"reporting": "ins_pricing.reporting",
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
__all__ = sorted(list(_ROOT_SUBPACKAGES.keys()))
|
|
17
|
-
|
|
18
|
-
def __getattr__(name: str):
|
|
19
|
-
if name in _ROOT_SUBPACKAGES:
|
|
20
|
-
module = import_module(_ROOT_SUBPACKAGES[name])
|
|
21
|
-
globals()[name] = module
|
|
22
|
-
return module
|
|
23
|
-
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from .approval import ApprovalAction, ApprovalRequest, ApprovalStore
|
|
4
|
-
from .audit import AuditEvent, AuditLogger
|
|
5
|
-
from .registry import ModelArtifact, ModelRegistry, ModelVersion
|
|
6
|
-
from .release import DeploymentState, ModelRef, ReleaseManager
|
|
7
|
-
|
|
8
|
-
__all__ = [
|
|
9
|
-
"ApprovalAction",
|
|
10
|
-
"ApprovalRequest",
|
|
11
|
-
"ApprovalStore",
|
|
12
|
-
"AuditEvent",
|
|
13
|
-
"AuditLogger",
|
|
14
|
-
"ModelArtifact",
|
|
15
|
-
"ModelRegistry",
|
|
16
|
-
"ModelVersion",
|
|
17
|
-
"DeploymentState",
|
|
18
|
-
"ModelRef",
|
|
19
|
-
"ReleaseManager",
|
|
20
|
-
]
|