Skip to content

Commit 927a7d5

Browse files
committed
removed now unnecessary path additions, cleaned up.
1 parent bf7bb7f commit 927a7d5

1 file changed

Lines changed: 3 additions & 59 deletions

File tree

notebooks/unit_test_synthetic.ipynb

Lines changed: 3 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,7 @@
1616
"os.environ[\"PYTHONWARNINGS\"] = \"ignore::UserWarning\"\n",
1717
"warnings.filterwarnings('ignore') \n",
1818
"#os.environ[\"CUDA_DEVICE_ORDER\"]=\"PCI_BUS_ID\" # see issue #152\n",
19-
"os.environ[\"CUDA_VISIBLE_DEVICES\"]=\"1\"\n",
20-
"\n",
21-
"path_to_add = \"../gloabl_files/ml_binary_classification_gridsearch_hyperOpt/\"\n",
22-
"sys.path.append(path_to_add)\n",
23-
"path_to_add = \"../\"\n",
24-
"sys.path.append(path_to_add)\n",
25-
"path_to_add = \"/mnt/cs0/samorah/gloabl_files/ml_binary_classification_gridsearch_hyperOpt\"\n",
26-
"sys.path.append(path_to_add)"
19+
"os.environ[\"CUDA_VISIBLE_DEVICES\"]=\"1\""
2720
]
2821
},
2922
{
@@ -56,27 +49,6 @@
5649
" print(\"CPU core binding is disabled.\")\n"
5750
]
5851
},
59-
{
60-
"cell_type": "code",
61-
"execution_count": null,
62-
"metadata": {},
63-
"outputs": [],
64-
"source": [
65-
"## Forcibly install packages one by one\n",
66-
"# import subprocess\n",
67-
"\n",
68-
"# with open('requirements.txt', 'r') as file:\n",
69-
"# packages = file.readlines()\n",
70-
"\n",
71-
"# for package in packages:\n",
72-
"# package = package.strip() # Remove leading/trailing whitespaces, if any\n",
73-
"# try:\n",
74-
"# subprocess.check_call([\"pip\", \"install\", package])\n",
75-
"# print(f\"Successfully installed {package}\")\n",
76-
"# except Exception as e:\n",
77-
"# print(f\"Failed to install {package}: {e}\")\n"
78-
]
79-
},
8052
{
8153
"cell_type": "code",
8254
"execution_count": null,
@@ -96,15 +68,6 @@
9668
"output = ipw.Output()"
9769
]
9870
},
99-
{
100-
"cell_type": "code",
101-
"execution_count": null,
102-
"metadata": {},
103-
"outputs": [],
104-
"source": [
105-
"#%pip install hyperopt"
106-
]
107-
},
10871
{
10972
"cell_type": "code",
11073
"execution_count": null,
@@ -625,7 +588,7 @@
625588
" from datetime import datetime\n",
626589
" from hyperopt import fmin, tpe, Trials\n",
627590
" from joblib import Parallel, delayed\n",
628-
" from sklearn.utils._joblib import parallel_backend # Correct import for parallel_backend\n",
591+
" from joblib import parallel_backend # Correct import for parallel_backend\\n\n",
629592
"\n",
630593
" # Get number of cores\n",
631594
" num_cores = multiprocessing.cpu_count()\n",
@@ -912,13 +875,6 @@
912875
"plt.show()\n"
913876
]
914877
},
915-
{
916-
"cell_type": "code",
917-
"execution_count": null,
918-
"metadata": {},
919-
"outputs": [],
920-
"source": []
921-
},
922878
{
923879
"cell_type": "code",
924880
"execution_count": null,
@@ -928,18 +884,6 @@
928884
"print(\"done\")"
929885
]
930886
},
931-
{
932-
"cell_type": "code",
933-
"execution_count": null,
934-
"metadata": {},
935-
"outputs": [],
936-
"source": [
937-
"# models_path = os.path.join(parent_dir, latest_folder, 'models')\n",
938-
"\n",
939-
"# len(os.listdir(models_path\n",
940-
"# ))"
941-
]
942-
},
943887
{
944888
"cell_type": "code",
945889
"execution_count": null,
@@ -976,7 +920,7 @@
976920
],
977921
"metadata": {
978922
"kernelspec": {
979-
"display_name": "ml_grid_env",
923+
"display_name": "Python (ml_grid_env)",
980924
"language": "python",
981925
"name": "ml_grid_env"
982926
},

0 commit comments

Comments
 (0)