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

fix deprecation warning #66

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

eilinsky
Copy link

Tutorial/Bug description

Checklist

  • All packages are in the conda environment dl2021
  • Pretrained models are automatically downloaded and stored at https://github.com/phlippe/saved_models / a pull request has been setup for this
  • Notebook has badges for:
    • Filled notebook on github
    • Filled notebook on Colab
    • Saved models on github
    • YouTube recording
  • The author names have been filled in
  • The notebook has been added to the doc tree (docs/index.rst)
  • All images of the notebook are included in the pull request
  • The website was build locally once (do not commit the html files)

How Has This Been Tested?

  • Conda environment dl2021
  • Local computer - CPU
  • Local computer - GPU
  • Google Colab - CPU
  • Google Colab - GPU
  • Lisa - GPU

@phlippe
Copy link
Owner

phlippe commented Jan 17, 2023

Hi, thanks for opening the pull request. I am aware of the deprecation warning, but actively decided not to change it. The reason is that the solution you also have here does not natively work on GoogleColab. If you are aware of a solution that does easily work on GoogleColab too, let me know :)

@eilinsky
Copy link
Author

Just combine both:

try:
from matplotlib_inline.backend_inline import set_matplotlib_formats
except Exception as e:
from IPython.display import set_matplotlib_formats

set_matplotlib_formats('svg', 'pdf')

It works without warnings and errors both in jupyter lab and GoogleColab (checked both).

@sy-eng
Copy link

sy-eng commented Sep 17, 2023

I tried the tutorial on Colab and now it looks the modified code works and the original code have the deprecation warning.

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.

3 participants