Skip to content

Commit

Permalink
updated examples to use current versions of functions
Browse files Browse the repository at this point in the history
  • Loading branch information
djm21 committed Apr 12, 2024
1 parent 2a79d58 commit 5925131
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@
"outputs": [],
"source": [
"J = pzmm.JSONFiles()\n",
"J.writeVarJSON(inputsDict, isInput=True, jPath=zipFolder)\n",
"J.writeVarJSON(outputsDict, isInput=False, jPath=zipFolder)"
"J.write_var_json(inputsDict, isInput=True, jPath=zipFolder)\n",
"J.write_var_json(outputsDict, isInput=False, jPath=zipFolder)"
]
},
{
Expand All @@ -241,7 +241,7 @@
"outputs": [],
"source": [
"# Write model properties to a json file\n",
"J.writeModelPropertiesJSON(modelName=modelPrefix,\n",
"J.write_model_properties_json(modelName=modelPrefix,\n",
" modelDesc='MLFlow Model ',\n",
" targetVariable='BAD',\n",
" modelType='Logistic Regression',\n",
Expand All @@ -253,7 +253,7 @@
" modeler='sasdemo')\n",
"\n",
"# Write model metadata to a json file\n",
"J.writeFileMetadataJSON(modelPrefix, jPath=zipFolder)"
"J.write_file_metadata_json(modelPrefix, jPath=zipFolder)"
]
},
{
Expand Down Expand Up @@ -294,7 +294,7 @@
"outputs": [],
"source": [
"I = pzmm.ImportModel()\n",
"I.pzmmImportModel(zipFolder, modelPrefix, 'MLFlowTest', inputsDict, None, '{}.predict({})', metrics=['tensor'], force=True)"
"I.import_model(zipFolder, modelPrefix, 'MLFlowTest', inputsDict, None, '{}.predict({})', metrics=['tensor'], force=True)"
]
},
{
Expand Down
8 changes: 4 additions & 4 deletions examples/pzmm_tensorflow_keras_model_import.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -686,10 +686,10 @@
"name": "stdout",
"output_type": "stream",
"text": [
"inputVar.json was successfully written and saved to /Users/dalmoo/Documents/GitHub/python-sasctl/examples/data/hmeqModels/KerasModel/inputVar.json\n",
"outputVar.json was successfully written and saved to /Users/dalmoo/Documents/GitHub/python-sasctl/examples/data/hmeqModels/KerasModel/outputVar.json\n",
"ModelProperties.json was successfully written and saved to /Users/dalmoo/Documents/GitHub/python-sasctl/examples/data/hmeqModels/KerasModel/ModelProperties.json\n",
"fileMetadata.json was successfully written and saved to /Users/dalmoo/Documents/GitHub/python-sasctl/examples/data/hmeqModels/KerasModel/fileMetadata.json\n"
"inputVar.json was successfully written and saved to python-sasctl/examples/data/hmeqModels/KerasModel/inputVar.json\n",
"outputVar.json was successfully written and saved to python-sasctl/examples/data/hmeqModels/KerasModel/outputVar.json\n",
"ModelProperties.json was successfully written and saved to python-sasctl/examples/data/hmeqModels/KerasModel/ModelProperties.json\n",
"fileMetadata.json was successfully written and saved to python-sasctl/examples/data/hmeqModels/KerasModel/fileMetadata.json\n"
]
}
],
Expand Down
8 changes: 4 additions & 4 deletions examples/register_pytorch_comp_vision.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -114,20 +114,20 @@
"name": "stdout",
"output_type": "stream",
"text": [
"inputVar.json was successfully written and saved to /data/paugre/rapidApp2/Model/inputVar.json\n",
"outputVar.json was successfully written and saved to /data/paugre/rapidApp2/Model/outputVar.json\n"
"inputVar.json was successfully written and saved to Model/inputVar.json\n",
"outputVar.json was successfully written and saved to Model/outputVar.json\n"
]
}
],
"source": [
"# Input variables\n",
"inputVar = pd.DataFrame({'image' : ['msg'*33333]})\n",
"sasctl.pzmm.writeJSONFiles.JSONFiles().writeVarJSON(inputDF=inputVar,isInput=True)\n",
"pzmm.JSONFiles.write_var_json(inputDF=inputVar,isInput=True)\n",
"inputVarJSON = pd.read_json(\"inputVar.json\")\n",
"\n",
"# Output variables\n",
"outputVar = pd.DataFrame({'food_label' : ['msg'*90], 'msg' : ['msg'*90]})\n",
"sasctl.pzmm.writeJSONFiles.JSONFiles().writeVarJSON(inputDF=outputVar,isInput=False)\n",
"pzmm.JSONFiles.write_var_json(inputDF=outputVar,isInput=False)\n",
"outputVarJSON = pd.read_json(\"outputVar.json\")\n",
"\n",
"# Define Input Output Variables and types for SAS Model Manager\n",
Expand Down

0 comments on commit 5925131

Please sign in to comment.