Skip to content

Commit 2e1e063

Browse files
authored
Merge pull request #16 from The-Strategy-Unit/v4-3_update
v4.3 update
2 parents 1ecdaa5 + c609c9f commit 2e1e063

File tree

8 files changed

+214
-233
lines changed

8 files changed

+214
-233
lines changed

notebooks/nhp_model_run-icb.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"from databricks.sdk import WorkspaceClient\n",
3535
"\n",
3636
"from nhp.databricks.icb import DatabricksICB\n",
37-
"from nhp.model.helpers import load_params\n",
37+
"from nhp.model.params import load_params\n",
3838
"from nhp.model.run import run_all"
3939
]
4040
},
@@ -86,9 +86,7 @@
8686
"params_path = dbutils.widgets.get(\"params_path\")\n",
8787
"\n",
8888
"data_path = dbutils.widgets.get(\"data_path\")\n",
89-
"save_full_model_results = dbutils.widgets.get(\"save_full_model_results\") == \"True\"\n",
90-
"# TODO: this will need to be updated with each new release manually\n",
91-
"outputs_version = \"v4.2\""
89+
"save_full_model_results = dbutils.widgets.get(\"save_full_model_results\") == \"True\"\n"
9290
]
9391
},
9492
{
@@ -115,6 +113,8 @@
115113
"source": [
116114
"params = load_params(params_path)\n",
117115
"\n",
116+
"outputs_version = params[\"app_version\"]\n",
117+
"\n",
118118
"params[\"create_datetime\"] = f\"{datetime.now():%Y%m%d_%H%M%S}\"\n",
119119
"\n",
120120
"metadata = {\n",

notebooks/nhp_model_run-national.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"from databricks.sdk import WorkspaceClient\n",
3535
"\n",
3636
"from nhp.databricks.national import DatabricksNational\n",
37-
"from nhp.model.helpers import load_params\n",
37+
"from nhp.model.params import load_params\n",
3838
"from nhp.model.run import run_all"
3939
]
4040
},
@@ -86,9 +86,7 @@
8686
"params_path = dbutils.widgets.get(\"params_path\")\n",
8787
"\n",
8888
"data_path = dbutils.widgets.get(\"data_path\")\n",
89-
"save_full_model_results = dbutils.widgets.get(\"save_full_model_results\") == \"True\"\n",
90-
"# TODO: this will need to be updated with each new release manually\n",
91-
"outputs_version = \"v4.2\""
89+
"save_full_model_results = dbutils.widgets.get(\"save_full_model_results\") == \"True\""
9290
]
9391
},
9492
{
@@ -115,6 +113,8 @@
115113
"source": [
116114
"params = load_params(params_path)\n",
117115
"\n",
116+
"outputs_version = params[\"app_version\"]\n",
117+
"\n",
118118
"params[\"create_datetime\"] = f\"{datetime.now():%Y%m%d_%H%M%S}\"\n",
119119
"\n",
120120
"metadata = {\n",

notebooks/nhp_model_run-provider.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"from databricks.sdk import WorkspaceClient\n",
3535
"\n",
3636
"from nhp.databricks.provider import DatabricksProvider\n",
37-
"from nhp.model.helpers import load_params\n",
37+
"from nhp.model.params import load_params\n",
3838
"from nhp.model.run import run_all"
3939
]
4040
},
@@ -86,9 +86,7 @@
8686
"params_path = dbutils.widgets.get(\"params_path\")\n",
8787
"\n",
8888
"data_path = dbutils.widgets.get(\"data_path\")\n",
89-
"save_full_model_results = dbutils.widgets.get(\"save_full_model_results\") == \"True\"\n",
90-
"# TODO: this will need to be updated with each new release manually\n",
91-
"outputs_version = \"v4.2\""
89+
"save_full_model_results = dbutils.widgets.get(\"save_full_model_results\") == \"True\""
9290
]
9391
},
9492
{
@@ -115,6 +113,8 @@
115113
"source": [
116114
"params = load_params(params_path)\n",
117115
"\n",
116+
"outputs_version = params[\"app_version\"]\n",
117+
"\n",
118118
"params[\"create_datetime\"] = f\"{datetime.now():%Y%m%d_%H%M%S}\"\n",
119119
"\n",
120120
"metadata = {\n",
@@ -417,4 +417,4 @@
417417
},
418418
"nbformat": 4,
419419
"nbformat_minor": 0
420-
}
420+
}

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ requires-python = ">=3.12"
77

88
dependencies = [
99
"databricks-connect>=16.1.6",
10-
"nhp-model @ git+https://github.com/the-strategy-unit/[email protected]",
10+
"nhp-model",
1111
"pandas>=2.3.2",
1212
"pyspark>=3.5.6",
1313
]
@@ -75,3 +75,6 @@ version_file = "src/nhp/_version.py"
7575

7676
[tool.ty.src]
7777
exclude = ["notebooks"]
78+
79+
[tool.uv.sources]
80+
nhp-model = { git = "https://github.com/the-strategy-unit/nhp_model.git", rev = "v4.3.0" }

resources/nhp_model_run-icb.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
resources:
22
jobs:
3-
NHP_Model-v4_2_1-Run_ICB:
4-
name: NHP Model v4.2.1 Run (ICB)
3+
NHP_Model-v4_3-Run_ICB:
4+
name: NHP Model v4.3.0 Run (ICB)
55
tasks:
66
- task_key: list_files
77
notebook_task:
@@ -47,6 +47,6 @@ resources:
4747
- name: queue_path
4848
default: "/Volumes/nhp/model_data/queue/icb/"
4949
- name: data_path
50-
default: "/Volumes/nhp/model_data/files/v4.2.1/"
50+
default: "/Volumes/nhp/model_data/files/v4.3.0/"
5151
- name: save_full_model_results
5252
default: "false"

resources/nhp_model_run-national.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
resources:
22
jobs:
3-
NHP_Model-v4_2_1-Run_National:
4-
name: NHP Model v4.2.1 Run (National)
3+
NHP_Model-v4_3-Run_National:
4+
name: NHP Model v4.3.0 Run (National)
55
tasks:
66
- task_key: list_files
77
notebook_task:
@@ -47,6 +47,6 @@ resources:
4747
- name: queue_path
4848
default: "/Volumes/nhp/model_data/queue/national/"
4949
- name: data_path
50-
default: "/Volumes/nhp/model_data/files/v4.2.1/"
50+
default: "/Volumes/nhp/model_data/files/v4.3.0/"
5151
- name: save_full_model_results
5252
default: "false"

resources/nhp_model_run-provider.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
resources:
22
jobs:
3-
NHP_Model-v4_2_1-Run_Provider:
4-
name: NHP Model v4.2.1 Run (Provider)
3+
NHP_Model-v4_3-Run_Provider:
4+
name: NHP Model v4.3.0 Run (Provider)
55
tasks:
66
- task_key: list_files
77
notebook_task:
@@ -47,6 +47,6 @@ resources:
4747
- name: queue_path
4848
default: "/Volumes/nhp/model_data/queue/provider/"
4949
- name: data_path
50-
default: "/Volumes/nhp/model_data/files/v.4.2.1/"
50+
default: "/Volumes/nhp/model_data/files/v4.3.0/"
5151
- name: save_full_model_results
5252
default: "false"

0 commit comments

Comments
 (0)