churnkit 0.76.0a2__py3-none-any.whl → 0.76.0a3__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.
- {churnkit-0.76.0a2.dist-info → churnkit-0.76.0a3.dist-info}/METADATA +1 -1
- {churnkit-0.76.0a2.dist-info → churnkit-0.76.0a3.dist-info}/RECORD +27 -27
- customer_retention/__init__.py +1 -1
- customer_retention/core/config/experiments.py +15 -0
- customer_retention/integrations/databricks_init.py +18 -2
- {churnkit-0.76.0a2.data → churnkit-0.76.0a3.data}/data/share/churnkit/exploration_notebooks/00_start_here.ipynb +0 -0
- {churnkit-0.76.0a2.data → churnkit-0.76.0a3.data}/data/share/churnkit/exploration_notebooks/01_data_discovery.ipynb +0 -0
- {churnkit-0.76.0a2.data → churnkit-0.76.0a3.data}/data/share/churnkit/exploration_notebooks/01a_a_temporal_text_deep_dive.ipynb +0 -0
- {churnkit-0.76.0a2.data → churnkit-0.76.0a3.data}/data/share/churnkit/exploration_notebooks/01a_temporal_deep_dive.ipynb +0 -0
- {churnkit-0.76.0a2.data → churnkit-0.76.0a3.data}/data/share/churnkit/exploration_notebooks/01b_temporal_quality.ipynb +0 -0
- {churnkit-0.76.0a2.data → churnkit-0.76.0a3.data}/data/share/churnkit/exploration_notebooks/01c_temporal_patterns.ipynb +0 -0
- {churnkit-0.76.0a2.data → churnkit-0.76.0a3.data}/data/share/churnkit/exploration_notebooks/01d_event_aggregation.ipynb +0 -0
- {churnkit-0.76.0a2.data → churnkit-0.76.0a3.data}/data/share/churnkit/exploration_notebooks/02_column_deep_dive.ipynb +0 -0
- {churnkit-0.76.0a2.data → churnkit-0.76.0a3.data}/data/share/churnkit/exploration_notebooks/02a_text_columns_deep_dive.ipynb +0 -0
- {churnkit-0.76.0a2.data → churnkit-0.76.0a3.data}/data/share/churnkit/exploration_notebooks/03_quality_assessment.ipynb +0 -0
- {churnkit-0.76.0a2.data → churnkit-0.76.0a3.data}/data/share/churnkit/exploration_notebooks/04_relationship_analysis.ipynb +0 -0
- {churnkit-0.76.0a2.data → churnkit-0.76.0a3.data}/data/share/churnkit/exploration_notebooks/05_multi_dataset.ipynb +0 -0
- {churnkit-0.76.0a2.data → churnkit-0.76.0a3.data}/data/share/churnkit/exploration_notebooks/06_feature_opportunities.ipynb +0 -0
- {churnkit-0.76.0a2.data → churnkit-0.76.0a3.data}/data/share/churnkit/exploration_notebooks/07_modeling_readiness.ipynb +0 -0
- {churnkit-0.76.0a2.data → churnkit-0.76.0a3.data}/data/share/churnkit/exploration_notebooks/08_baseline_experiments.ipynb +0 -0
- {churnkit-0.76.0a2.data → churnkit-0.76.0a3.data}/data/share/churnkit/exploration_notebooks/09_business_alignment.ipynb +0 -0
- {churnkit-0.76.0a2.data → churnkit-0.76.0a3.data}/data/share/churnkit/exploration_notebooks/10_spec_generation.ipynb +0 -0
- {churnkit-0.76.0a2.data → churnkit-0.76.0a3.data}/data/share/churnkit/exploration_notebooks/11_scoring_validation.ipynb +0 -0
- {churnkit-0.76.0a2.data → churnkit-0.76.0a3.data}/data/share/churnkit/exploration_notebooks/12_view_documentation.ipynb +0 -0
- {churnkit-0.76.0a2.dist-info → churnkit-0.76.0a3.dist-info}/WHEEL +0 -0
- {churnkit-0.76.0a2.dist-info → churnkit-0.76.0a3.dist-info}/entry_points.txt +0 -0
- {churnkit-0.76.0a2.dist-info → churnkit-0.76.0a3.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: churnkit
|
|
3
|
-
Version: 0.76.
|
|
3
|
+
Version: 0.76.0a3
|
|
4
4
|
Summary: Structured ML framework for customer churn prediction -- from exploration notebooks to production pipelines, locally or on Databricks.
|
|
5
5
|
Project-URL: Homepage, https://github.com/aladjov/CR
|
|
6
6
|
Project-URL: Documentation, https://github.com/aladjov/CR/wiki
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
customer_retention/__init__.py,sha256=
|
|
1
|
+
customer_retention/__init__.py,sha256=1f6U04yIo69jlaQhX87DCNUo8P9P2tRzDJCik5ELPE0,1406
|
|
2
2
|
customer_retention/cli.py,sha256=Wdl540cZgu_9mV-hWmTV9jD3S8QTDR8Ik-5hQXYCvmg,2466
|
|
3
3
|
customer_retention/analysis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
customer_retention/analysis/jupyter_save_hook.py,sha256=iiNFIL83yOPX8BGUjCE6Pt5Kc8X-2adtE1_NZTMUaZQ,947
|
|
@@ -84,7 +84,7 @@ customer_retention/core/components/components/transformer.py,sha256=saEO6cRzKitU
|
|
|
84
84
|
customer_retention/core/components/components/validator.py,sha256=5IbUqPYhsvZBTRx0X3MKV2dvZrgTcI19MM9c5_9t2CU,1405
|
|
85
85
|
customer_retention/core/config/__init__.py,sha256=VXNmwSFG3wY6Budh82WRj26X07WCQKgl-M9sVwx8eds,1587
|
|
86
86
|
customer_retention/core/config/column_config.py,sha256=rmMJFV4wK66q-DDQAJXe0EuXdrWd_6bg8s81NQQ54_A,3051
|
|
87
|
-
customer_retention/core/config/experiments.py,sha256=
|
|
87
|
+
customer_retention/core/config/experiments.py,sha256=CCxFgzO4sHpuNu3W2UkAaOAqsoPkXTmdHupMaMs8PvM,3234
|
|
88
88
|
customer_retention/core/config/pipeline_config.py,sha256=jriAcP-_UAlVTT_vVlWUPF97ieIguqlE5hrl9Ny0UiI,3675
|
|
89
89
|
customer_retention/core/config/source_config.py,sha256=NnZUytq4NVvRVmp1ZtoFO_SiaIvSoJwkhw5WXy4Wi_c,2534
|
|
90
90
|
customer_retention/core/utils/__init__.py,sha256=9b8SwZGiLP-glYwzcp-1aWCeTGIploAPokwITbUCneA,971
|
|
@@ -131,7 +131,7 @@ customer_retention/generators/spec_generator/generic_generator.py,sha256=I_glnOO
|
|
|
131
131
|
customer_retention/generators/spec_generator/mlflow_pipeline_generator.py,sha256=LME87sjzP_MjOMA3NTxqRfOhCroUJAb40BAnSH4-I74,29866
|
|
132
132
|
customer_retention/generators/spec_generator/pipeline_spec.py,sha256=c8v1SWgTdeGmNs96l1hOS0qx1B1ua0iwPhw1I5w9OIo,10705
|
|
133
133
|
customer_retention/integrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
134
|
-
customer_retention/integrations/databricks_init.py,sha256=
|
|
134
|
+
customer_retention/integrations/databricks_init.py,sha256=Qte81tiF4MjDzX7o5dPNOKsY_IoVjVXtJoPUDtZ4kx0,5641
|
|
135
135
|
customer_retention/integrations/adapters/__init__.py,sha256=Fgdp0ESROTUHnOb2RN9Ubo0A4BdfoenOGuUz61lHz8g,583
|
|
136
136
|
customer_retention/integrations/adapters/base.py,sha256=z6dVAowDKGogKsYGR7VMcLkS6VhcB9h4zgN1tilNYRg,254
|
|
137
137
|
customer_retention/integrations/adapters/factory.py,sha256=CMsqOeDozADbWnk8fzktZvAyL1FEmUjDMvfDCpLDVaU,1202
|
|
@@ -277,27 +277,27 @@ customer_retention/transforms/artifact_store.py,sha256=FYLpDcv2N6-dUTX5RPEIK3aCW
|
|
|
277
277
|
customer_retention/transforms/executor.py,sha256=oML5dCidxbW_q6YUkAwWcutYP6bIFB6IdD3BvemK45A,6304
|
|
278
278
|
customer_retention/transforms/fitted.py,sha256=3pNvnae-P3t3bKMeZz1Bl0xww-feapIYdoeTY6aUtI8,3278
|
|
279
279
|
customer_retention/transforms/ops.py,sha256=Xg2g9UOOudq_y9Hf3oWsjpqw3dEoykQR5pDSoyW8GX0,4294
|
|
280
|
-
churnkit-0.76.
|
|
281
|
-
churnkit-0.76.
|
|
282
|
-
churnkit-0.76.
|
|
283
|
-
churnkit-0.76.
|
|
284
|
-
churnkit-0.76.
|
|
285
|
-
churnkit-0.76.
|
|
286
|
-
churnkit-0.76.
|
|
287
|
-
churnkit-0.76.
|
|
288
|
-
churnkit-0.76.
|
|
289
|
-
churnkit-0.76.
|
|
290
|
-
churnkit-0.76.
|
|
291
|
-
churnkit-0.76.
|
|
292
|
-
churnkit-0.76.
|
|
293
|
-
churnkit-0.76.
|
|
294
|
-
churnkit-0.76.
|
|
295
|
-
churnkit-0.76.
|
|
296
|
-
churnkit-0.76.
|
|
297
|
-
churnkit-0.76.
|
|
298
|
-
churnkit-0.76.
|
|
299
|
-
churnkit-0.76.
|
|
300
|
-
churnkit-0.76.
|
|
301
|
-
churnkit-0.76.
|
|
302
|
-
churnkit-0.76.
|
|
303
|
-
churnkit-0.76.
|
|
280
|
+
churnkit-0.76.0a3.data/data/share/churnkit/exploration_notebooks/00_start_here.ipynb,sha256=zCyhftEd3v9fc0Ta6wvA6b-9LcoGzRi8bS1tMZ3iu9w,21911
|
|
281
|
+
churnkit-0.76.0a3.data/data/share/churnkit/exploration_notebooks/01_data_discovery.ipynb,sha256=up0X3oDJ5sAo1-tbqMyZj_f1h6D542G2uAxjVmtYCOI,46430
|
|
282
|
+
churnkit-0.76.0a3.data/data/share/churnkit/exploration_notebooks/01a_a_temporal_text_deep_dive.ipynb,sha256=uai8T3iJSqOrabBQnVi8Z0k8zZGVgs_VVQWRHyXN8QU,33690
|
|
283
|
+
churnkit-0.76.0a3.data/data/share/churnkit/exploration_notebooks/01a_temporal_deep_dive.ipynb,sha256=fC1ASNtvI8X1lAe-Lzcw3oX2cptDC-ymPeEtKKWhg20,67326
|
|
284
|
+
churnkit-0.76.0a3.data/data/share/churnkit/exploration_notebooks/01b_temporal_quality.ipynb,sha256=RU5hxgrTVMZs1ytChVv1t49WpTO0Oj6B_Fu8g0xS0To,23039
|
|
285
|
+
churnkit-0.76.0a3.data/data/share/churnkit/exploration_notebooks/01c_temporal_patterns.ipynb,sha256=ZGYfztP6JhOEwPmTYdC0l7w579fKXcNEJXq-PnCLc2I,153167
|
|
286
|
+
churnkit-0.76.0a3.data/data/share/churnkit/exploration_notebooks/01d_event_aggregation.ipynb,sha256=-FT3SoBU0fhaZxGeTo-_UQl6riCrtoJaFnUg31opk64,63244
|
|
287
|
+
churnkit-0.76.0a3.data/data/share/churnkit/exploration_notebooks/02_column_deep_dive.ipynb,sha256=mbP2LQWsXDyTsWg0bhrCBHEfHsEer_XOXRYV9f8JxAk,60250
|
|
288
|
+
churnkit-0.76.0a3.data/data/share/churnkit/exploration_notebooks/02a_text_columns_deep_dive.ipynb,sha256=M9YN8yAjjuC6ZaUlc-rVqVLEkWd7Rc_GNILHS9qO3PU,29704
|
|
289
|
+
churnkit-0.76.0a3.data/data/share/churnkit/exploration_notebooks/03_quality_assessment.ipynb,sha256=H49LLmn1PHbcbAvSQfteESRGk125QwkPI5qbLk3yZgc,68595
|
|
290
|
+
churnkit-0.76.0a3.data/data/share/churnkit/exploration_notebooks/04_relationship_analysis.ipynb,sha256=Rr-B4-xg0ILuAIgztlZkiGJdTzLuNjOqBFxO8W4o9iU,78624
|
|
291
|
+
churnkit-0.76.0a3.data/data/share/churnkit/exploration_notebooks/05_multi_dataset.ipynb,sha256=bBxkuZyTl1yZg4kMXO87WRjgZMhj_6hwLGX6m3XC270,62664
|
|
292
|
+
churnkit-0.76.0a3.data/data/share/churnkit/exploration_notebooks/06_feature_opportunities.ipynb,sha256=cBJF5o4z3Z-dustQ4CVklnfTcQ8saG97tlgswWK9uWE,67409
|
|
293
|
+
churnkit-0.76.0a3.data/data/share/churnkit/exploration_notebooks/07_modeling_readiness.ipynb,sha256=IiA04fyb-l097Glp3MtR03vPjQsZlS1Icg-hjEHa_Dg,28376
|
|
294
|
+
churnkit-0.76.0a3.data/data/share/churnkit/exploration_notebooks/08_baseline_experiments.ipynb,sha256=KmjhnDf1JdpEiIcdfQ-ZFo_at6t9JRC30B6NmmvMBmg,34226
|
|
295
|
+
churnkit-0.76.0a3.data/data/share/churnkit/exploration_notebooks/09_business_alignment.ipynb,sha256=tMNfGM7AH50N1ONzHhGW2HZLpQwraIxVzOiVnI-10X8,17214
|
|
296
|
+
churnkit-0.76.0a3.data/data/share/churnkit/exploration_notebooks/10_spec_generation.ipynb,sha256=KeUdfL9Mvdi6023XpnfZ6oLEDNZaWiIHUfsAWig24mE,42847
|
|
297
|
+
churnkit-0.76.0a3.data/data/share/churnkit/exploration_notebooks/11_scoring_validation.ipynb,sha256=5fi3eHMm03ZKZgdFAXMgydtZ3qX2TtR3L9bZS2MpWPE,49937
|
|
298
|
+
churnkit-0.76.0a3.data/data/share/churnkit/exploration_notebooks/12_view_documentation.ipynb,sha256=aQF7CG8HxckqUKOKqnmZgMkSvfVzyO2LlYPrymLYjBY,4405
|
|
299
|
+
churnkit-0.76.0a3.dist-info/METADATA,sha256=MYmaYdzvcZWtkAL6AtSWEBBAhluczHz_im33olePY3k,13005
|
|
300
|
+
churnkit-0.76.0a3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
301
|
+
churnkit-0.76.0a3.dist-info/entry_points.txt,sha256=swQFVe-jjgQSBJQNO2Ulkz2F5odaE-TsnlTor3HQBjw,70
|
|
302
|
+
churnkit-0.76.0a3.dist-info/licenses/LICENSE,sha256=Bud8Oj25tnpoIuXCWW0xcSfmGPeEZAAHrDRoKdSYtZY,11344
|
|
303
|
+
churnkit-0.76.0a3.dist-info/RECORD,,
|
customer_retention/__init__.py
CHANGED
|
@@ -64,6 +64,21 @@ WORKSPACE_PATH = get_workspace_path()
|
|
|
64
64
|
EXPERIMENT_NAME = get_experiment_name()
|
|
65
65
|
|
|
66
66
|
|
|
67
|
+
def reload_config() -> None:
|
|
68
|
+
global EXPERIMENTS_DIR, FINDINGS_DIR, DATA_DIR, MLRUNS_DIR, FEATURE_STORE_DIR
|
|
69
|
+
global OUTPUT_DIR, CATALOG, SCHEMA, WORKSPACE_PATH, EXPERIMENT_NAME
|
|
70
|
+
EXPERIMENTS_DIR = get_experiments_dir()
|
|
71
|
+
FINDINGS_DIR = get_findings_dir()
|
|
72
|
+
DATA_DIR = get_data_dir()
|
|
73
|
+
MLRUNS_DIR = get_mlruns_dir()
|
|
74
|
+
FEATURE_STORE_DIR = get_feature_store_dir()
|
|
75
|
+
OUTPUT_DIR = FINDINGS_DIR
|
|
76
|
+
CATALOG = get_catalog()
|
|
77
|
+
SCHEMA = get_schema()
|
|
78
|
+
WORKSPACE_PATH = get_workspace_path()
|
|
79
|
+
EXPERIMENT_NAME = get_experiment_name()
|
|
80
|
+
|
|
81
|
+
|
|
67
82
|
def setup_experiments_structure(experiments_dir: Optional[Path] = None) -> None:
|
|
68
83
|
base = experiments_dir or get_experiments_dir()
|
|
69
84
|
directories = [
|
|
@@ -22,7 +22,7 @@ class DatabricksInitResult:
|
|
|
22
22
|
"CR_CATALOG": self.catalog,
|
|
23
23
|
"CR_SCHEMA": self.schema,
|
|
24
24
|
"CR_EXPERIMENT_NAME": self.experiment_name,
|
|
25
|
-
"CR_EXPERIMENTS_DIR": f"/
|
|
25
|
+
"CR_EXPERIMENTS_DIR": f"/Volumes/{self.catalog}/{self.schema}/experiments",
|
|
26
26
|
}
|
|
27
27
|
if self.workspace_path:
|
|
28
28
|
env_vars["CR_WORKSPACE_PATH"] = self.workspace_path
|
|
@@ -38,10 +38,13 @@ def databricks_init(
|
|
|
38
38
|
model_name: str = "customer_retention",
|
|
39
39
|
) -> DatabricksInitResult:
|
|
40
40
|
_validate_databricks_environment()
|
|
41
|
+
if workspace_path:
|
|
42
|
+
workspace_path = _normalize_workspace_path(workspace_path)
|
|
41
43
|
_set_environment_variables(catalog, schema, workspace_path)
|
|
42
44
|
resolved_experiment_name = experiment_name or _resolve_experiment_name_from_notebook_path()
|
|
43
45
|
resolved_experiment_name = _make_absolute_experiment_path(resolved_experiment_name, workspace_path)
|
|
44
46
|
_set_experiment_name_env_var(resolved_experiment_name)
|
|
47
|
+
_reload_config_constants()
|
|
45
48
|
_configure_mlflow_experiment(resolved_experiment_name)
|
|
46
49
|
notebooks_copied: list[str] = []
|
|
47
50
|
if copy_notebooks and workspace_path:
|
|
@@ -69,15 +72,21 @@ def _validate_databricks_environment() -> None:
|
|
|
69
72
|
def _set_environment_variables(catalog: str, schema: str, workspace_path: str | None) -> None:
|
|
70
73
|
os.environ["CR_CATALOG"] = catalog
|
|
71
74
|
os.environ["CR_SCHEMA"] = schema
|
|
75
|
+
os.environ["CR_EXPERIMENTS_DIR"] = f"/Volumes/{catalog}/{schema}/experiments"
|
|
72
76
|
if workspace_path:
|
|
73
77
|
os.environ["CR_WORKSPACE_PATH"] = workspace_path
|
|
74
|
-
os.environ["CR_EXPERIMENTS_DIR"] = f"/Workspace/{workspace_path}/experiments"
|
|
75
78
|
|
|
76
79
|
|
|
77
80
|
def _set_experiment_name_env_var(experiment_name: str) -> None:
|
|
78
81
|
os.environ["CR_EXPERIMENT_NAME"] = experiment_name
|
|
79
82
|
|
|
80
83
|
|
|
84
|
+
def _reload_config_constants() -> None:
|
|
85
|
+
from customer_retention.core.config.experiments import reload_config
|
|
86
|
+
|
|
87
|
+
reload_config()
|
|
88
|
+
|
|
89
|
+
|
|
81
90
|
def _resolve_experiment_name_from_notebook_path() -> str:
|
|
82
91
|
try:
|
|
83
92
|
dbutils = _get_dbutils()
|
|
@@ -98,6 +107,12 @@ def _get_dbutils() -> Any | None:
|
|
|
98
107
|
return None
|
|
99
108
|
|
|
100
109
|
|
|
110
|
+
def _normalize_workspace_path(workspace_path: str) -> str:
|
|
111
|
+
if workspace_path.startswith("/Workspace/"):
|
|
112
|
+
return workspace_path[len("/Workspace/"):]
|
|
113
|
+
return workspace_path
|
|
114
|
+
|
|
115
|
+
|
|
101
116
|
def _make_absolute_experiment_path(experiment_name: str, workspace_path: str | None) -> str:
|
|
102
117
|
if experiment_name.startswith("/"):
|
|
103
118
|
return experiment_name
|
|
@@ -144,6 +159,7 @@ def _display_init_summary(result: DatabricksInitResult) -> None:
|
|
|
144
159
|
print(f" Catalog: {result.catalog}")
|
|
145
160
|
print(f" Schema: {result.schema}")
|
|
146
161
|
print(f" Experiment: {result.experiment_name}")
|
|
162
|
+
print(f" Experiments Dir: /Volumes/{result.catalog}/{result.schema}/experiments")
|
|
147
163
|
print(f" Workspace Path: {result.workspace_path or '(not set)'}")
|
|
148
164
|
print(f" Model Name: {result.model_name}")
|
|
149
165
|
if result.notebooks_copied:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|