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

Remove torchvision dependency and solve pytorch vulnerability #41

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

hykilpikonna
Copy link
Contributor

In the dependency requirements, torchvision is limited to version ^0.16.0 (which is equivalent to 0.16.*), it prompts for a dependency conflict when trying to upgrade pytorch above 2.1.0. However, there is a high-risk security vulnerability affecting pytorch <= 2.2.0, as shown in the image below.

image

As I scanned through the codebase, it becomes clear that torchvision is only used for downloading a file in the examples 🤔 so I decided to remove it and replace the file downloading with standard requests.

  1. Removed torchvision dependency and migrated file downloading to use requests
  2. Removed unused numba dependency
  3. Upgraded dependency lock to the latest compatible versions (which solves the security vulnerability for pytorch)

I ran tests to ensure that everything work as expected after the change:
image

@bmartin1 bmartin1 merged commit e8a6467 into microsoft:main Sep 18, 2024
1 check passed
@bmartin1
Copy link
Contributor

Thank you @hykilpikonna !

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.

2 participants