Skip to content

[Bug: 766] Fix OpenFL MICCAI tutorials - #1

Open
NeethuESim wants to merge 2 commits into
gh-pagesfrom
ISSUE-766
Open

[Bug: 766] Fix OpenFL MICCAI tutorials#1
NeethuESim wants to merge 2 commits into
gh-pagesfrom
ISSUE-766

Conversation

@NeethuESim

@NeethuESim NeethuESim commented Apr 27, 2023

Copy link
Copy Markdown
Collaborator

Fixes following 2 notebook in the tutorials -

  1. 2D MedMNIST - added ipywidgets to make tqm work on jupyter notebook
  2. OpenFL GaNDLF tutorial - added note that OpenFL needs python 3.8 to work without any errors. Google collab runs the notebook with python 3.9.16 by default, this needs to be changed to 3.8 to run without any errors

Fixes #766

Testing Steps

  • Download code
  • got to tutorial_notebooks
  • run juptyer notebook
  • open notebooks 2D MedMNIST & OpenFL GaNDLF tutorial
  • note on using python 3.8 should be seen on the top
  • both notebooks should run without errors

Co-authored-by: Emmanuel Jillela emmanuel.jillela@intel.com
Signed-off-by: Neethu Elizabeth Simon neethu.elizabeth.simon@intel.com

Fixes following 2 notebook in the tutorials -
1) 2D MedMNIST - added ipywidgets to make tqm work on jupyter notebook
2) OpenFL GaNDLF tutorial - added note that OpenFL needs python 3.8 to work without any errors. Google collab runs the notebook with python 3.9.16 by default, this needs to be changed to 3.8 to run without any errors
Fixes #766
Co-authored-by: Emmanuel Jillela <emmanuel.jillela@intel.com>
Signed-off-by: Neethu Elizabeth Simon <neethu.elizabeth.simon@intel.com>
@mansishr

Copy link
Copy Markdown

Hi all, we tried running 2DMedMNIST on Google Colab, but see an error during pip install openfl . Could you please look into this?

Processing /content/openfl
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  Preparing metadata (setup.py) ... error
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

@NeethuESim

Copy link
Copy Markdown
Collaborator Author

Hi all, we tried running 2DMedMNIST on Google Colab, but see an error during pip install openfl . Could you please look into this?

Processing /content/openfl
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  Preparing metadata (setup.py) ... error
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

What is the python version on Google Collab ? OpenFL works with version 3.8 only.

@kminhta

kminhta commented May 22, 2023

Copy link
Copy Markdown

Hi @mansishr, I've also had issues running in Google Colab. Because the 2D medmnist tutorial installs openfl from the miccai_fl_tutorial branch, it installs openFL v1.4 which has python_requires='>=3.6, <3.9' set. Google Colab runs py3.10, which is causing the installation failure.

I've tried to downgrade to py3.8 with no luck (I've ran into issues down the line) The only workaround I've had success with is to just install openFL from the main branch. The only caveat is that openFL v1.5 requires protobuff == 3.19.6, which the current installation of tensorflow does not support. This will cause you to run into an error when trying to call openfl since it will try to import tensorflow. You can simply !pip uninstall tensorflow or downgrade it to tensorflow~=2.11 and the 2D medmnist tutorial should run fine.

I have not tested on the GaNDLF tutorial, but I anticipate a similar experience

@mansishr

Copy link
Copy Markdown

Hi Team,

Could you add a note on running both the Colab notebooks with Python3.8 interpreter as well (not just with python3.8 version). Also, it will be great to let users know how to change the python version (these lines below could be added and commented):

!python --version
!sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
!sudo update-alternatives --config python3
!python3 --version
!sudo apt install python3-pip

@NeethuESim

NeethuESim commented May 23, 2023

Copy link
Copy Markdown
Collaborator Author

Hi Team,

Could you add a note on running both the Colab notebooks with Python3.8 interpreter as well (not just with python3.8 version). Also, it will be great to let users know how to change the python version (these lines below could be added and commented):

!python --version
!sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
!sudo update-alternatives --config python3
!python3 --version
!sudo apt install python3-pip

Hi Mansi,

I had added the comment on the python version on top of the google collab as part of the PR. Now I have added the code to change python version as the first cell in the collab notebook.
commit- b132088

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix OpenFL MICCAI tutorials

4 participants