Skip to content

Commit

Permalink
update flask app notes update
Browse files Browse the repository at this point in the history
  • Loading branch information
lalmei committed Aug 26, 2021
1 parent 1fb0fa6 commit 9af169d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions examples/flask_pytorch_example/Flask App Logging.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
},
{
"cell_type": "markdown",
"id": "f4aa0014",
"id": "4486a5be",
"metadata": {},
"source": [
"We will begin by loading the model and the `whylogs` logger in memory as the application is launched. The function `get_or_create_session` will create a local configuration or load the default configuration file `.whylabs.yml` \n",
Expand Down Expand Up @@ -73,15 +73,15 @@
},
{
"cell_type": "markdown",
"id": "a4fc9c79",
"id": "4590499f",
"metadata": {},
"source": [
"## Receiving Request and Monitoring Inputs"
]
},
{
"cell_type": "markdown",
"id": "4aecf3b2",
"id": "8aed19bb",
"metadata": {},
"source": [
"We will set the endpoint for our app to be `/predict`, this will the main interactions with our application, hence it is important to monitor all the data that is coming in. In this case the request json will include a path to an image.\n",
Expand Down Expand Up @@ -120,8 +120,8 @@
" [0.229, 0.224, 0.225])])\n",
" return my_transforms(image).unsqueeze(0)\n",
"```\n",
"\n",
"Putting it all together, we add the additional steps in the predict methods\n",
"### Inference\n",
"Putting it all together, we add the additional steps for the model inference and log the output info. \n",
"\n",
"```python\n",
"@app.route(\"/predict\", methods=[\"POST\"])\n",
Expand Down Expand Up @@ -153,7 +153,7 @@
},
{
"cell_type": "markdown",
"id": "366fff00",
"id": "d936f22d",
"metadata": {},
"source": [
"You can test run your app by running locally with \n",
Expand Down Expand Up @@ -181,7 +181,7 @@
},
{
"cell_type": "markdown",
"id": "2a1e7702",
"id": "82d11cf3",
"metadata": {},
"source": [
"You can wait 30 seconds until the log rotates, or you can change the log rotation time"
Expand Down Expand Up @@ -219,7 +219,7 @@
},
{
"cell_type": "markdown",
"id": "d4af9e95",
"id": "24a8113f",
"metadata": {},
"source": [
"You can load your profiles and view them individually with the viewer, or with the some of viz tools in the library.\n",
Expand Down

0 comments on commit 9af169d

Please sign in to comment.