Skip to content

Commit 99b02f0

Browse files
SophiaRowlandsmlindauer
authored andcommitted
Adding notebook with requested changes
-Changed /Data to /data -Swapped code in SWAT Model Manager function with suggested code
1 parent 7fa206c commit 99b02f0

File tree

1 file changed

+7
-20
lines changed

1 file changed

+7
-20
lines changed

examples/Viya 2020 Example.ipynb

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@
126126
}
127127
],
128128
"source": [
129-
"hmeqdf = pd.read_csv(\"./Data/hmeq.csv\")\n",
130-
"hmeqct = conn.read_csv(\"./Data/hmeq.csv\", casout=dict(name='hmeqct', replace=True))"
129+
"hmeqdf = pd.read_csv(\"./data/hmeq.csv\")\n",
130+
"hmeqct = conn.read_csv(\"./data/hmeq.csv\", casout=dict(name='hmeqct', replace=True))"
131131
]
132132
},
133133
{
@@ -6867,25 +6867,12 @@
68676867
" # Write ROC amd Lift Statistics JSON\n",
68686868
" JSONFiles.generateROCLiftStat(target, 1, conn, trainData=scored_data, jPath=output_path)\n",
68696869
" \n",
6870-
" # Pushing Astore into Model Manager\n",
6871-
" with sess:\n",
6872-
" register_model(feature_astore, feature_name, project=project_name, force=True, version='latest')\n",
6873-
" register_model(model_astore, model_name, project=project_name, force=True, version='latest') \n",
6874-
" \n",
6875-
" # Pushing content files into Model Manager\n",
6876-
" fitstat_file = output_path / 'dmcas_fitstat.json'\n",
6877-
" lift_file = output_path / 'dmcas_lift.json'\n",
6878-
" roc_file = output_path / 'dmcas_roc.json'\n",
6870+
" model_content = [output_path / f for f in ('dmcas_fitstat.json', 'dmcas_lift.json', 'dmcas_roc.json')]\n",
6871+
" model_content = {f.name: f for f in model_content}\n",
68796872
"\n",
6880-
" # Push Files into Model Manager\n",
6881-
" with sess, open(fitstat_file,'r') as upload_File: \n",
6882-
" modelRepo.add_model_content(model_name, upload_File, \"dmcas_fitstat.json\")\n",
6883-
" # Push Files into Model Manager\n",
6884-
" with sess, open(lift_file,'r') as upload_File: \n",
6885-
" modelRepo.add_model_content(model_name, upload_File, \"dmcas_lift.json\")\n",
6886-
" # Push Files into Model Manager\n",
6887-
" with sess, open(roc_file,'r') as upload_File: \n",
6888-
" modelRepo.add_model_content(model_name, upload_File, \"dmcas_roc.json\")"
6873+
" # Pushing Astore into Model Manager\n",
6874+
" register_model(feature_astore, feature_name, project=project_name, force=True, version='latest')\n",
6875+
" register_model(model_astore, model_name, project=project_name, force=True, version='latest', files=model_content) "
68896876
]
68906877
},
68916878
{

0 commit comments

Comments
 (0)