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

Pin importlib_metadata<5.0 in requirements.txt #2091

Merged
merged 3 commits into from
Oct 21, 2022

Conversation

Balandat
Copy link
Contributor

v5.0.0 causes issues with python 3.7: python/importlib_metadata#411

This was raised in the context of #2090

This PR pins the version to <5.0 to circumvent this. Maybe a better fix would be to bump the python version in CI to 3.8, but that's something to discuss more broadly.

v5.0.0 causes issues with python 3.7: python/importlib_metadata#411

This was raised in the context of pytorch#2090

This PR pins the version to <5.0 to circumvent this. Maybe a better fix would be to bump the python version in CI to 3.8, but that's something to discuss more broadly.
@netlify
Copy link

netlify bot commented Oct 20, 2022

Deploy Preview for pytorch-tutorials-preview ready!

Name Link
🔨 Latest commit a57be64
🔍 Latest deploy log https://app.netlify.com/sites/pytorch-tutorials-preview/deploys/6351edd3c1b06b00083ac63c
😎 Deploy Preview https://deploy-preview-2091--pytorch-tutorials-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@svekars
Copy link
Contributor

svekars commented Oct 20, 2022

@malfet any objections?

@svekars svekars requested a review from malfet October 20, 2022 19:35
@svekars svekars added the 1.13 label Oct 20, 2022
Copy link
Contributor

@malfet malfet left a comment

Choose a reason for hiding this comment

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

Looks good to me, but I wonder if we can do something like (see PEP-508 ):

importlib-metadata<5.0; python-version<='3.7'
importlib-metadata; python-version>'3.7'

@Balandat Balandat merged commit 8e4a6bd into pytorch:master Oct 21, 2022
@Balandat Balandat deleted the pin_importlib_metadata branch October 21, 2022 03:12
svekars pushed a commit that referenced this pull request Oct 21, 2022
facebook-github-bot pushed a commit to pytorch/torchx that referenced this pull request Oct 21, 2022
Summary:
importlib.metadata in 3.12 breaks compatibility with the dict style interface. This switches TorchX to use importlib_metadata for all versions and switches the code to use the 3.10+ select style interface instead of dict.

This avoids having to pin importlib_metadata<5 such as in pytorch/tutorials#2091

Pull Request resolved: #623

Test Plan: Unit tests on both importlib_metadata 5.0 and 4.1.3

Reviewed By: priyaramani

Differential Revision: D40561638

Pulled By: d4l3k

fbshipit-source-id: 95144406c0e3dcbe203ada3ff3236f7384ab2a5c
vkuzo added a commit that referenced this pull request Oct 22, 2022
* update NS for FX tutorial for PyTorch v1.13

Summary:

Makes a couple of updates to ensure this tutorial still runs on 1.13:
1. changes the `qconfig_dict` argument of `prepare_fx` to `qconfig_mapping`
2. adds `example_inputs` to `prepare_fx`

Test plan:

Run the tutorial, it runs without errors on master

* Pin importlib_metadata<5.0 for python <= 3.7 in requirements.txt (#2091)

v5.0.0 causes issues with python 3.7: python/importlib_metadata#411

* Enable the FX tutorial

Co-authored-by: Max Balandat <Balandat@users.noreply.github.com>
Co-authored-by: Svetlana Karslioglu <svekars@fb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants