Skip to content

Commit

Permalink
Merge pull request #957 from SoanKim/conflict_solved
Browse files Browse the repository at this point in the history
Solved some issues
  • Loading branch information
iamzoltan authored Jul 8, 2024
2 parents 41faa2a + d159bb5 commit 8a38eb8
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 22 deletions.
4 changes: 2 additions & 2 deletions projects/Neuroscience/blurry_vision.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
" Building wheel for torch-intermediate-layer-getter (setup.py) ... \u001b[?25l\u001b[?25hdone\n"
" Building wheel for torch-intermediate-layer-getter (setup.py) ... \u001B[?25l\u001B[?25hdone\n"
]
}
],
Expand Down Expand Up @@ -1877,7 +1877,7 @@
"# # Download the Data\n",
"# if \"cats-and-dogs.zip\" not in os.listdir():\n",
"# !wget --no-check-certificate \\\n",
"# \"https://download.microsoft.com/download/3/E/1/3E1C3F21-ECDB-4869-8368-6DEBA77B919F/kagglecatsanddogs_3367a.zip\" \\\n",
"# \"https://download.microsoft.com/download/3/E/1/3E1C3F21-ECDB-4869-8368-6DEBA77B919F/kagglecatsanddogs_5340.zip\" \\\n",
"# -O \"cats-and-dogs.zip\"\n",
"\n",
"# local_zip = 'cats-and-dogs.zip'\n",
Expand Down
9 changes: 6 additions & 3 deletions projects/Neuroscience/cellular_segmentation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -304,14 +304,14 @@
"labels_train = np.zeros((len(masks_train), 2,\n",
" masks_train.shape[-2],\n",
" masks_train.shape[-1]),\n",
" np.long)\n",
" np.longlong)\n",
"labels_train[:, 0] = masks_train == 0\n",
"labels_train[:, 1] = masks_train > 0\n",
"\n",
"labels_test = np.zeros((len(masks_test), 2,\n",
" masks_test.shape[-2],\n",
" masks_test.shape[-1]),\n",
" np.long)\n",
" np.longlong)\n",
"labels_test[:, 0] = masks_test == 0\n",
"labels_test[:, 1] = masks_test > 0"
]
Expand Down Expand Up @@ -831,12 +831,15 @@
" for ibatch in np.arange(0, n_train, batch_size):\n",
" # augment the data\n",
" inds = np.arange(ibatch, min(n_train, ibatch+batch_size))\n",
" train_data = train_data.astype(np.float32)\n",
" train_labels = train_labels.astype(np.float32)\n",
" imgs, lbls, _ = random_rotate_and_resize(train_data[inds],\n",
" train_labels[inds])\n",
"\n",
" # transfer to torch + GPU\n",
" imgs = torch.from_numpy(imgs).to(device=device)\n",
" lbls = torch.from_numpy(lbls).to(device=device)\n",
" lbls = lbls.long()\n",
"\n",
" # compute the loss\n",
" y = net(imgs)\n",
Expand Down Expand Up @@ -1379,7 +1382,7 @@
"from tifffile import imread\n",
"\n",
"fname = \"gt1.tif\"\n",
"url = \"https://www.suite2p.org/test_data/gt1.tif\"\n",
"url = \"https://www.suite2p.org/test_data/gt1.tif\" # This URL does not exist.\n",
"\n",
"if not os.path.isfile(fname):\n",
" try:\n",
Expand Down
26 changes: 13 additions & 13 deletions projects/ReinforcementLearning/human_rl.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -64,24 +64,24 @@
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
"numba 0.56.4 requires numpy<1.24,>=1.18, but you have numpy 1.25.1 which is incompatible.\u001b[0m\u001b[31m\n",
"\u001b[0m\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
"chex 0.1.81 requires numpy>=1.25.0, but you have numpy 1.23.3 which is incompatible.\u001b[0m\u001b[31m\n",
"\u001b[0m"
"\u001B[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
"numba 0.56.4 requires numpy<1.24,>=1.18, but you have numpy 1.25.1 which is incompatible.\u001B[0m\u001B[31m\n",
"\u001B[0m\u001B[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
"chex 0.1.81 requires numpy>=1.25.0, but you have numpy 1.23.3 which is incompatible.\u001B[0m\u001B[31m\n",
"\u001B[0m"
]
}
],
"source": [
"# @title Install dependencies\n",
"!pip install jedi --quiet\n",
"!pip install --upgrade pip setuptools wheel --quiet\n",
"!pip install dm-acme[jax] --quiet\n",
"!pip install dm-sonnet --quiet\n",
"!pip install trfl --quiet\n",
"!pip install numpy==1.23.3 --quiet --ignore-installed\n",
"!pip uninstall seaborn -y --quiet\n",
"!pip install seaborn --quiet"
"!pip install jedi --quiet --root-user-action=ignore\n",
"!pip install --upgrade pip setuptools wheel --quiet --root-user-action=ignore\n",
"!pip install dm-acme[jax] --quiet --root-user-action=ignore\n",
"!pip install dm-sonnet --quiet --root-user-action=ignore\n",
"!pip install trfl --quiet --root-user-action=ignore\n",
"!pip install numpy==1.23.3 --quiet --ignore-installed --root-user-action=ignore\n",
"!pip uninstall seaborn -y --quiet --root-user-action=ignore\n",
"!pip install seaborn --quiet --root-user-action=ignore"
]
},
{
Expand Down
7 changes: 3 additions & 4 deletions projects/ReinforcementLearning/lunar_lander.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,11 @@
"!pip install rarfile --quiet\n",
"!pip install stable-baselines3[extra] --quiet\n",
"!pip install ale-py --quiet\n",
"!pip install -q swig --quiet\n",
"!pip install gym[box2d] --quiet\n",
"!pip install pyvirtualdisplay --quiet\n",
"!pip install pyglet --quiet\n",
"!pip install pygame --quiet\n",
"!pip install minigrid --quiet\n",
"!pip install -q swig --quiet\n",
"!pip install -q gymnasium[box2d] --quiet\n",
"!pip install 'minigrid<=2.1.1' --quiet\n",
"!pip3 install box2d-py --quiet"
Expand Down Expand Up @@ -383,7 +382,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"/usr/local/lib/python3.10/dist-packages/gym/wrappers/monitoring/video_recorder.py:101: DeprecationWarning: \u001b[33mWARN: <class 'gym.wrappers.monitoring.video_recorder.VideoRecorder'> is marked as deprecated and will be removed in the future.\u001b[0m\n",
"/usr/local/lib/python3.10/dist-packages/gym/wrappers/monitoring/video_recorder.py:101: DeprecationWarning: \u001B[33mWARN: <class 'gym.wrappers.monitoring.video_recorder.VideoRecorder'> is marked as deprecated and will be removed in the future.\u001B[0m\n",
" logger.deprecation(\n"
]
},
Expand Down Expand Up @@ -543,7 +542,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"/usr/local/lib/python3.10/dist-packages/gym/wrappers/monitoring/video_recorder.py:101: DeprecationWarning: \u001b[33mWARN: <class 'gym.wrappers.monitoring.video_recorder.VideoRecorder'> is marked as deprecated and will be removed in the future.\u001b[0m\n",
"/usr/local/lib/python3.10/dist-packages/gym/wrappers/monitoring/video_recorder.py:101: DeprecationWarning: \u001B[33mWARN: <class 'gym.wrappers.monitoring.video_recorder.VideoRecorder'> is marked as deprecated and will be removed in the future.\u001B[0m\n",
" logger.deprecation(\n"
]
},
Expand Down

0 comments on commit 8a38eb8

Please sign in to comment.