From 127e482ac88223f5bedf561bd3dbe731fba65984 Mon Sep 17 00:00:00 2001 From: Zvi Baratz Date: Fri, 24 Jun 2022 04:45:42 +0300 Subject: [PATCH] Replaced !pip calls with %pip magic command. (#604) Closes #603. --- notebook/automl_classification.ipynb | 4 ++-- notebook/automl_lightgbm.ipynb | 4 ++-- notebook/automl_nlp.ipynb | 2 +- notebook/automl_xgboost.ipynb | 2 +- notebook/autovw.ipynb | 2 +- notebook/integrate_azureml.ipynb | 2 +- notebook/integrate_sklearn.ipynb | 2 +- notebook/research/acl2021.ipynb | 4 ++-- notebook/tune_huggingface.ipynb | 2 +- notebook/tune_pytorch.ipynb | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/notebook/automl_classification.ipynb b/notebook/automl_classification.ipynb index fc145cf67..a84c0aa05 100644 --- a/notebook/automl_classification.ipynb +++ b/notebook/automl_classification.ipynb @@ -38,10 +38,10 @@ "metadata": {}, "outputs": [], "source": [ - "!pip install flaml[notebook];\n", + "%pip install flaml[notebook]\n", "# from v0.6.6, catboost is made an optional dependency to build conda package.\n", "# to install catboost without installing the notebook option, you can run:\n", - "# !pip install flaml[catboost]" + "# %pip install flaml[catboost]" ] }, { diff --git a/notebook/automl_lightgbm.ipynb b/notebook/automl_lightgbm.ipynb index c043a6778..2171f6c9d 100644 --- a/notebook/automl_lightgbm.ipynb +++ b/notebook/automl_lightgbm.ipynb @@ -39,7 +39,7 @@ "metadata": {}, "outputs": [], "source": [ - "!pip install flaml[notebook];" + "%pip install flaml[notebook]" ] }, { @@ -569,7 +569,7 @@ "metadata": {}, "outputs": [], "source": [ - "# !pip install optuna==2.8.0;" + "# %pip install optuna==2.8.0" ] }, { diff --git a/notebook/automl_nlp.ipynb b/notebook/automl_nlp.ipynb index 0076de3ce..3f1ef2356 100644 --- a/notebook/automl_nlp.ipynb +++ b/notebook/automl_nlp.ipynb @@ -192,7 +192,7 @@ } ], "source": [ - "!pip install flaml[nlp,ray,notebook,blendsearch];" + "%pip install flaml[nlp,ray,notebook,blendsearch]" ] }, { diff --git a/notebook/automl_xgboost.ipynb b/notebook/automl_xgboost.ipynb index 8e6697de7..bd6a12b87 100644 --- a/notebook/automl_xgboost.ipynb +++ b/notebook/automl_xgboost.ipynb @@ -39,7 +39,7 @@ "metadata": {}, "outputs": [], "source": [ - "!pip install flaml[notebook];" + "%pip install flaml[notebook]" ] }, { diff --git a/notebook/autovw.ipynb b/notebook/autovw.ipynb index 5ee95d9d4..1d00d3d80 100644 --- a/notebook/autovw.ipynb +++ b/notebook/autovw.ipynb @@ -31,7 +31,7 @@ "metadata": {}, "outputs": [], "source": [ - "!pip install flaml[notebook,vw];" + "%pip install flaml[notebook,vw]" ] }, { diff --git a/notebook/integrate_azureml.ipynb b/notebook/integrate_azureml.ipynb index da4bcafe5..224ca2b53 100644 --- a/notebook/integrate_azureml.ipynb +++ b/notebook/integrate_azureml.ipynb @@ -39,7 +39,7 @@ "metadata": {}, "outputs": [], "source": [ - "!pip install flaml[azureml]" + "%pip install flaml[azureml]" ] }, { diff --git a/notebook/integrate_sklearn.ipynb b/notebook/integrate_sklearn.ipynb index 5601b791a..83667543e 100644 --- a/notebook/integrate_sklearn.ipynb +++ b/notebook/integrate_sklearn.ipynb @@ -78,7 +78,7 @@ "metadata": {}, "outputs": [], "source": [ - "!pip install flaml[notebook];" + "%pip install flaml[notebook]" ] }, { diff --git a/notebook/research/acl2021.ipynb b/notebook/research/acl2021.ipynb index d1374eba5..4069f61d1 100644 --- a/notebook/research/acl2021.ipynb +++ b/notebook/research/acl2021.ipynb @@ -41,8 +41,8 @@ }, "outputs": [], "source": [ - "!pip install flaml[nlp]==0.7.1 # in higher version of flaml, the API for nlp tasks changed\n", - "!pip install transformers==3.4.0\n", + "%pip install flaml[nlp]==0.7.1 # in higher version of flaml, the API for nlp tasks changed\n", + "%pip install transformers==3.4.0\n", "from flaml.nlp import AutoTransformers\n" ] }, diff --git a/notebook/tune_huggingface.ipynb b/notebook/tune_huggingface.ipynb index e02fb2a2a..35b7e78c2 100644 --- a/notebook/tune_huggingface.ipynb +++ b/notebook/tune_huggingface.ipynb @@ -17,7 +17,7 @@ }, "outputs": [], "source": [ - "#!pip install torch transformers datasets ipywidgets flaml[blendsearch,ray];" + "# %pip install torch transformers datasets ipywidgets flaml[blendsearch,ray]" ] }, { diff --git a/notebook/tune_pytorch.ipynb b/notebook/tune_pytorch.ipynb index aac0cdbc3..d90f4fb9c 100644 --- a/notebook/tune_pytorch.ipynb +++ b/notebook/tune_pytorch.ipynb @@ -18,7 +18,7 @@ }, "outputs": [], "source": [ - "!pip install torchvision flaml[blendsearch,ray];" + "%pip install torchvision flaml[blendsearch,ray]" ] }, {