TensorRT icon indicating copy to clipboard operation
TensorRT copied to clipboard

remove torchvision as dependency

Open lanluo-nvidia opened this issue 1 year ago • 4 comments

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Type of change

Please delete options that are not relevant and/or add your own.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • [ ] My code follows the style guidelines of this project (You can use the linters)
  • [ ] I have performed a self-review of my own code
  • [ ] I have commented my code, particularly in hard-to-understand areas and hacks
  • [ ] I have made corresponding changes to the documentation
  • [ ] I have added tests to verify my fix or my feature
  • [ ] New and existing unit tests pass locally with my changes
  • [ ] I have added the relevant labels to my PR in so that relevant reviewers are notified

lanluo-nvidia avatar Sep 11 '24 18:09 lanluo-nvidia

Note that the latest nightly torchvision has depended on torch 2.6.0.dev, so installing torchtrt wheel will fail because it still depends on torch 2.5.0.dev.

HolyWu avatar Sep 16 '24 15:09 HolyWu

How many tests are getting altered from this changed? Are there tests where we could just use a simple network that we host and get similar impact for testing and not have to disable it?

I think we really only care about torchvision models in cases where we specifically want to test that model architecture (so we should have at least 1 resnet, 1 bert, 1 vit test) or we need real weights for some reason

narendasan avatar Sep 16 '24 17:09 narendasan

Note that the latest nightly torchvision has depended on torch 2.6.0.dev, so installing torchtrt wheel will fail because it still depends on torch 2.5.0.dev.

we have specified the torchvison version so that make sure it is compatible with torch version in the test.

How many tests are getting altered from this changed? Are there tests where we could just use a simple network that we host and get similar impact for testing and not have to disable it?

I think we really only care about torchvision models in cases where we specifically want to test that model architecture (so we should have at least 1 resnet, 1 bert, 1 vit test) or we need real weights for some reason

@narendasan
There are total 30 testcases which uses torchvision.resnet18(28 testcases) torchvision.mobilenet_v2(2 testcases) models for the Bertmodel we used it from transformers, did not use torchvision.

I can see most times we just use torchvision.resnet18 to test our features, it can be replaced with other simple network. For example: test_engine_cache.py we have 5 testcases uses resnet18 model to test engine cache related features test_model_refit.py we have 9 testcases use resnet18 model to test our refit related feature

I think for test_models.py is where we should actually use these torchvision.resnet18 and movilenet_v2 models for testing.

lanluo-nvidia avatar Sep 16 '24 21:09 lanluo-nvidia

Be aware that all tests were failed to run even though they all showed green. https://github.com/pytorch/TensorRT/actions/runs/10887326997/job/30210220619?pr=3158#step:12:522

HolyWu avatar Sep 17 '24 04:09 HolyWu