Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed a couple of issues that made the notebook not work in colab #1460

Merged
merged 6 commits into from
Apr 22, 2022

Conversation

jere357
Copy link
Contributor

@jere357 jere357 commented Apr 8, 2022

i fixed a couple of issues that made the notebook not work in colab

  1. it downloaded incompatible versions of pytorch and cuda + the conda command doesnt do anything in colab since there is no conda in colab idk w y wanna do about that - The commit of 2 days ago only changes the conda command version and not the pip command which is used while isntaling mcvv
  2. /demo.png doesnt exist in colab so i added a wget to download some cityscapes photo from the internet and run inference on that photo
  3. i think it would be optimal to have 2 notebooks. 1 for running locally when cloning your git branch and one to run in google colab.

Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.

Motivation

i want to create a notebook that is instantly runnable in google colab - the previous setup only work if u git clone ur branch

Modification

i changed like 5 lines of code

BC-breaking (Optional)

i dont think this will break anything

Use cases (Optional)

If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.

Checklist

  1. Pre-commit or other linting tools are used to fix the potential lint issues.
  2. The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  3. If the modification has potential influence on downstream projects, this PR should be tested with downstream projects, like MMDet or MMDet3D.
  4. The documentation has been modified accordingly, like docstring or example tutorials.

i fixed a couple of issues that made the notebook not work in colab 
1. it downloaded incompatible versions of pytorch and cuda + the conda command doesnt do anything in colab since there is no conda in colab idk w y wanna do about that - The commit of 2 days ago only changes the conda command version and not the pip command which is used while isntaling mcvv
2. /demo.png doesnt exist in colab so i added a wget to download some cityscapes photo from the internet and run inference on that photo
3. i think it would be optimal to have 2 notebooks. 1 for running locally when cloning your git branch and one to run in google colab.
@CLAassistant
Copy link

CLAassistant commented Apr 8, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@MeowZheng MeowZheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for your contribution and please sign CLA first.

After our discussion, we think keep 2 notebooks you suggested is a good idea, and this notebook is just for users running locally, so it might only fix mmcv installation in this PR, and keep the other as it is. thanks again

Comment on lines 160 to 161
"config_file = '../mmsegmentation/configs/pspnet/pspnet_r50-d8_512x1024_40k_cityscapes.py'\n",
"checkpoint_file = '../mmsegmentation/checkpoints/pspnet_r50-d8_512x1024_40k_cityscapes_20200605_003338-2966598c.pth'\n"
Copy link
Collaborator

@MeowZheng MeowZheng Apr 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we usually assumed users run this notebook locally, so we would like to keep the original file path.

Copy link
Contributor Author

@jere357 jere357 Apr 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for your contribution and please sign CLA first.

After our discussion, we think keep 2 notebooks you suggested is a good idea, and this notebook is just for users running locally, so it might only fix mmcv installation in this PR, and keep the other as it is. thanks again

yeah i agree, 2 notebooks will work best since theyre designed to run in 2 completely different enviroments, i have signed the cla
yes just remember for the colab version to use the config file and checkpoint file paths i suggested, those worked for me

@MeowZheng MeowZheng merged commit e231583 into open-mmlab:master Apr 22, 2022
ZhimingNJ pushed a commit to AetrexTechnology/mmsegmentation that referenced this pull request Jun 29, 2022
…pen-mmlab#1460)

* fixed a couple of issues that made the notebook not work in colab

i fixed a couple of issues that made the notebook not work in colab 
1. it downloaded incompatible versions of pytorch and cuda + the conda command doesnt do anything in colab since there is no conda in colab idk w y wanna do about that - The commit of 2 days ago only changes the conda command version and not the pip command which is used while isntaling mcvv
2. /demo.png doesnt exist in colab so i added a wget to download some cityscapes photo from the internet and run inference on that photo
3. i think it would be optimal to have 2 notebooks. 1 for running locally when cloning your git branch and one to run in google colab.

* Update demo/MMSegmentation_Tutorial.ipynb

* Update demo/MMSegmentation_Tutorial.ipynb

* Update demo/MMSegmentation_Tutorial.ipynb

* Update demo/MMSegmentation_Tutorial.ipynb

* Update demo/MMSegmentation_Tutorial.ipynb

Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com>
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.

4 participants