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

Commit

Permalink
Fix Colab issues for 2.1, 2.2, 2.3, and 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
fa9r committed Oct 13, 2022
1 parent a5cbaa8 commit 1b94a18
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 72 deletions.
12 changes: 2 additions & 10 deletions 1-2_Artifact_Lineage.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
"source": [
"%pip install \"zenml[server]\"\n",
"!zenml integration install sklearn -y\n",
"!rm -rf .zen\n",
"!zenml init\n",
"%pip install pyparsing==2.4.2 # required for Colab\n",
"\n",
"import IPython\n",
Expand Down Expand Up @@ -81,16 +83,6 @@
"To illustrate, let us first rebuild our digits pipeline from the previous lesson:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!rm -rf .zen\n",
"!zenml init"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down
48 changes: 20 additions & 28 deletions 2-1_Experiment_Tracking.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
"source": [
"%pip install \"zenml[server]\"\n",
"!zenml integration install sklearn mlflow wandb -y\n",
"!rm -rf .zen\n",
"!zenml init\n",
"%pip install pyparsing==2.4.2 # required for Colab\n",
"\n",
"import IPython\n",
Expand All @@ -37,34 +39,6 @@
"IPython.Application.instance().kernel.do_shutdown(restart=True)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Next, let's import our pipeline definition and some of the pipeline steps that we built in the previous lessons:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!rm -rf .zen\n",
"!zenml init"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from pipelines.digits_pipeline import digits_pipeline\n",
"from steps.evaluator import evaluator\n",
"from steps.importer import importer"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -103,6 +77,24 @@
" !ngrok authtoken {NGROK_TOKEN}"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Next, let's import our pipeline definition and some of the pipeline steps that we built in the previous lessons:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from pipelines.digits_pipeline import digits_pipeline\n",
"from steps.evaluator import evaluator\n",
"from steps.importer import importer"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
21 changes: 9 additions & 12 deletions 2-2_Local_Deployment.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
"source": [
"%pip install \"zenml[server]\" matplotlib\n",
"!zenml integration install sklearn mlflow -y\n",
"!rm -rf .zen\n",
"!zenml init\n",
"%pip install pyparsing==2.4.2 # required for Colab\n",
"\n",
"import IPython\n",
Expand All @@ -51,16 +53,6 @@
" !mv zenbytes/pipelines ."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!rm -rf .zen\n",
"!zenml init"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -85,7 +77,10 @@
"metadata": {},
"outputs": [],
"source": [
"from zenml.integrations.mlflow.steps import mlflow_model_deployer_step\n",
"from zenml.integrations.mlflow.steps import (\n",
" MLFlowDeployerParameters,\n",
" mlflow_model_deployer_step\n",
")\n",
"from zenml.pipelines import pipeline\n",
"from zenml.steps import step\n",
"\n",
Expand Down Expand Up @@ -117,7 +112,9 @@
" trainer=svc_trainer_mlflow(),\n",
" evaluator=evaluator(),\n",
" deployment_trigger=deployment_trigger(), # new\n",
" model_deployer=mlflow_model_deployer_step(), # new\n",
" model_deployer=mlflow_model_deployer_step(\n",
" MLFlowDeployerParameters(timeout=20)\n",
" ), # new\n",
")"
]
},
Expand Down
21 changes: 9 additions & 12 deletions 2-3_Inference_Pipelines.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
"source": [
"%pip install \"zenml[server]\"\n",
"!zenml integration install sklearn mlflow -y\n",
"!rm -rf .zen\n",
"!zenml init\n",
"!zenml stack set default\n",
"!zenml experiment-tracker register mlflow_tracker --flavor=mlflow\n",
"!zenml model-deployer register mlflow --flavor=mlflow\n",
Expand Down Expand Up @@ -75,17 +77,10 @@
"metadata": {},
"outputs": [],
"source": [
"!rm -rf .zen\n",
"!zenml init"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from zenml.integrations.mlflow.steps import mlflow_model_deployer_step\n",
"from zenml.integrations.mlflow.steps import (\n",
" MLFlowDeployerParameters, \n",
" mlflow_model_deployer_step\n",
")\n",
"\n",
"from pipelines.training_pipeline import train_evaluate_deploy_pipeline\n",
"from steps.deployment_trigger import deployment_trigger\n",
Expand All @@ -98,7 +93,9 @@
" trainer=svc_trainer_mlflow(),\n",
" evaluator=evaluator(),\n",
" deployment_trigger=deployment_trigger(),\n",
" model_deployer=mlflow_model_deployer_step(),\n",
" model_deployer=mlflow_model_deployer_step(\n",
" MLFlowDeployerParameters(timeout=20)\n",
" ), # new\n",
").run(unlisted=True)"
]
},
Expand Down
12 changes: 2 additions & 10 deletions 3-1_Data_Skew.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
"source": [
"%pip install \"zenml[server]\"\n",
"!zenml integration install sklearn mlflow evidently -y\n",
"!rm -rf .zen\n",
"!zenml init\n",
"%pip install pyparsing==2.4.2 # required for Colab\n",
"\n",
"import IPython\n",
Expand Down Expand Up @@ -80,16 +82,6 @@
"Let's define this pipeline in code and import the other steps (which we have already built during previous lessons):"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!rm -rf .zen\n",
"!zenml init"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down

0 comments on commit 1b94a18

Please sign in to comment.