Skip to content

Commit

Permalink
chore: notebook pip install fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mhamilton723 committed Jun 13, 2023
1 parent c9c6b51 commit 37c764d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -517,4 +517,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,24 @@
" - If you are running it on Synapse, you'll need to [create an AML workspace and set up linked Service](https://microsoft.github.io/SynapseML/docs/next/mlflow/installation/). \n"
]
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"import subprocess\n",
"import sys\n",
"\n",
"for package in [\"sqlparse\", \"raiwidgets\", \"interpret-community\"]:\n",
" subprocess.check_call([sys.executable, \"-m\", \"pip\", \"install\", package])"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "markdown",
"metadata": {
Expand Down Expand Up @@ -145,25 +163,10 @@
"experiment_name = f\"/Shared/isolation_forest_experiment-{str(uuid.uuid1())}/\"\n",
"model_name = f\"isolation-forest-model\"\n",
"if running_on_synapse():\n",
" import subprocess\n",
" import sys\n",
" from pyspark.sql.functions import udf\n",
" from synapse.ml.core.platform import materializing_display as display\n",
"\n",
" # use regular display when running on interactive notebook\n",
" # from notebookutils.visualization import display\n",
"\n",
" for package in [\"sqlparse\", \"raiwidgets\", \"interpret-community\"]:\n",
" subprocess.check_call([sys.executable, \"-m\", \"pip\", \"install\", package])"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!pip install --upgrade interpret-community"
" # from notebookutils.visualization import display"
]
},
{
Expand Down

0 comments on commit 37c764d

Please sign in to comment.