ins-pricing 0.4.5__py3-none-any.whl → 0.5.1__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 +58 -46
- ins_pricing/cli/BayesOpt_incremental.py +77 -110
- ins_pricing/cli/Explain_Run.py +42 -23
- ins_pricing/cli/Explain_entry.py +551 -577
- ins_pricing/cli/Pricing_Run.py +42 -23
- ins_pricing/cli/bayesopt_entry_runner.py +51 -16
- ins_pricing/cli/utils/bootstrap.py +23 -0
- ins_pricing/cli/utils/cli_common.py +256 -256
- ins_pricing/cli/utils/cli_config.py +379 -360
- ins_pricing/cli/utils/import_resolver.py +375 -358
- ins_pricing/cli/utils/notebook_utils.py +256 -242
- ins_pricing/cli/watchdog_run.py +216 -198
- ins_pricing/frontend/__init__.py +10 -10
- ins_pricing/frontend/app.py +132 -61
- ins_pricing/frontend/config_builder.py +33 -0
- ins_pricing/frontend/example_config.json +11 -0
- ins_pricing/frontend/example_workflows.py +1 -1
- ins_pricing/frontend/runner.py +340 -388
- ins_pricing/governance/__init__.py +20 -20
- ins_pricing/governance/release.py +159 -159
- ins_pricing/modelling/README.md +1 -1
- ins_pricing/modelling/__init__.py +147 -92
- ins_pricing/modelling/{core/bayesopt → bayesopt}/README.md +31 -13
- ins_pricing/modelling/{core/bayesopt → bayesopt}/__init__.py +64 -102
- ins_pricing/modelling/{core/bayesopt → bayesopt}/config_components.py +12 -0
- ins_pricing/modelling/{core/bayesopt → bayesopt}/config_preprocess.py +589 -552
- ins_pricing/modelling/{core/bayesopt → bayesopt}/core.py +987 -958
- ins_pricing/modelling/{core/bayesopt → bayesopt}/model_explain_mixin.py +296 -296
- ins_pricing/modelling/{core/bayesopt → bayesopt}/model_plotting_mixin.py +488 -548
- ins_pricing/modelling/{core/bayesopt → bayesopt}/models/__init__.py +27 -27
- ins_pricing/modelling/{core/bayesopt → bayesopt}/models/model_ft_components.py +349 -342
- ins_pricing/modelling/{core/bayesopt → bayesopt}/models/model_ft_trainer.py +921 -913
- ins_pricing/modelling/{core/bayesopt → bayesopt}/models/model_gnn.py +794 -785
- ins_pricing/modelling/{core/bayesopt → bayesopt}/models/model_resn.py +454 -446
- ins_pricing/modelling/bayesopt/trainers/__init__.py +19 -0
- ins_pricing/modelling/{core/bayesopt → bayesopt}/trainers/trainer_base.py +1294 -1282
- ins_pricing/modelling/{core/bayesopt → bayesopt}/trainers/trainer_ft.py +64 -56
- ins_pricing/modelling/{core/bayesopt → bayesopt}/trainers/trainer_glm.py +203 -198
- ins_pricing/modelling/{core/bayesopt → bayesopt}/trainers/trainer_gnn.py +333 -325
- ins_pricing/modelling/{core/bayesopt → bayesopt}/trainers/trainer_resn.py +279 -267
- ins_pricing/modelling/{core/bayesopt → bayesopt}/trainers/trainer_xgb.py +515 -313
- ins_pricing/modelling/bayesopt/utils/__init__.py +67 -0
- ins_pricing/modelling/bayesopt/utils/constants.py +21 -0
- ins_pricing/modelling/{core/bayesopt → bayesopt}/utils/distributed_utils.py +193 -186
- 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 +636 -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/pricing/factors.py +67 -56
- 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 +112 -78
- ins_pricing/utils/device.py +258 -237
- ins_pricing/utils/features.py +53 -0
- ins_pricing/utils/io.py +72 -0
- ins_pricing/utils/logging.py +34 -1
- 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/utils/profiling.py +8 -4
- {ins_pricing-0.4.5.dist-info → ins_pricing-0.5.1.dist-info}/METADATA +1 -1
- ins_pricing-0.5.1.dist-info/RECORD +132 -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-0.4.5.dist-info → ins_pricing-0.5.1.dist-info}/WHEEL +0 -0
- {ins_pricing-0.4.5.dist-info → ins_pricing-0.5.1.dist-info}/top_level.txt +0 -0
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
"""DEPRECATED: Backward compatibility wrapper.
|
|
2
|
-
|
|
3
|
-
This module is kept for backward compatibility but will be removed in v0.4.0.
|
|
4
|
-
The monolithic utils.py (1,503 lines) has been split into focused modules:
|
|
5
|
-
|
|
6
|
-
utils/
|
|
7
|
-
├── constants.py - EPS, set_global_seed, etc.
|
|
8
|
-
├── io_utils.py - IOUtils for file operations
|
|
9
|
-
├── distributed_utils.py - DistributedUtils, TrainingUtils
|
|
10
|
-
├── torch_trainer_mixin.py - TorchTrainerMixin for PyTorch
|
|
11
|
-
└── metrics_and_devices.py - Metrics, GPU, device, CV, plotting
|
|
12
|
-
|
|
13
|
-
All imports still work the same way:
|
|
14
|
-
from ins_pricing.modelling.core.bayesopt.utils import EPS, IOUtils
|
|
15
|
-
|
|
16
|
-
Or use the new package directly:
|
|
17
|
-
from ins_pricing.modelling.core.bayesopt.utils import EPS, IOUtils
|
|
18
|
-
from ins_pricing.modelling.core.bayesopt.utils.constants import EPS
|
|
19
|
-
|
|
20
|
-
Both will work identically. The old single-file import will show a deprecation
|
|
21
|
-
warning but continues to function.
|
|
22
|
-
"""
|
|
23
|
-
|
|
24
|
-
from __future__ import annotations
|
|
25
|
-
|
|
26
|
-
import os
|
|
27
|
-
import warnings
|
|
28
|
-
|
|
29
|
-
# Show deprecation warning
|
|
30
|
-
warnings.warn(
|
|
31
|
-
"Importing from bayesopt.utils (single file) is deprecated. "
|
|
32
|
-
"This file will be removed in v0.4.0. "
|
|
33
|
-
"The utils module has been split into focused submodules for better maintainability. "
|
|
34
|
-
"Imports will continue to work from the utils package without changes.",
|
|
35
|
-
DeprecationWarning,
|
|
36
|
-
stacklevel=2
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
# Treat this module as a package so submodules resolve even if this file is loaded.
|
|
40
|
-
__path__ = [os.path.join(os.path.dirname(__file__), "utils")]
|
|
41
|
-
|
|
42
|
-
# Re-export from refactored utils package for backward compatibility
|
|
43
|
-
from .utils.constants import (
|
|
44
|
-
EPS,
|
|
45
|
-
set_global_seed,
|
|
46
|
-
ensure_parent_dir,
|
|
47
|
-
compute_batch_size,
|
|
48
|
-
tweedie_loss,
|
|
49
|
-
infer_factor_and_cate_list,
|
|
50
|
-
)
|
|
51
|
-
from .utils.io_utils import (
|
|
52
|
-
IOUtils,
|
|
53
|
-
csv_to_dict,
|
|
54
|
-
)
|
|
55
|
-
from .utils.distributed_utils import (
|
|
56
|
-
DistributedUtils,
|
|
57
|
-
TrainingUtils,
|
|
58
|
-
free_cuda,
|
|
59
|
-
)
|
|
60
|
-
from .utils.torch_trainer_mixin import (
|
|
61
|
-
TorchTrainerMixin,
|
|
62
|
-
)
|
|
63
|
-
from .utils.metrics_and_devices import (
|
|
64
|
-
get_logger,
|
|
65
|
-
MetricFactory,
|
|
66
|
-
GPUMemoryManager,
|
|
67
|
-
DeviceManager,
|
|
68
|
-
CVStrategyResolver,
|
|
69
|
-
PlotUtils,
|
|
70
|
-
split_data,
|
|
71
|
-
plot_lift_list,
|
|
72
|
-
plot_dlift_list,
|
|
73
|
-
_OrderedSplitter,
|
|
74
|
-
)
|
|
75
|
-
|
|
76
|
-
# Explicitly list all exports to support IDE auto-completion
|
|
77
|
-
__all__ = [
|
|
78
|
-
# Constants
|
|
79
|
-
'EPS',
|
|
80
|
-
'set_global_seed',
|
|
81
|
-
'ensure_parent_dir',
|
|
82
|
-
'compute_batch_size',
|
|
83
|
-
'tweedie_loss',
|
|
84
|
-
'infer_factor_and_cate_list',
|
|
85
|
-
# I/O
|
|
86
|
-
'IOUtils',
|
|
87
|
-
'csv_to_dict',
|
|
88
|
-
# Distributed
|
|
89
|
-
'DistributedUtils',
|
|
90
|
-
'TrainingUtils',
|
|
91
|
-
'free_cuda',
|
|
92
|
-
# PyTorch
|
|
93
|
-
'TorchTrainerMixin',
|
|
94
|
-
# Utilities
|
|
95
|
-
'get_logger',
|
|
96
|
-
'MetricFactory',
|
|
97
|
-
'GPUMemoryManager',
|
|
98
|
-
'DeviceManager',
|
|
99
|
-
'CVStrategyResolver',
|
|
100
|
-
'PlotUtils',
|
|
101
|
-
'split_data',
|
|
102
|
-
'plot_lift_list',
|
|
103
|
-
'plot_dlift_list',
|
|
104
|
-
'_OrderedSplitter',
|
|
105
|
-
]
|