Skip to content

Commit

Permalink
revert changes to examples/models/custom_metrics/customMetrics.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoGorelli committed May 30, 2021
1 parent 1cfcaec commit 87ebff0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
21 changes: 9 additions & 12 deletions examples/models/custom_metrics/customMetrics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,9 @@
}
],
"source": [
"response = json.loads(responseRaw[0])\n",
"response=json.loads(responseRaw[0])\n",
"print(response)\n",
"assert len(response[\"meta\"][\"metrics\"]) == 3"
"assert(len(response[\"meta\"][\"metrics\"]) == 3)"
]
},
{
Expand Down Expand Up @@ -282,9 +282,9 @@
}
],
"source": [
"response = json.loads(responseRaw[0])\n",
"response=json.loads(responseRaw[0])\n",
"print(response)\n",
"assert response[\"data\"][\"result\"][0][\"metric\"][\"__name__\"] == \"mycounter_total\""
"assert(response['data'][\"result\"][0][\"metric\"][\"__name__\"]=='mycounter_total')"
]
},
{
Expand Down Expand Up @@ -313,9 +313,9 @@
}
],
"source": [
"response = json.loads(\"\".join(responseRaw))\n",
"response=json.loads(\"\".join(responseRaw))\n",
"print(response)\n",
"assert len(response[\"meta\"][\"metrics\"]) == 3"
"assert(len(response[\"meta\"][\"metrics\"]) == 3)"
]
},
{
Expand Down Expand Up @@ -359,13 +359,10 @@
}
],
"source": [
"response = json.loads(responseRaw[0])\n",
"response=json.loads(responseRaw[0])\n",
"print(response)\n",
"assert response[\"data\"][\"result\"][0][\"metric\"][\"__name__\"] == \"mycounter_total\"\n",
"assert (\n",
" response[\"data\"][\"result\"][0][\"metric\"][\"image_name\"]\n",
" == \"seldonio/model-with-metrics\"\n",
")"
"assert(response['data'][\"result\"][0][\"metric\"][\"__name__\"]=='mycounter_total')\n",
"assert(response['data'][\"result\"][0][\"metric\"][\"image_name\"]=='seldonio/model-with-metrics')"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ fmt:
--skip proto --skip seldon_core/proto --skip .eggs --skip .tox
nbqa black \
../ --nbqa-skip-bad-cells --nbqa-mutate \
--nbqa-exclude "(proto|seldon_core/proto/|.eggs|.tox|_README\.ipynb)"
--nbqa-exclude "(proto|seldon_core/proto/|.eggs|.tox|_README\.ipynb|examples/models/custom_metrics/customMetrics\.ipynb)"
nbqa isort \
../ --profile black --nbqa-skip-bad-cells --nbqa-mutate \
--nbqa-exclude "(proto|seldon_core/proto/|.eggs|.tox|_README\.ipynb)"
--nbqa-exclude "(proto|seldon_core/proto/|.eggs|.tox|_README\.ipynb|examples/models/custom_metrics/customMetrics\.ipynb)"

lint: licenses
black \
Expand Down

0 comments on commit 87ebff0

Please sign in to comment.