ins-pricing 0.4.4__py3-none-any.whl → 0.4.5__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 CHANGED
@@ -1,74 +1,66 @@
1
- # Ins-Pricing
2
-
3
- Distribution name: Ins-Pricing (import package is `ins_pricing`, legacy alias `user_packages` still works).
4
-
5
- Reusable modelling and pricing utilities organized as a small toolbox with clear boundaries
6
- between modelling, production, governance, and reporting.
7
-
8
- ## Architecture
9
-
10
- - `cli/`: CLI entry points + shared utilities.
11
- - `modelling/`
12
- - `core/`: BayesOpt training core (GLM / XGB / ResNet / FT / GNN).
13
- - `plotting/`: model-agnostic curves and geo visualizations.
14
- - `explain/`: permutation, gradients, and SHAP helpers.
15
- - `docs/modelling/`: modelling documentation.
16
- - `examples/modelling/`: demo configs + notebooks (repo only; not packaged).
17
- - `pricing/`: factor tables, calibration, exposure, monitoring.
18
- - `production/`: scoring, metrics, drift/PSI.
19
- - `governance/`: registry, release, audit, approval workflow.
20
- - `reporting/`: report builder + scheduler.
21
-
22
- ## Call flow (typical)
23
-
24
- 1. Model training
25
- - Python API: `from ins_pricing.modelling import BayesOptModel`
26
- - CLI: `python ins_pricing/cli/BayesOpt_entry.py --config-json ...`
27
- 2. Evaluation & visualization
28
- - Curves: `from ins_pricing.plotting import curves`
29
- - Importance: `from ins_pricing.plotting import importance`
30
- - Geo: `from ins_pricing.plotting import geo`
31
- 3. Explainability
32
- - `from ins_pricing.explain import permutation_importance, integrated_gradients_torch`
33
- 4. Pricing loop
34
- - `from ins_pricing.pricing import build_factor_table, rate_premium`
35
- 5. Production & governance
36
- - `from ins_pricing.production import batch_score, psi_report`
37
- - `from ins_pricing.governance import ModelRegistry, ReleaseManager`
38
- 6. Reporting
39
- - `from ins_pricing.reporting import build_report, write_report, schedule_daily`
40
-
41
- ## Import notes
42
-
43
- - `ins_pricing` exposes lightweight lazy imports so that `pricing/production/governance`
44
- can be used without installing heavy ML dependencies.
45
- - Migration note: CLI entry points now live under `ins_pricing/cli/` and demo assets are under
46
- `ins_pricing/examples/modelling/`. Update any scripts that referenced `ins_pricing/modelling/cli/*` or
47
- `ins_pricing/modelling/examples/*`.
48
- - Demo notebooks/configs live in the repo under `ins_pricing/examples/modelling/` and are not shipped in the PyPI package.
49
- - Heavy dependencies are only required when you import or use the related modules:
50
- - BayesOpt: `torch`, `optuna`, `xgboost`, etc.
51
- - Explain: `torch` (gradients), `shap` (SHAP).
52
- - Geo plotting on basemap: `contextily`.
53
- - Plotting: `matplotlib`.
54
-
55
- ## Multi-platform & GPU installation notes
56
-
57
- - **Install PyTorch first**: Use the correct PyTorch build for your platform/GPU (CUDA/ROCm/MPS)
58
- before installing the `bayesopt`, `explain`, or `gnn` extras. This avoids incompatible wheels.
59
- - **GNN dependencies**: `torch-geometric` and its companion packages are platform-specific. Follow
60
- the official PyG install guide for your CUDA/ROCm/CPU environment, then install
61
- `ins_pricing[gnn]`.
62
- - **Multi-GPU**: Training utilities will select CUDA/MPS/CPU automatically. Multi-GPU uses DDP or
63
- DataParallel when supported; on Windows, CUDA DDP is disabled and will fall back to single-GPU or
64
- DataParallel where available.
65
-
66
- ## Backward-compatible imports
67
-
68
- Legacy import paths continue to work:
69
-
70
- - `import user_packages`
71
- - `import user_packages.bayesopt`
72
- - `import user_packages.plotting`
73
- - `import user_packages.explain`
74
- - `import user_packages.BayesOpt`
1
+ # ins_pricing
2
+
3
+ Distribution name: ins_pricing (import package is `ins_pricing`; legacy alias `user_packages` still works).
4
+
5
+ Reusable modelling and pricing utilities organized as a small toolbox with clear boundaries
6
+ between modelling, production, governance, and reporting.
7
+
8
+ ## Architecture
9
+
10
+ - `cli/`: CLI entry points and shared utilities.
11
+ - `modelling/`
12
+ - `core/`: BayesOpt training core (GLM / XGB / ResNet / FT / GNN).
13
+ - `plotting/`: model-agnostic curves and geo visualizations.
14
+ - `explain/`: permutation, gradients, and SHAP helpers.
15
+ - `examples/`: demo configs and notebooks (repo only; not packaged).
16
+ - `pricing/`: factor tables, calibration, exposure, monitoring.
17
+ - `production/`: scoring, metrics, drift/PSI.
18
+ - `governance/`: registry, approval, audit workflows.
19
+ - `reporting/`: report builder and scheduler.
20
+
21
+ ## Call flow (typical)
22
+
23
+ 1. Model training
24
+ - Python API: `from ins_pricing.modelling import BayesOptModel`
25
+ - CLI: `python ins_pricing/cli/BayesOpt_entry.py --config-json ...`
26
+ 2. Evaluation and visualization
27
+ - Curves: `from ins_pricing.plotting import curves`
28
+ - Importance: `from ins_pricing.plotting import importance`
29
+ - Geo: `from ins_pricing.plotting import geo`
30
+ 3. Explainability
31
+ - `from ins_pricing.explain import permutation_importance, integrated_gradients_torch`
32
+ 4. Pricing loop
33
+ - `from ins_pricing.pricing import build_factor_table, rate_premium`
34
+ 5. Production and governance
35
+ - `from ins_pricing.production import batch_score, psi_report`
36
+ - `from ins_pricing.governance import ModelRegistry, ReleaseManager`
37
+ 6. Reporting
38
+ - `from ins_pricing.reporting import build_report, write_report, schedule_daily`
39
+
40
+ ## Import notes
41
+
42
+ - `ins_pricing` exposes lightweight lazy imports so that pricing/production/governance
43
+ can be used without installing heavy ML dependencies.
44
+ - Demo notebooks/configs live in the repo under `examples/` and are not shipped
45
+ in the PyPI package.
46
+ - Heavy dependencies are only required when you import or use the related modules:
47
+ - BayesOpt: `torch`, `optuna`, `xgboost`, etc.
48
+ - Explain: `torch` (gradients), `shap` (SHAP).
49
+ - Geo plotting on basemap: `contextily`.
50
+ - Plotting: `matplotlib`.
51
+
52
+ ## Multi-platform and GPU notes
53
+
54
+ - Install the correct PyTorch build for your platform/GPU before installing extras.
55
+ - Torch Geometric requires platform-specific wheels; follow the official PyG install guide.
56
+ - Multi-GPU uses DDP or DataParallel where supported; Windows disables CUDA DDP.
57
+
58
+ ## Backward-compatible imports
59
+
60
+ Legacy import paths continue to work:
61
+
62
+ - `import user_packages`
63
+ - `import user_packages.bayesopt`
64
+ - `import user_packages.plotting`
65
+ - `import user_packages.explain`
66
+ - `import user_packages.BayesOpt`