Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add instructions to register pytorch with sasctl #130

Closed

Conversation

paataugrekhelidzesas
Copy link

register, deploy and score a published pytorch model using sasctl. The following fork includes:

  • .ipynb notebook with sasctl instructions
  • .jpg to test scoring
  • pytorch_model.pt saved pytorch model
  • class_names.txt saved class labels to interpret model output

Copy link
Collaborator

@smlindauer smlindauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few formatting changes, but otherwise this is ready to be merged.

"id": "4d306649",
"metadata": {},
"source": [
"# Register Pytorch Model in SAS Model Manager"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

specify that this is for SAS Viya 4; also what versions of SAS Viya 4 will this work on?

"metadata": {},
"outputs": [],
"source": [
"# define naming for the project and prefix for all the models\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uppercase 'define' to match other single line comment format

"metadata": {},
"outputs": [],
"source": [
"# Define a directory where all the files for model manager will be kept \n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all references to model manager need to be stated as "SAS Model Manager"

"id": "4cf27c7a",
"metadata": {},
"source": [
"### Defin Input/output variables"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Define Input/Output Variables"

}
],
"source": [
"# input variables\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Input"

"sasctl.pzmm.writeJSONFiles.JSONFiles().writeVarJSON(inputDF=inputVar,isInput=True)\n",
"inputVarJSON = pd.read_json(\"inputVar.json\")\n",
"\n",
"# output variables\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Output"

"sasctl.pzmm.writeJSONFiles.JSONFiles().writeVarJSON(inputDF=outputVar,isInput=False)\n",
"outputVarJSON = pd.read_json(\"outputVar.json\")\n",
"\n",
"# Define Input Output Variables and types for Model Manager\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"SAS Model Manager"

"id": "fc92c3b7",
"metadata": {},
"source": [
"### add requirements.json for SCR container\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Add requirements.json File for SCR Container"

"from sasctl.services import model_repository as mr\n",
"\n",
"try:\n",
" # Establish a session with Viya\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"SAS Viya"

"outputs": [],
"source": [
"from sasctl.services import model_management as mm\n",
"# Establish a session with Viya\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"SAS Viya"

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants