Skip to content

Commit

Permalink
Added fix for test_classification, too
Browse files Browse the repository at this point in the history
  • Loading branch information
ckunki committed Aug 14, 2024
1 parent 8ae04e4 commit df1ee06
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 31 deletions.
2 changes: 1 addition & 1 deletion doc/changes/changes_2.1.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Version: 2.1.0
## Bug Fixes

* #303: Fixed AWS Codebuild
* #313: Enabled fixing differing versions of dependency scikit-learn
* #313: Fixed differing versions of dependency `scikit-learn`

## Documentation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,31 +71,7 @@
"execution_count": 31,
"id": "fa6c628f-853e-4850-8bab-46f7f645856e",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"AI-Lab scikit-learn version 1.0.2 differs from SLC.\n",
"Installing version 1.4.2 ...\n",
"Collecting scikit_learn==1.4.2\n",
" Downloading scikit_learn-1.4.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (11 kB)\n",
"Requirement already satisfied: numpy>=1.19.5 in /home/jupyter/jupyterenv/lib/python3.10/site-packages (from scikit_learn==1.4.2) (1.26.4)\n",
"Requirement already satisfied: scipy>=1.6.0 in /home/jupyter/jupyterenv/lib/python3.10/site-packages (from scikit_learn==1.4.2) (1.14.0)\n",
"Requirement already satisfied: joblib>=1.2.0 in /home/jupyter/jupyterenv/lib/python3.10/site-packages (from scikit_learn==1.4.2) (1.4.2)\n",
"Requirement already satisfied: threadpoolctl>=2.0.0 in /home/jupyter/jupyterenv/lib/python3.10/site-packages (from scikit_learn==1.4.2) (3.5.0)\n",
"Downloading scikit_learn-1.4.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.1 MB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m12.1/12.1 MB\u001b[0m \u001b[31m6.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0ma \u001b[36m0:00:01\u001b[0m\n",
"\u001b[?25hInstalling collected packages: scikit_learn\n",
" Attempting uninstall: scikit_learn\n",
" Found existing installation: scikit-learn 1.0.2\n",
" Uninstalling scikit-learn-1.0.2:\n",
" Successfully uninstalled scikit-learn-1.0.2\n",
"Successfully installed scikit_learn-1.4.2\n",
"Note: you may need to restart the kernel to use updated packages.\n"
]
}
],
"outputs": [],
"source": [
"import textwrap\n",
"import sklearn\n",
Expand All @@ -116,17 +92,13 @@
" result = conn.execute(\"select {schema!q}.detect_skikit_learn_version()\", query_params).fetchone()\n",
" slc_version = result[0]\n",
"\n",
"# slc_version = \"1.4.2\"\n",
"\n",
"my_version = sklearn.__version__\n",
"\n",
"if slc_version == my_version:\n",
" print(f\"AI-Lab scikit-learn version {my_version} is identical to that of the SLC.\\nNothing to do.\")\n",
"else:\n",
" print(f\"AI-Lab scikit-learn version {my_version} differs from SLC.\\nInstalling version {slc_version} ...\")\n",
" %pip install \"scikit_learn=={slc_version}\"\n",
" # print(f'%pip install f\"scikit_learn=={slc_version}\"')\n",
" # %pip show scikit_learn"
]
},
{
Expand Down
3 changes: 2 additions & 1 deletion test/notebooks/nbtest_sklearn.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_regression(notebook_runner) -> None:
os.chdir('./data')
notebook_runner('data_abalone.ipynb')
os.chdir('../sklearn')
notebook_runner('sklearn_fix_version.ipynb')
notebook_runner('sklearn_fix_version.ipynb')
notebook_runner('sklearn_predict_udf.ipynb')
notebook_runner('sklearn_train_abalone.ipynb')
notebook_runner('sklearn_predict_abalone.ipynb')
Expand All @@ -39,6 +39,7 @@ def test_classification(notebook_runner) -> None:
os.chdir('./data')
notebook_runner('data_telescope.ipynb')
os.chdir('../sklearn')
notebook_runner('sklearn_fix_version.ipynb')
notebook_runner('sklearn_predict_udf.ipynb')
notebook_runner('sklearn_train_telescope.ipynb')
notebook_runner('sklearn_predict_telescope.ipynb')
Expand Down

0 comments on commit df1ee06

Please sign in to comment.