ins-pricing 0.4.5__py3-none-any.whl → 0.5.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 +48 -22
- ins_pricing/__init__.py +142 -90
- ins_pricing/cli/BayesOpt_entry.py +52 -50
- ins_pricing/cli/BayesOpt_incremental.py +39 -105
- ins_pricing/cli/Explain_Run.py +31 -23
- ins_pricing/cli/Explain_entry.py +532 -579
- ins_pricing/cli/Pricing_Run.py +31 -23
- ins_pricing/cli/bayesopt_entry_runner.py +11 -9
- ins_pricing/cli/utils/cli_common.py +256 -256
- ins_pricing/cli/utils/cli_config.py +375 -375
- ins_pricing/cli/utils/import_resolver.py +382 -365
- ins_pricing/cli/utils/notebook_utils.py +340 -340
- ins_pricing/cli/watchdog_run.py +209 -201
- ins_pricing/frontend/__init__.py +10 -10
- ins_pricing/frontend/example_workflows.py +1 -1
- ins_pricing/governance/__init__.py +20 -20
- ins_pricing/governance/release.py +159 -159
- ins_pricing/modelling/__init__.py +147 -92
- ins_pricing/modelling/{core/bayesopt → bayesopt}/README.md +2 -2
- ins_pricing/modelling/{core/bayesopt → bayesopt}/__init__.py +64 -102
- ins_pricing/modelling/{core/bayesopt → bayesopt}/config_preprocess.py +562 -562
- ins_pricing/modelling/{core/bayesopt → bayesopt}/core.py +965 -964
- ins_pricing/modelling/{core/bayesopt → bayesopt}/model_explain_mixin.py +296 -296
- ins_pricing/modelling/{core/bayesopt → bayesopt}/model_plotting_mixin.py +482 -548
- ins_pricing/modelling/{core/bayesopt → bayesopt}/models/__init__.py +27 -27
- ins_pricing/modelling/{core/bayesopt → bayesopt}/models/model_ft_trainer.py +915 -913
- ins_pricing/modelling/{core/bayesopt → bayesopt}/models/model_gnn.py +788 -785
- ins_pricing/modelling/{core/bayesopt → bayesopt}/models/model_resn.py +448 -446
- ins_pricing/modelling/bayesopt/trainers/__init__.py +19 -0
- ins_pricing/modelling/{core/bayesopt → bayesopt}/trainers/trainer_base.py +1308 -1308
- ins_pricing/modelling/{core/bayesopt → bayesopt}/trainers/trainer_ft.py +3 -3
- ins_pricing/modelling/{core/bayesopt → bayesopt}/trainers/trainer_glm.py +197 -198
- ins_pricing/modelling/{core/bayesopt → bayesopt}/trainers/trainer_gnn.py +344 -344
- ins_pricing/modelling/{core/bayesopt → bayesopt}/trainers/trainer_resn.py +283 -283
- ins_pricing/modelling/{core/bayesopt → bayesopt}/trainers/trainer_xgb.py +346 -347
- ins_pricing/modelling/bayesopt/utils/__init__.py +67 -0
- ins_pricing/modelling/bayesopt/utils/constants.py +21 -0
- ins_pricing/modelling/bayesopt/utils/io_utils.py +7 -0
- ins_pricing/modelling/bayesopt/utils/losses.py +27 -0
- ins_pricing/modelling/bayesopt/utils/metrics_and_devices.py +17 -0
- ins_pricing/modelling/{core/bayesopt → bayesopt}/utils/torch_trainer_mixin.py +623 -623
- ins_pricing/modelling/{core/evaluation.py → evaluation.py} +113 -104
- ins_pricing/modelling/explain/__init__.py +55 -55
- ins_pricing/modelling/explain/metrics.py +27 -174
- ins_pricing/modelling/explain/permutation.py +237 -237
- ins_pricing/modelling/plotting/__init__.py +40 -36
- ins_pricing/modelling/plotting/compat.py +228 -0
- ins_pricing/modelling/plotting/curves.py +572 -572
- ins_pricing/modelling/plotting/diagnostics.py +163 -163
- ins_pricing/modelling/plotting/geo.py +362 -362
- ins_pricing/modelling/plotting/importance.py +121 -121
- ins_pricing/pricing/__init__.py +27 -27
- ins_pricing/production/__init__.py +35 -25
- ins_pricing/production/{predict.py → inference.py} +140 -57
- ins_pricing/production/monitoring.py +8 -21
- ins_pricing/reporting/__init__.py +11 -11
- ins_pricing/setup.py +1 -1
- ins_pricing/tests/production/test_inference.py +90 -0
- ins_pricing/utils/__init__.py +116 -83
- ins_pricing/utils/device.py +255 -255
- ins_pricing/utils/features.py +53 -0
- ins_pricing/utils/io.py +72 -0
- ins_pricing/{modelling/core/bayesopt/utils → utils}/losses.py +125 -129
- ins_pricing/utils/metrics.py +158 -24
- ins_pricing/utils/numerics.py +76 -0
- ins_pricing/utils/paths.py +9 -1
- {ins_pricing-0.4.5.dist-info → ins_pricing-0.5.0.dist-info}/METADATA +182 -182
- ins_pricing-0.5.0.dist-info/RECORD +131 -0
- ins_pricing/modelling/core/BayesOpt.py +0 -146
- ins_pricing/modelling/core/__init__.py +0 -1
- ins_pricing/modelling/core/bayesopt/trainers/__init__.py +0 -19
- ins_pricing/modelling/core/bayesopt/utils/__init__.py +0 -86
- ins_pricing/modelling/core/bayesopt/utils/constants.py +0 -183
- ins_pricing/modelling/core/bayesopt/utils/io_utils.py +0 -126
- ins_pricing/modelling/core/bayesopt/utils/metrics_and_devices.py +0 -555
- ins_pricing/modelling/core/bayesopt/utils.py +0 -105
- ins_pricing/modelling/core/bayesopt/utils_backup.py +0 -1503
- ins_pricing/tests/production/test_predict.py +0 -233
- ins_pricing-0.4.5.dist-info/RECORD +0 -130
- /ins_pricing/modelling/{core/bayesopt → bayesopt}/config_components.py +0 -0
- /ins_pricing/modelling/{core/bayesopt → bayesopt}/models/model_ft_components.py +0 -0
- /ins_pricing/modelling/{core/bayesopt → bayesopt}/utils/distributed_utils.py +0 -0
- {ins_pricing-0.4.5.dist-info → ins_pricing-0.5.0.dist-info}/WHEEL +0 -0
- {ins_pricing-0.4.5.dist-info → ins_pricing-0.5.0.dist-info}/top_level.txt +0 -0
|
@@ -1,182 +1,182 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: ins_pricing
|
|
3
|
-
Version: 0.
|
|
4
|
-
Summary: Reusable modelling, pricing, governance, and reporting utilities.
|
|
5
|
-
Author: meishi125478
|
|
6
|
-
License: Proprietary
|
|
7
|
-
Keywords: pricing,insurance,bayesopt,ml
|
|
8
|
-
Classifier: Programming Language :: Python :: 3
|
|
9
|
-
Classifier: Programming Language :: Python :: 3 :: Only
|
|
10
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
11
|
-
Classifier: License :: Other/Proprietary License
|
|
12
|
-
Classifier: Operating System :: OS Independent
|
|
13
|
-
Classifier: Intended Audience :: Developers
|
|
14
|
-
Requires-Python: >=3.9
|
|
15
|
-
Description-Content-Type: text/markdown
|
|
16
|
-
Requires-Dist: numpy>=1.20
|
|
17
|
-
Requires-Dist: pandas>=1.4
|
|
18
|
-
Provides-Extra: bayesopt
|
|
19
|
-
Requires-Dist: torch>=1.13; extra == "bayesopt"
|
|
20
|
-
Requires-Dist: optuna>=3.0; extra == "bayesopt"
|
|
21
|
-
Requires-Dist: xgboost>=1.6; extra == "bayesopt"
|
|
22
|
-
Requires-Dist: scikit-learn>=1.1; extra == "bayesopt"
|
|
23
|
-
Requires-Dist: statsmodels>=0.13; extra == "bayesopt"
|
|
24
|
-
Requires-Dist: joblib>=1.2; extra == "bayesopt"
|
|
25
|
-
Requires-Dist: matplotlib>=3.5; extra == "bayesopt"
|
|
26
|
-
Provides-Extra: plotting
|
|
27
|
-
Requires-Dist: matplotlib>=3.5; extra == "plotting"
|
|
28
|
-
Requires-Dist: scikit-learn>=1.1; extra == "plotting"
|
|
29
|
-
Provides-Extra: explain
|
|
30
|
-
Requires-Dist: torch>=1.13; extra == "explain"
|
|
31
|
-
Requires-Dist: shap>=0.41; extra == "explain"
|
|
32
|
-
Requires-Dist: scikit-learn>=1.1; extra == "explain"
|
|
33
|
-
Provides-Extra: geo
|
|
34
|
-
Requires-Dist: contextily>=1.3; extra == "geo"
|
|
35
|
-
Requires-Dist: matplotlib>=3.5; extra == "geo"
|
|
36
|
-
Provides-Extra: gnn
|
|
37
|
-
Requires-Dist: torch>=1.13; extra == "gnn"
|
|
38
|
-
Requires-Dist: pynndescent>=0.5; extra == "gnn"
|
|
39
|
-
Requires-Dist: torch-geometric>=2.3; extra == "gnn"
|
|
40
|
-
Provides-Extra: all
|
|
41
|
-
Requires-Dist: torch>=1.13; extra == "all"
|
|
42
|
-
Requires-Dist: optuna>=3.0; extra == "all"
|
|
43
|
-
Requires-Dist: xgboost>=1.6; extra == "all"
|
|
44
|
-
Requires-Dist: scikit-learn>=1.1; extra == "all"
|
|
45
|
-
Requires-Dist: statsmodels>=0.13; extra == "all"
|
|
46
|
-
Requires-Dist: joblib>=1.2; extra == "all"
|
|
47
|
-
Requires-Dist: matplotlib>=3.5; extra == "all"
|
|
48
|
-
Requires-Dist: shap>=0.41; extra == "all"
|
|
49
|
-
Requires-Dist: contextily>=1.3; extra == "all"
|
|
50
|
-
Requires-Dist: pynndescent>=0.5; extra == "all"
|
|
51
|
-
Requires-Dist: torch-geometric>=2.3; extra == "all"
|
|
52
|
-
|
|
53
|
-
# Insurance-Pricing
|
|
54
|
-
|
|
55
|
-
A reusable toolkit for insurance modeling, pricing, governance, and reporting.
|
|
56
|
-
|
|
57
|
-
## Overview
|
|
58
|
-
|
|
59
|
-
Insurance-Pricing (ins_pricing) is an enterprise-grade Python library designed for machine learning
|
|
60
|
-
model training, pricing calculations, and model governance workflows in the insurance industry.
|
|
61
|
-
|
|
62
|
-
### Core Modules
|
|
63
|
-
|
|
64
|
-
| Module | Description |
|
|
65
|
-
|--------|-------------|
|
|
66
|
-
| modelling | ML model training (GLM, XGBoost, ResNet, FT-Transformer, GNN) and model interpretability |
|
|
67
|
-
| pricing | Factor table construction, numeric binning, premium calibration, exposure calculation, PSI monitoring |
|
|
68
|
-
| production | Model prediction, batch scoring, data drift detection, production metrics monitoring |
|
|
69
|
-
| governance | Model registry, version management, approval workflows, audit logging |
|
|
70
|
-
| reporting | Report generation (Markdown format), report scheduling |
|
|
71
|
-
| utils | Data validation, performance profiling, device management, logging configuration |
|
|
72
|
-
|
|
73
|
-
### Quick Start
|
|
74
|
-
|
|
75
|
-
```python
|
|
76
|
-
# Model training with Bayesian optimization
|
|
77
|
-
from ins_pricing import bayesopt as ropt
|
|
78
|
-
|
|
79
|
-
model = ropt.BayesOptModel(
|
|
80
|
-
train_data, test_data,
|
|
81
|
-
model_name='my_model',
|
|
82
|
-
resp_nme='target',
|
|
83
|
-
weight_nme='weight',
|
|
84
|
-
factor_nmes=feature_list,
|
|
85
|
-
cate_list=categorical_features,
|
|
86
|
-
)
|
|
87
|
-
model.bayesopt_xgb(max_evals=100) # Train XGBoost
|
|
88
|
-
model.bayesopt_resnet(max_evals=50) # Train ResNet
|
|
89
|
-
model.bayesopt_ft(max_evals=50) # Train FT-Transformer
|
|
90
|
-
|
|
91
|
-
# Pricing: build factor table
|
|
92
|
-
from ins_pricing.pricing import build_factor_table
|
|
93
|
-
factors = build_factor_table(
|
|
94
|
-
df,
|
|
95
|
-
factor_col='age_band',
|
|
96
|
-
loss_col='claim_amount',
|
|
97
|
-
exposure_col='exposure',
|
|
98
|
-
)
|
|
99
|
-
|
|
100
|
-
# Production: batch scoring
|
|
101
|
-
from ins_pricing.production import batch_score
|
|
102
|
-
scores = batch_score(model.trainers['xgb'].predict, df)
|
|
103
|
-
|
|
104
|
-
# Model governance
|
|
105
|
-
from ins_pricing.governance import ModelRegistry
|
|
106
|
-
registry = ModelRegistry('models.json')
|
|
107
|
-
registry.register(model_name, version, metrics=metrics)
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### Project Structure
|
|
111
|
-
|
|
112
|
-
```
|
|
113
|
-
ins_pricing/
|
|
114
|
-
cli/ # Command-line entry points
|
|
115
|
-
modelling/
|
|
116
|
-
core/bayesopt/ # ML model training core
|
|
117
|
-
explain/ # Model interpretability
|
|
118
|
-
plotting/ # Model visualization
|
|
119
|
-
pricing/ # Insurance pricing module
|
|
120
|
-
production/ # Production deployment module
|
|
121
|
-
governance/ # Model governance
|
|
122
|
-
reporting/ # Report generation
|
|
123
|
-
utils/ # Utilities
|
|
124
|
-
tests/ # Test suite
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
### Installation
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
# Basic installation
|
|
131
|
-
pip install ins_pricing
|
|
132
|
-
|
|
133
|
-
# Full installation (all optional dependencies)
|
|
134
|
-
pip install ins_pricing[all]
|
|
135
|
-
|
|
136
|
-
# Install specific extras
|
|
137
|
-
pip install ins_pricing[bayesopt] # Model training
|
|
138
|
-
pip install ins_pricing[explain] # Model explanation
|
|
139
|
-
pip install ins_pricing[plotting] # Visualization
|
|
140
|
-
pip install ins_pricing[gnn] # Graph neural networks
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
#### Multi-platform and GPU notes
|
|
144
|
-
|
|
145
|
-
- Install the correct PyTorch build for your platform/GPU before installing extras.
|
|
146
|
-
- Torch Geometric requires platform-specific wheels; follow the official PyG install guide.
|
|
147
|
-
- Multi-GPU uses torch.distributed/DataParallel where supported; Windows disables CUDA DDP.
|
|
148
|
-
|
|
149
|
-
---
|
|
150
|
-
## PyPI Upload (scripts)
|
|
151
|
-
|
|
152
|
-
This repo includes upload scripts for Windows and Linux/macOS.
|
|
153
|
-
|
|
154
|
-
### Windows
|
|
155
|
-
|
|
156
|
-
```cmd
|
|
157
|
-
set TWINE_PASSWORD=your_pypi_token_here
|
|
158
|
-
python -m build
|
|
159
|
-
upload_to_pypi.bat
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
### Linux / macOS
|
|
163
|
-
|
|
164
|
-
```bash
|
|
165
|
-
chmod +x upload_to_pypi.sh
|
|
166
|
-
export TWINE_PASSWORD='your_pypi_token_here'
|
|
167
|
-
python -m build
|
|
168
|
-
./upload_to_pypi.sh
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
### Makefile (if make is available)
|
|
172
|
-
|
|
173
|
-
```bash
|
|
174
|
-
make build
|
|
175
|
-
make upload
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
### Tips
|
|
179
|
-
|
|
180
|
-
- Never commit tokens to version control.
|
|
181
|
-
- Use environment variables or secret managers to store credentials.
|
|
182
|
-
- Test with TestPyPI before publishing when needed.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ins_pricing
|
|
3
|
+
Version: 0.5.0
|
|
4
|
+
Summary: Reusable modelling, pricing, governance, and reporting utilities.
|
|
5
|
+
Author: meishi125478
|
|
6
|
+
License: Proprietary
|
|
7
|
+
Keywords: pricing,insurance,bayesopt,ml
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
11
|
+
Classifier: License :: Other/Proprietary License
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Requires-Python: >=3.9
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
Requires-Dist: numpy>=1.20
|
|
17
|
+
Requires-Dist: pandas>=1.4
|
|
18
|
+
Provides-Extra: bayesopt
|
|
19
|
+
Requires-Dist: torch>=1.13; extra == "bayesopt"
|
|
20
|
+
Requires-Dist: optuna>=3.0; extra == "bayesopt"
|
|
21
|
+
Requires-Dist: xgboost>=1.6; extra == "bayesopt"
|
|
22
|
+
Requires-Dist: scikit-learn>=1.1; extra == "bayesopt"
|
|
23
|
+
Requires-Dist: statsmodels>=0.13; extra == "bayesopt"
|
|
24
|
+
Requires-Dist: joblib>=1.2; extra == "bayesopt"
|
|
25
|
+
Requires-Dist: matplotlib>=3.5; extra == "bayesopt"
|
|
26
|
+
Provides-Extra: plotting
|
|
27
|
+
Requires-Dist: matplotlib>=3.5; extra == "plotting"
|
|
28
|
+
Requires-Dist: scikit-learn>=1.1; extra == "plotting"
|
|
29
|
+
Provides-Extra: explain
|
|
30
|
+
Requires-Dist: torch>=1.13; extra == "explain"
|
|
31
|
+
Requires-Dist: shap>=0.41; extra == "explain"
|
|
32
|
+
Requires-Dist: scikit-learn>=1.1; extra == "explain"
|
|
33
|
+
Provides-Extra: geo
|
|
34
|
+
Requires-Dist: contextily>=1.3; extra == "geo"
|
|
35
|
+
Requires-Dist: matplotlib>=3.5; extra == "geo"
|
|
36
|
+
Provides-Extra: gnn
|
|
37
|
+
Requires-Dist: torch>=1.13; extra == "gnn"
|
|
38
|
+
Requires-Dist: pynndescent>=0.5; extra == "gnn"
|
|
39
|
+
Requires-Dist: torch-geometric>=2.3; extra == "gnn"
|
|
40
|
+
Provides-Extra: all
|
|
41
|
+
Requires-Dist: torch>=1.13; extra == "all"
|
|
42
|
+
Requires-Dist: optuna>=3.0; extra == "all"
|
|
43
|
+
Requires-Dist: xgboost>=1.6; extra == "all"
|
|
44
|
+
Requires-Dist: scikit-learn>=1.1; extra == "all"
|
|
45
|
+
Requires-Dist: statsmodels>=0.13; extra == "all"
|
|
46
|
+
Requires-Dist: joblib>=1.2; extra == "all"
|
|
47
|
+
Requires-Dist: matplotlib>=3.5; extra == "all"
|
|
48
|
+
Requires-Dist: shap>=0.41; extra == "all"
|
|
49
|
+
Requires-Dist: contextily>=1.3; extra == "all"
|
|
50
|
+
Requires-Dist: pynndescent>=0.5; extra == "all"
|
|
51
|
+
Requires-Dist: torch-geometric>=2.3; extra == "all"
|
|
52
|
+
|
|
53
|
+
# Insurance-Pricing
|
|
54
|
+
|
|
55
|
+
A reusable toolkit for insurance modeling, pricing, governance, and reporting.
|
|
56
|
+
|
|
57
|
+
## Overview
|
|
58
|
+
|
|
59
|
+
Insurance-Pricing (ins_pricing) is an enterprise-grade Python library designed for machine learning
|
|
60
|
+
model training, pricing calculations, and model governance workflows in the insurance industry.
|
|
61
|
+
|
|
62
|
+
### Core Modules
|
|
63
|
+
|
|
64
|
+
| Module | Description |
|
|
65
|
+
|--------|-------------|
|
|
66
|
+
| modelling | ML model training (GLM, XGBoost, ResNet, FT-Transformer, GNN) and model interpretability |
|
|
67
|
+
| pricing | Factor table construction, numeric binning, premium calibration, exposure calculation, PSI monitoring |
|
|
68
|
+
| production | Model prediction, batch scoring, data drift detection, production metrics monitoring |
|
|
69
|
+
| governance | Model registry, version management, approval workflows, audit logging |
|
|
70
|
+
| reporting | Report generation (Markdown format), report scheduling |
|
|
71
|
+
| utils | Data validation, performance profiling, device management, logging configuration |
|
|
72
|
+
|
|
73
|
+
### Quick Start
|
|
74
|
+
|
|
75
|
+
```python
|
|
76
|
+
# Model training with Bayesian optimization
|
|
77
|
+
from ins_pricing import bayesopt as ropt
|
|
78
|
+
|
|
79
|
+
model = ropt.BayesOptModel(
|
|
80
|
+
train_data, test_data,
|
|
81
|
+
model_name='my_model',
|
|
82
|
+
resp_nme='target',
|
|
83
|
+
weight_nme='weight',
|
|
84
|
+
factor_nmes=feature_list,
|
|
85
|
+
cate_list=categorical_features,
|
|
86
|
+
)
|
|
87
|
+
model.bayesopt_xgb(max_evals=100) # Train XGBoost
|
|
88
|
+
model.bayesopt_resnet(max_evals=50) # Train ResNet
|
|
89
|
+
model.bayesopt_ft(max_evals=50) # Train FT-Transformer
|
|
90
|
+
|
|
91
|
+
# Pricing: build factor table
|
|
92
|
+
from ins_pricing.pricing import build_factor_table
|
|
93
|
+
factors = build_factor_table(
|
|
94
|
+
df,
|
|
95
|
+
factor_col='age_band',
|
|
96
|
+
loss_col='claim_amount',
|
|
97
|
+
exposure_col='exposure',
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
# Production: batch scoring
|
|
101
|
+
from ins_pricing.production import batch_score
|
|
102
|
+
scores = batch_score(model.trainers['xgb'].predict, df)
|
|
103
|
+
|
|
104
|
+
# Model governance
|
|
105
|
+
from ins_pricing.governance import ModelRegistry
|
|
106
|
+
registry = ModelRegistry('models.json')
|
|
107
|
+
registry.register(model_name, version, metrics=metrics)
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Project Structure
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
ins_pricing/
|
|
114
|
+
cli/ # Command-line entry points
|
|
115
|
+
modelling/
|
|
116
|
+
core/bayesopt/ # ML model training core
|
|
117
|
+
explain/ # Model interpretability
|
|
118
|
+
plotting/ # Model visualization
|
|
119
|
+
pricing/ # Insurance pricing module
|
|
120
|
+
production/ # Production deployment module
|
|
121
|
+
governance/ # Model governance
|
|
122
|
+
reporting/ # Report generation
|
|
123
|
+
utils/ # Utilities
|
|
124
|
+
tests/ # Test suite
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Installation
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
# Basic installation
|
|
131
|
+
pip install ins_pricing
|
|
132
|
+
|
|
133
|
+
# Full installation (all optional dependencies)
|
|
134
|
+
pip install ins_pricing[all]
|
|
135
|
+
|
|
136
|
+
# Install specific extras
|
|
137
|
+
pip install ins_pricing[bayesopt] # Model training
|
|
138
|
+
pip install ins_pricing[explain] # Model explanation
|
|
139
|
+
pip install ins_pricing[plotting] # Visualization
|
|
140
|
+
pip install ins_pricing[gnn] # Graph neural networks
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
#### Multi-platform and GPU notes
|
|
144
|
+
|
|
145
|
+
- Install the correct PyTorch build for your platform/GPU before installing extras.
|
|
146
|
+
- Torch Geometric requires platform-specific wheels; follow the official PyG install guide.
|
|
147
|
+
- Multi-GPU uses torch.distributed/DataParallel where supported; Windows disables CUDA DDP.
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
## PyPI Upload (scripts)
|
|
151
|
+
|
|
152
|
+
This repo includes upload scripts for Windows and Linux/macOS.
|
|
153
|
+
|
|
154
|
+
### Windows
|
|
155
|
+
|
|
156
|
+
```cmd
|
|
157
|
+
set TWINE_PASSWORD=your_pypi_token_here
|
|
158
|
+
python -m build
|
|
159
|
+
upload_to_pypi.bat
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Linux / macOS
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
chmod +x upload_to_pypi.sh
|
|
166
|
+
export TWINE_PASSWORD='your_pypi_token_here'
|
|
167
|
+
python -m build
|
|
168
|
+
./upload_to_pypi.sh
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Makefile (if make is available)
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
make build
|
|
175
|
+
make upload
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### Tips
|
|
179
|
+
|
|
180
|
+
- Never commit tokens to version control.
|
|
181
|
+
- Use environment variables or secret managers to store credentials.
|
|
182
|
+
- Test with TestPyPI before publishing when needed.
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
ins_pricing/README.md,sha256=pufz_ChEpXXfLk96prv8ciqwgyVvHE5aEZ8iAH-u6k0,3679
|
|
2
|
+
ins_pricing/__init__.py,sha256=pATYokjg75DXHd2zyoct62efui98SCBO2H8B06Q68r0,4317
|
|
3
|
+
ins_pricing/exceptions.py,sha256=5fZavPV4zNJ7wPC75L215KkHXX9pRrfDAYZOdSKJMGo,4778
|
|
4
|
+
ins_pricing/setup.py,sha256=feMDVmV2OzKeTV_VXlydPRlS5fqUYifXfp2E_o42O6E,1702
|
|
5
|
+
ins_pricing/cli/BayesOpt_entry.py,sha256=FxGzUydBHeNdcNDVxh8D2J8bTGsJBDLTnV56a4AKQa0,1746
|
|
6
|
+
ins_pricing/cli/BayesOpt_incremental.py,sha256=N2s7OpwLBXewRgL0wkDeFociZj5BxSHqPs3pLsc8cw8,34650
|
|
7
|
+
ins_pricing/cli/Explain_Run.py,sha256=AG8KS1gl_EN4BqYFDBc9GCIGXHoZFZ1-auOkZgGO_s8,968
|
|
8
|
+
ins_pricing/cli/Explain_entry.py,sha256=n1oI9GhKpjplWAwXGc6koUAxQHjKByf0mqWxJwP58to,22762
|
|
9
|
+
ins_pricing/cli/Pricing_Run.py,sha256=Wj2InvD_Vxini-RBu0k7Xkei_cnRnnPiiD65OCYwbKQ,1015
|
|
10
|
+
ins_pricing/cli/__init__.py,sha256=F296f1J_tBPv33lDJQ6LaN_CPwMJTMtOuTsMof0dr2o,50
|
|
11
|
+
ins_pricing/cli/bayesopt_entry_runner.py,sha256=Mk9SaAc7fvsK7qQjKtu16ekZt4Rv0uGJjkHOlCy06QU,55374
|
|
12
|
+
ins_pricing/cli/watchdog_run.py,sha256=J1lWn8fSpWIx0OOX3d01K-ALGYqItuGhTQQ4JoZx6SM,6683
|
|
13
|
+
ins_pricing/cli/utils/__init__.py,sha256=u3kt1B27OiuOEgw6PQN-fNs9vNiAjdPyybsRQsZkM_I,54
|
|
14
|
+
ins_pricing/cli/utils/cli_common.py,sha256=Tjr20GWK3XT-KidrFCHwodrRukpaInNzsMzEgM9MgYQ,8530
|
|
15
|
+
ins_pricing/cli/utils/cli_config.py,sha256=ZGfvLSUNJAZjW-QTLVP64Z6MvXDB3444r5Q0khdx5sk,13643
|
|
16
|
+
ins_pricing/cli/utils/evaluation_context.py,sha256=0zuDOcVzkWiuj4HyAT0psaAfEbSqpDXEGXSjxztHY6E,9485
|
|
17
|
+
ins_pricing/cli/utils/import_resolver.py,sha256=_KyQ9mNv-1juyK5rOKQXJpRDpJFZwDgKjdzRU7SJWks,13760
|
|
18
|
+
ins_pricing/cli/utils/notebook_utils.py,sha256=de-5QKU9mcxi1Rxcva8Z6VWBhjJZ8rOcek1KNypoOwM,12398
|
|
19
|
+
ins_pricing/cli/utils/run_logging.py,sha256=V3Wh2EV6c1Mo0QTvfe4hl2J4LOR6bdQsT210o__YBWk,3677
|
|
20
|
+
ins_pricing/frontend/README.md,sha256=MKQuVtwpvrOKBJhcz9wgVtMc-jKERYATRNDIj-hA78Y,17551
|
|
21
|
+
ins_pricing/frontend/__init__.py,sha256=mbvo89webbtirzVCNmp26FrtYmLFtuwxkmZ5tcdab2U,405
|
|
22
|
+
ins_pricing/frontend/app.py,sha256=DBrnewX5RUjuJXGEezihZJcDnp-tEeA-fCuTeqAFEqU,38484
|
|
23
|
+
ins_pricing/frontend/config_builder.py,sha256=GNeEe7-Xt-WLakKlbdbQOE82ogWWwEFaKQ5LxxZeLFc,12261
|
|
24
|
+
ins_pricing/frontend/example_config.json,sha256=aDXH9_5bVlIclwMWH5WfgK572LVuraNbj4565o3d71k,741
|
|
25
|
+
ins_pricing/frontend/example_workflows.py,sha256=-yyoEucItAdVMVnmt6X7oDldaAqe5bWdrstMoNpZOxo,36815
|
|
26
|
+
ins_pricing/frontend/ft_workflow.py,sha256=CWrviErHEjZ2NPibIbPh69AYKPVkn-mXY7uncPihn-0,11206
|
|
27
|
+
ins_pricing/frontend/runner.py,sha256=0OB7C04PHpU04VrzZlEE-zOWrbdk5aztRck2BXKzbTc,13471
|
|
28
|
+
ins_pricing/governance/README.md,sha256=XnXLS5RPzWhEiicJ3WtGmpN935jppHhPftA9Lo2DPnQ,511
|
|
29
|
+
ins_pricing/governance/__init__.py,sha256=kCVZ_eNJnVNCFtefJBFz78KZxaR41IU1L2JoefiojiU,625
|
|
30
|
+
ins_pricing/governance/approval.py,sha256=cjJQjU1ziR-d-9wVSXyMyX6S5zijJqDWERZNxjqGAUE,2879
|
|
31
|
+
ins_pricing/governance/audit.py,sha256=f0aw-LaOxH5NGzxwczeLrGMJcxO-JDRn99BpI55KRn4,1040
|
|
32
|
+
ins_pricing/governance/registry.py,sha256=2uxQL6qMGY5IYWJti9MpaV_auvL--piJaasFrX20ghk,3139
|
|
33
|
+
ins_pricing/governance/release.py,sha256=9s-6V41RFaJ-z0V0RFw3_xgrk77BYfun0WN_w3uspqc,4946
|
|
34
|
+
ins_pricing/modelling/README.md,sha256=4q3CykeFcXo5FILGD2EtoX2yYVV0EbrYW-hwgcySBN0,2157
|
|
35
|
+
ins_pricing/modelling/__init__.py,sha256=1Z_fDHMpuGYOGh4s662mHh4EGMQkYG5hH8Fcg5Aln3I,4366
|
|
36
|
+
ins_pricing/modelling/evaluation.py,sha256=tgmQ-7RHhOkzPCLHtfm4HHNLJVwxYaFExnCVjoBqoeM,4154
|
|
37
|
+
ins_pricing/modelling/bayesopt/README.md,sha256=4wCQBJio0BwTG6ucu35iZ8h90EI6tB-CVjtW-KLTknw,1613
|
|
38
|
+
ins_pricing/modelling/bayesopt/__init__.py,sha256=wkTYjfU9Oi6sNCrn4pmF1QevEc2f_EF6k_PIiCYt-aY,1555
|
|
39
|
+
ins_pricing/modelling/bayesopt/config_components.py,sha256=OjRyM1EuSXL9_3THD1nGLRsioJs7lO_ZKVZDkUA3LX8,12156
|
|
40
|
+
ins_pricing/modelling/bayesopt/config_preprocess.py,sha256=g-D_jyhccEI2m5cqnerb0wjgTa9Ap4BkUoM8799AIS0,22752
|
|
41
|
+
ins_pricing/modelling/bayesopt/core.py,sha256=PVoKpSAPal5NbH4gKIjJGZHDIbDe7SLXUJ6NePUNI_E,45818
|
|
42
|
+
ins_pricing/modelling/bayesopt/model_explain_mixin.py,sha256=8LX72wJrzkyINI0AOE5labGhsH2VT1muIRDTiHQ2JQ4,11973
|
|
43
|
+
ins_pricing/modelling/bayesopt/model_plotting_mixin.py,sha256=PhpuRJM1tpeWvTIEvofMzB3EeIrDNOg2tpfR7XZT0wI,19243
|
|
44
|
+
ins_pricing/modelling/bayesopt/models/__init__.py,sha256=gFMAdElw08bnSM2qldv3IT8O6NSlWEUevHUfFrVtYGM,875
|
|
45
|
+
ins_pricing/modelling/bayesopt/models/model_ft_components.py,sha256=oDhmJQ26zF0PhoDC5Z2McA-JpLbXFQjSREqy0w_hWlQ,11883
|
|
46
|
+
ins_pricing/modelling/bayesopt/models/model_ft_trainer.py,sha256=0nE975FlPvE4jdML2-XoEPNVZdky_1t-ZdJBJwPAagA,40860
|
|
47
|
+
ins_pricing/modelling/bayesopt/models/model_gnn.py,sha256=_pc84cJElL_YxY6gF_AgnQWRH9hQx7pJii6RSATXIv0,33875
|
|
48
|
+
ins_pricing/modelling/bayesopt/models/model_resn.py,sha256=b6zHwccYYcyQ71JxByeDvmWg3tpraBSzD9A5vbqGhtc,18183
|
|
49
|
+
ins_pricing/modelling/bayesopt/trainers/__init__.py,sha256=O7u5452eQV9da6jBJRhjn_KkFLe4APGTq1x018wMqdM,734
|
|
50
|
+
ins_pricing/modelling/bayesopt/trainers/trainer_base.py,sha256=fPtwCWL1EQE8kcqy7t2KBziTotmVWEXAqEQnd-kzppg,57129
|
|
51
|
+
ins_pricing/modelling/bayesopt/trainers/trainer_ft.py,sha256=LNngZ7Jyw_tLkr79l7vVBZi8KpVH9mQY1790kNORV0U,37171
|
|
52
|
+
ins_pricing/modelling/bayesopt/trainers/trainer_glm.py,sha256=_gmgi5pcvMV4smUHp_Aj5vJsRVU0UnKRUAHdF_hHlEk,8167
|
|
53
|
+
ins_pricing/modelling/bayesopt/trainers/trainer_gnn.py,sha256=O9SzmjZUwidS_DqGdtOv1YlFHrj2aK1nDglJmB9Q1ns,14691
|
|
54
|
+
ins_pricing/modelling/bayesopt/trainers/trainer_resn.py,sha256=UArfQGUQeFr-8UWOjLOq3BY1e-pcGWDhBwYLzTtdk78,12216
|
|
55
|
+
ins_pricing/modelling/bayesopt/trainers/trainer_xgb.py,sha256=NDaEW2KV23JaSCdmsfsYiNAw6f-WqETkT0m-mCpA4ao,14156
|
|
56
|
+
ins_pricing/modelling/bayesopt/utils/__init__.py,sha256=SnFPs_g4eut2h2RrBjOO40Vh-tBBTCWOIHPdm7vMfqk,1553
|
|
57
|
+
ins_pricing/modelling/bayesopt/utils/constants.py,sha256=SNC5NJ1FfRQ-iuNmM8xHlaoaFgNpy1vnS_QOqNbJYRE,485
|
|
58
|
+
ins_pricing/modelling/bayesopt/utils/distributed_utils.py,sha256=cu01dHyYE5EREbmtJgCHSH6z5mQIqajz8_-oWZV6zVc,5787
|
|
59
|
+
ins_pricing/modelling/bayesopt/utils/io_utils.py,sha256=2Bg0fz1dngmBU8G8GZp3-CGLIGyhAxeMxwzIXYRINMc,224
|
|
60
|
+
ins_pricing/modelling/bayesopt/utils/losses.py,sha256=m4moKKwfKFl6yDIa9SGQV1u1sgX5MpKoSDF2KI85wyc,634
|
|
61
|
+
ins_pricing/modelling/bayesopt/utils/metrics_and_devices.py,sha256=-TKUHBEumWC4UssZIuthr5yzRBiKFivYXvI9-rCIvxg,317
|
|
62
|
+
ins_pricing/modelling/bayesopt/utils/torch_trainer_mixin.py,sha256=zGvwsulnjX4lXGyG2XJDcxvZ5QNmJaJuGNbpM75ZoUo,26522
|
|
63
|
+
ins_pricing/modelling/explain/__init__.py,sha256=WU4Fy0mEvqnmpX-aalKktj1goo9tnKCht9WOrWmZAtI,1342
|
|
64
|
+
ins_pricing/modelling/explain/gradients.py,sha256=9TqCws_p49nFxVMcjVxe4KCZ7frezeL0uV_LCdoM5yo,11088
|
|
65
|
+
ins_pricing/modelling/explain/metrics.py,sha256=9Dh-RcmV1uUlo8eacswsGeNTxTBRwSnjFHncFUFZZ8g,473
|
|
66
|
+
ins_pricing/modelling/explain/permutation.py,sha256=-_6KRkMA1EKHXrfCVs6ohjS9pI65af5zfWKSLLYHZkc,9599
|
|
67
|
+
ins_pricing/modelling/explain/shap_utils.py,sha256=70zRIHPPdoECFOFQeBTRxLZF-6sjaGJBNMIRS4_kmVI,10462
|
|
68
|
+
ins_pricing/modelling/plotting/__init__.py,sha256=AfqRYacai9UzMPBy4xQk3PdVTbCwT31saInSOJKIbeM,1398
|
|
69
|
+
ins_pricing/modelling/plotting/common.py,sha256=_kFq7JMA0LnKIp4bqAFvr-24VaHjj9pegDMm1qP9_7Y,1439
|
|
70
|
+
ins_pricing/modelling/plotting/compat.py,sha256=rmOct4rrjIX7EFodMfWnDtd8D4qE1inNTMvE9FUWa9k,8039
|
|
71
|
+
ins_pricing/modelling/plotting/curves.py,sha256=AyNeESaXOIN6efd3K0vAQ7hmDU4ifJNq6lx_9e3Xi7c,19000
|
|
72
|
+
ins_pricing/modelling/plotting/diagnostics.py,sha256=iHvZY1zCnFRbSczVluMYYRkkQXc-mwo0Z1DXyL3XMkI,5357
|
|
73
|
+
ins_pricing/modelling/plotting/geo.py,sha256=jQogaHt57W1-f8vzeGUdWE1oON2k4WVZKf2qoOM2Ct8,11401
|
|
74
|
+
ins_pricing/modelling/plotting/importance.py,sha256=j5FkPJH9FA6mJHMUfNkqU4Yi7IcqdGdIpcG-d76ORiw,3817
|
|
75
|
+
ins_pricing/pricing/README.md,sha256=PEcyw5oDkqJHOqnNdzBdbbpZwG4SOlnhMwY-owwQ0GI,1064
|
|
76
|
+
ins_pricing/pricing/__init__.py,sha256=hPgQP4IyhLfP1hEC5XckNzYmByhYEdlqw1D83X0hC8s,1022
|
|
77
|
+
ins_pricing/pricing/calibration.py,sha256=cx9fbDoOnNEMGPH6Js1EDMfVwy9J7zf_90yuNwD7W6I,6196
|
|
78
|
+
ins_pricing/pricing/data_quality.py,sha256=8FecBE60cABsTZE7HETuoKCEOXIrirGAFgg5wQCZrmU,4043
|
|
79
|
+
ins_pricing/pricing/exposure.py,sha256=rw8kKZ_1QdeGTCm13ck9NXrRBPt6TunxRw2s_qkHYkg,2575
|
|
80
|
+
ins_pricing/pricing/factors.py,sha256=1cqDqdXRLb9-yt-x60f0lPWdgAAOvk7slnawVIKcWDo,6573
|
|
81
|
+
ins_pricing/pricing/monitoring.py,sha256=GnfF2g1C9KzDks9ELBykfAd0zzVBUvjuTWoffa7aGbI,613
|
|
82
|
+
ins_pricing/pricing/rate_table.py,sha256=llDW95i7gR6cCtGFwcGqgpgFvOOPCURaJWmuQw1oce8,2473
|
|
83
|
+
ins_pricing/production/__init__.py,sha256=4PkwZFR3qmTXyY7g3xELqobC1KcFcozJaJ95hPPB9to,1231
|
|
84
|
+
ins_pricing/production/drift.py,sha256=q_oE_h2NbVETTBkh9QUu8Y68ERuFFcrfKpOb3zBcvsA,383
|
|
85
|
+
ins_pricing/production/inference.py,sha256=RaTQAI92XGuvb0cU224EEfQTzGs8ODshwCSFfkAyKog,27286
|
|
86
|
+
ins_pricing/production/monitoring.py,sha256=0quH2bvsDIHefVxwEE4lRIHC61t51fVEo1x6bdfhQdw,4144
|
|
87
|
+
ins_pricing/production/preprocess.py,sha256=cl20X0rVcKNCjVJswB8SdHffMgox6Qga4Ac29L6pW5g,9404
|
|
88
|
+
ins_pricing/production/scoring.py,sha256=yFmMmbYb7w_RC4uZOCMnAjLMRcjXQWIuT1nsfu-bwuc,1379
|
|
89
|
+
ins_pricing/reporting/README.md,sha256=kTVdB6pNewwh1HlCHrI2SzWTgprtQoQprLRQ2qLdgNA,486
|
|
90
|
+
ins_pricing/reporting/__init__.py,sha256=9MIGXjLrmW4lRunRz3dGhdeEGBkYJbrOO07C1ZPl6Ck,295
|
|
91
|
+
ins_pricing/reporting/report_builder.py,sha256=53ZFqGUx2isAoigT5IDwvXkek67zN7-6IgKeGpJhO7c,2241
|
|
92
|
+
ins_pricing/reporting/scheduler.py,sha256=9koG_1cmWvLqrS66uzMJuAlYI2VTkynV19ssB2TtcKU,1336
|
|
93
|
+
ins_pricing/tests/governance/__init__.py,sha256=5Nxg4_dIxY_J58_x2QOXrrRgw6L51Md0Wnt5Up-chqg,39
|
|
94
|
+
ins_pricing/tests/governance/test_audit.py,sha256=ubybXSTVILPN4VxQ2fMnG6oPNv4LjJJE3EsQ53NYdLU,1702
|
|
95
|
+
ins_pricing/tests/governance/test_registry.py,sha256=TvkNMLHViNuopjjho6oETwZ9d6MNaNM1xbL6URPDKSk,4602
|
|
96
|
+
ins_pricing/tests/governance/test_release.py,sha256=Cdo6prZ0xlioAP2AYHodzgASEIa6ZCLjbXW9Me2RGKk,2347
|
|
97
|
+
ins_pricing/tests/modelling/conftest.py,sha256=0KUXnkTgIGEIsf0J4uzIx5Kq4JkDyFo81Mv0qvIzW9k,180
|
|
98
|
+
ins_pricing/tests/modelling/test_cross_val_generic.py,sha256=iLZOFmdyrycB15lFWoQphkFlEjzZTozQXTLVOHLw2Qg,1721
|
|
99
|
+
ins_pricing/tests/modelling/test_distributed_utils.py,sha256=9cStpDw7jPdQwmm0Po-G2tB04uzSR1CoOUZMLuB61yI,466
|
|
100
|
+
ins_pricing/tests/modelling/test_explain.py,sha256=NZqKYuL-eSf9eC5ttjcMirfOc48ORMXZQm5PjmYk4jY,1445
|
|
101
|
+
ins_pricing/tests/modelling/test_geo_tokens_split.py,sha256=Ti57IynKB0aWOosr0g2RcZlDZyZC012XZ-hm6tWXBJg,1554
|
|
102
|
+
ins_pricing/tests/modelling/test_graph_cache.py,sha256=QEI5cLLtQ9_zwRR50KqUf8qxo9Jcp1WLxIGs4dSoMNk,821
|
|
103
|
+
ins_pricing/tests/modelling/test_plotting.py,sha256=4gJax72l40fQrjyJQLOgUmaT6xn6zXpujEaFNeHVwGw,1911
|
|
104
|
+
ins_pricing/tests/modelling/test_plotting_library.py,sha256=SB5RjKTaPydK848V0xpqEaJtEWhRv6ZfnHmnnzjaPh4,4079
|
|
105
|
+
ins_pricing/tests/modelling/test_preprocessor.py,sha256=FqbKltV803Pd-ZY1xBc4XF1T-INDuUliaVcMIDPmBxI,1438
|
|
106
|
+
ins_pricing/tests/pricing/__init__.py,sha256=SVfgUYBlCmc4wjYLMRX5xPFgQZxTS3aHBOA_Cx1aJg4,36
|
|
107
|
+
ins_pricing/tests/pricing/test_calibration.py,sha256=hLZuSWOH4t9WKcQ-2srvYp4P5ldr1Yh1dhl7s61vMp8,2420
|
|
108
|
+
ins_pricing/tests/pricing/test_exposure.py,sha256=CrpSncVce-PGt2XzjOX6qV0SA22vKPUv1u8RlKQjt_g,2054
|
|
109
|
+
ins_pricing/tests/pricing/test_factors.py,sha256=NTE7lz1RWChhoRt2K5003DoNRqG_Gu4X1Aauy2NexOg,5093
|
|
110
|
+
ins_pricing/tests/pricing/test_rate_table.py,sha256=ICHfAQsC9TaxXbQVKM5AvBaJXRTVY723Vaz1XOWNMW8,1250
|
|
111
|
+
ins_pricing/tests/production/__init__.py,sha256=WFWlvBVdjg-E-nKaiJ8VTKNELYufJusufpij1p1xwso,39
|
|
112
|
+
ins_pricing/tests/production/test_inference.py,sha256=l1wxpuukgdr4DLO_pSwyqxByIoVHQHmPR6LYIMQmeE0,2417
|
|
113
|
+
ins_pricing/tests/production/test_monitoring.py,sha256=jettbaVLH4a3efLWeiQ6FFukGEw7mmz6_AeYhYX0caQ,11409
|
|
114
|
+
ins_pricing/tests/production/test_preprocess.py,sha256=tsHYANwJjNlaSo8O4qiwqBvMOMtwmtZymRFm6UrODrE,11084
|
|
115
|
+
ins_pricing/tests/production/test_scoring.py,sha256=fKz2tJomodrRt333apCrjtyJCwg9RHRbWm0lvcU6xm0,9848
|
|
116
|
+
ins_pricing/utils/__init__.py,sha256=-TTuQohYWxqkrAUdRkPh5VFkGqQVQRUxv-Av4MBOvkc,3619
|
|
117
|
+
ins_pricing/utils/device.py,sha256=hPwaI1J4qMqADrENiPQBwx2SHq4tDQKm4eRLEb0qxSI,7804
|
|
118
|
+
ins_pricing/utils/features.py,sha256=_uPkX6wpzdC3XTeAYSI1qLYDVTN1Lcfh4OJ8OtBw5-8,1704
|
|
119
|
+
ins_pricing/utils/io.py,sha256=uu7PqXVbcvfSnN3ry6PsCKCaYy6kxL3GLXuJRciVDWA,2678
|
|
120
|
+
ins_pricing/utils/logging.py,sha256=_AKB4ErmvygwGLtu7Ai7ESemj6Hh8FTgh4cs8j_gVW4,2258
|
|
121
|
+
ins_pricing/utils/losses.py,sha256=u7JFgjnu9kuGD4tB8Lgvfihit5lOL0mbExN2h_JV5mg,4008
|
|
122
|
+
ins_pricing/utils/metrics.py,sha256=hh4PeDBYh3cXiOuTq6e6B084Lz1WbrzDvdJ85JRkx6A,13675
|
|
123
|
+
ins_pricing/utils/numerics.py,sha256=gLz3MVaTzz3xyH_qKaONRslBzUdJ7RCY7JoRGWbwa-U,2207
|
|
124
|
+
ins_pricing/utils/paths.py,sha256=ds_nt2JmP4Gq8nERJUdUFjh3rxGL2duOXNMifgutI6g,9153
|
|
125
|
+
ins_pricing/utils/profiling.py,sha256=kmbykHLcYywlZxAf_aVU8HXID3zOvUcBoO5Q58AijhA,11132
|
|
126
|
+
ins_pricing/utils/torch_compat.py,sha256=UrRsqx2qboDG8WE0OmxNOi08ojwE-dCxTQh0N2s3Rgw,2441
|
|
127
|
+
ins_pricing/utils/validation.py,sha256=4Tw9VUJPk0N-WO3YUqZP-xXRl1Xpubkm0vi3WzzZrv4,13348
|
|
128
|
+
ins_pricing-0.5.0.dist-info/METADATA,sha256=TP4HMzFA-XMgMx7mpEo_QkGJ5vBfGdsLu_Qoy-FoJ1s,6073
|
|
129
|
+
ins_pricing-0.5.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
130
|
+
ins_pricing-0.5.0.dist-info/top_level.txt,sha256=haZuNQpHKNBEPZx3NjLnHp8pV3I_J9QG8-HyJn00FA0,12
|
|
131
|
+
ins_pricing-0.5.0.dist-info/RECORD,,
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
import torch
|
|
4
|
-
|
|
5
|
-
try:
|
|
6
|
-
from .bayesopt.config_preprocess import (
|
|
7
|
-
BayesOptConfig,
|
|
8
|
-
DatasetPreprocessor,
|
|
9
|
-
OutputManager,
|
|
10
|
-
VersionManager,
|
|
11
|
-
)
|
|
12
|
-
from .bayesopt.core import BayesOptModel
|
|
13
|
-
from .bayesopt.models import (
|
|
14
|
-
FeatureTokenizer,
|
|
15
|
-
FTTransformerCore,
|
|
16
|
-
FTTransformerSklearn,
|
|
17
|
-
GraphNeuralNetSklearn,
|
|
18
|
-
MaskedTabularDataset,
|
|
19
|
-
ResBlock,
|
|
20
|
-
ResNetSequential,
|
|
21
|
-
ResNetSklearn,
|
|
22
|
-
ScaledTransformerEncoderLayer,
|
|
23
|
-
SimpleGraphLayer,
|
|
24
|
-
SimpleGNN,
|
|
25
|
-
TabularDataset,
|
|
26
|
-
)
|
|
27
|
-
from .bayesopt.trainers import (
|
|
28
|
-
FTTrainer,
|
|
29
|
-
GLMTrainer,
|
|
30
|
-
GNNTrainer,
|
|
31
|
-
ResNetTrainer,
|
|
32
|
-
TrainerBase,
|
|
33
|
-
XGBTrainer,
|
|
34
|
-
_xgb_cuda_available,
|
|
35
|
-
)
|
|
36
|
-
from .bayesopt.utils import (
|
|
37
|
-
EPS,
|
|
38
|
-
DistributedUtils,
|
|
39
|
-
IOUtils,
|
|
40
|
-
PlotUtils,
|
|
41
|
-
TorchTrainerMixin,
|
|
42
|
-
TrainingUtils,
|
|
43
|
-
compute_batch_size,
|
|
44
|
-
csv_to_dict,
|
|
45
|
-
ensure_parent_dir,
|
|
46
|
-
free_cuda,
|
|
47
|
-
infer_factor_and_cate_list,
|
|
48
|
-
plot_dlift_list,
|
|
49
|
-
plot_lift_list,
|
|
50
|
-
set_global_seed,
|
|
51
|
-
split_data,
|
|
52
|
-
tweedie_loss,
|
|
53
|
-
)
|
|
54
|
-
except ImportError: # pragma: no cover
|
|
55
|
-
from bayesopt.config_preprocess import (
|
|
56
|
-
BayesOptConfig,
|
|
57
|
-
DatasetPreprocessor,
|
|
58
|
-
OutputManager,
|
|
59
|
-
VersionManager,
|
|
60
|
-
)
|
|
61
|
-
from bayesopt.core import BayesOptModel
|
|
62
|
-
from bayesopt.models import (
|
|
63
|
-
FeatureTokenizer,
|
|
64
|
-
FTTransformerCore,
|
|
65
|
-
FTTransformerSklearn,
|
|
66
|
-
GraphNeuralNetSklearn,
|
|
67
|
-
MaskedTabularDataset,
|
|
68
|
-
ResBlock,
|
|
69
|
-
ResNetSequential,
|
|
70
|
-
ResNetSklearn,
|
|
71
|
-
ScaledTransformerEncoderLayer,
|
|
72
|
-
SimpleGraphLayer,
|
|
73
|
-
SimpleGNN,
|
|
74
|
-
TabularDataset,
|
|
75
|
-
)
|
|
76
|
-
from bayesopt.trainers import (
|
|
77
|
-
FTTrainer,
|
|
78
|
-
GLMTrainer,
|
|
79
|
-
GNNTrainer,
|
|
80
|
-
ResNetTrainer,
|
|
81
|
-
TrainerBase,
|
|
82
|
-
XGBTrainer,
|
|
83
|
-
_xgb_cuda_available,
|
|
84
|
-
)
|
|
85
|
-
from bayesopt.utils import (
|
|
86
|
-
EPS,
|
|
87
|
-
DistributedUtils,
|
|
88
|
-
IOUtils,
|
|
89
|
-
PlotUtils,
|
|
90
|
-
TorchTrainerMixin,
|
|
91
|
-
TrainingUtils,
|
|
92
|
-
compute_batch_size,
|
|
93
|
-
csv_to_dict,
|
|
94
|
-
ensure_parent_dir,
|
|
95
|
-
free_cuda,
|
|
96
|
-
infer_factor_and_cate_list,
|
|
97
|
-
plot_dlift_list,
|
|
98
|
-
plot_lift_list,
|
|
99
|
-
set_global_seed,
|
|
100
|
-
split_data,
|
|
101
|
-
tweedie_loss,
|
|
102
|
-
)
|
|
103
|
-
|
|
104
|
-
__all__ = [
|
|
105
|
-
"BayesOptConfig",
|
|
106
|
-
"DatasetPreprocessor",
|
|
107
|
-
"OutputManager",
|
|
108
|
-
"VersionManager",
|
|
109
|
-
"BayesOptModel",
|
|
110
|
-
"FeatureTokenizer",
|
|
111
|
-
"FTTransformerCore",
|
|
112
|
-
"FTTransformerSklearn",
|
|
113
|
-
"GraphNeuralNetSklearn",
|
|
114
|
-
"MaskedTabularDataset",
|
|
115
|
-
"ResBlock",
|
|
116
|
-
"ResNetSequential",
|
|
117
|
-
"ResNetSklearn",
|
|
118
|
-
"ScaledTransformerEncoderLayer",
|
|
119
|
-
"SimpleGraphLayer",
|
|
120
|
-
"SimpleGNN",
|
|
121
|
-
"TabularDataset",
|
|
122
|
-
"FTTrainer",
|
|
123
|
-
"GLMTrainer",
|
|
124
|
-
"GNNTrainer",
|
|
125
|
-
"ResNetTrainer",
|
|
126
|
-
"TrainerBase",
|
|
127
|
-
"XGBTrainer",
|
|
128
|
-
"_xgb_cuda_available",
|
|
129
|
-
"EPS",
|
|
130
|
-
"DistributedUtils",
|
|
131
|
-
"IOUtils",
|
|
132
|
-
"PlotUtils",
|
|
133
|
-
"TorchTrainerMixin",
|
|
134
|
-
"TrainingUtils",
|
|
135
|
-
"compute_batch_size",
|
|
136
|
-
"csv_to_dict",
|
|
137
|
-
"ensure_parent_dir",
|
|
138
|
-
"free_cuda",
|
|
139
|
-
"infer_factor_and_cate_list",
|
|
140
|
-
"plot_dlift_list",
|
|
141
|
-
"plot_lift_list",
|
|
142
|
-
"set_global_seed",
|
|
143
|
-
"split_data",
|
|
144
|
-
"tweedie_loss",
|
|
145
|
-
"torch",
|
|
146
|
-
]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"""Core modelling modules (bayesopt + evaluation)."""
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"""Trainer implementations split by model type."""
|
|
2
|
-
from __future__ import annotations
|
|
3
|
-
|
|
4
|
-
from .trainer_base import TrainerBase
|
|
5
|
-
from .trainer_ft import FTTrainer
|
|
6
|
-
from .trainer_glm import GLMTrainer
|
|
7
|
-
from .trainer_gnn import GNNTrainer
|
|
8
|
-
from .trainer_resn import ResNetTrainer
|
|
9
|
-
from .trainer_xgb import XGBTrainer, _xgb_cuda_available
|
|
10
|
-
|
|
11
|
-
__all__ = [
|
|
12
|
-
"TrainerBase",
|
|
13
|
-
"FTTrainer",
|
|
14
|
-
"GLMTrainer",
|
|
15
|
-
"GNNTrainer",
|
|
16
|
-
"ResNetTrainer",
|
|
17
|
-
"XGBTrainer",
|
|
18
|
-
"_xgb_cuda_available",
|
|
19
|
-
]
|