Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Commit

Permalink
Adjust lesson 3-1 for Colab.
Browse files Browse the repository at this point in the history
  • Loading branch information
fa9r committed May 16, 2022
1 parent e18e4af commit efa55ee
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 5 deletions.
2 changes: 1 addition & 1 deletion 2-2_Local_Deployment.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
" !mv zenbytes/steps .\n",
" !mv zenbytes/pipelines .\n",
"\n",
"except: # noqa\n",
"except ModuleNotFoundError as err:\n",
" IN_COLAB = False"
]
},
Expand Down
2 changes: 1 addition & 1 deletion 2-3_Inference_Pipelines.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
" !mv zenbytes/steps .\n",
" !mv zenbytes/pipelines .\n",
"\n",
"except: # noqa\n",
"except ModuleNotFoundError as err:\n",
" IN_COLAB = False"
]
},
Expand Down
29 changes: 26 additions & 3 deletions 3-1_Data_Skew.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,37 @@
"metadata": {},
"outputs": [],
"source": [
"!zenml integration install evidently -f\n",
"%pip install zenml\n",
"!zenml integration install sklearn mlflow evidently -f\n",
"%pip install pyparsing==2.4.2 # required for Colab\n",
"\n",
"import IPython\n",
"\n",
"# automatically restart kernel\n",
"IPython.Application.instance().kernel.do_shutdown(restart=True)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# COLAB ONLY setup\n",
"try:\n",
" import google.colab\n",
"\n",
" IN_COLAB = True\n",
"\n",
" # clone zenbytes repo to get source code of previous lessons\n",
" !git clone https://github.com/zenml-io/zenbytes.git # noqa\n",
" !mv zenbytes/steps .\n",
" !mv zenbytes/pipelines .\n",
"\n",
"except ModuleNotFoundError as err:\n",
" IN_COLAB = False"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -70,7 +93,7 @@
"source": [
"from steps.importer import importer\n",
"from steps.evaluator import evaluator\n",
"from steps.mlflow_trainer import svc_trainer_mlflow"
"from steps.mlflow_trainer import svc_trainer"
]
},
{
Expand Down Expand Up @@ -167,7 +190,7 @@
"source": [
"evidently_pipeline = digits_pipeline_with_train_test_checks(\n",
" importer=importer(),\n",
" trainer=svc_trainer_mlflow(),\n",
" trainer=svc_trainer(),\n",
" evaluator=evaluator(),\n",
" get_reference_data=get_reference_data(),\n",
" skew_detector=EvidentlyProfileStep(config=evidently_profile_config),\n",
Expand Down

0 comments on commit efa55ee

Please sign in to comment.