SMQTK icon indicating copy to clipboard operation
SMQTK copied to clipboard

Loading pytorch model from torchvision

Open vbhavank opened this issue 4 years ago • 7 comments

Using PyTorch model currently requires the user to define the architecture for some commonly used models. Therefore, we make use of torchvision library to import PyTorch models using labels specifying the name of the model (i.e., resnet50, vgg16) and return layer for feature collection (i.e., avgpool, classifier.4).

vbhavank avatar Apr 22 '20 21:04 vbhavank

This pull request introduces 10 alerts when merging 615a1cc92b3329e8b0ad408bf8aca0e509d11603 into 9697837ccbcbcfaa6a67e42f3cf9bda157668ffe - view on LGTM.com

new alerts:

  • 8 for Unused import
  • 1 for Unused local variable
  • 1 for Except block handles 'BaseException'

lgtm-com[bot] avatar Apr 22 '20 21:04 lgtm-com[bot]

This pull request introduces 1 alert when merging f189e4918f714eee13890e115e481c3397b52275 into 9697837ccbcbcfaa6a67e42f3cf9bda157668ffe - view on LGTM.com

new alerts:

  • 1 for Unused import

lgtm-com[bot] avatar Apr 23 '20 16:04 lgtm-com[bot]

Not sure what happened for it to look like it stalled, but the Travis-CI run failed, which should be viewable here. I'd suggest creating a virtualenv that does not have pytorch installed and check that the unit tests pass in that environment.

Purg avatar Apr 27 '20 23:04 Purg

Aha, I had multiple imports of the same library at different levels of the code. I have tried my best to tie them up with the last commit. I also tested the is_usable functionality by creating a new virtualenv without torch. Let me know what you think.

Thank you

On Mon, Apr 27, 2020 at 7:26 PM Paul Tunison [email protected] wrote:

Not sure what happened for it to look like it stalled, but the Travis-CI run failed, which should be viewable here https://travis-ci.org/github/Kitware/SMQTK/builds/678675855. I'd suggest creating a virtualenv that does not have pytorch installed and check that the unit tests pass in that environment.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Kitware/SMQTK/pull/409#issuecomment-620287633, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH7RA5UK6RO2EKHHDPEO3N3ROYIB3ANCNFSM4MOQEN5A .

--

Regards,

Bhavan Vasu

Research and Development Engineer, Kitware Inc

vbhavank avatar Apr 28 '20 19:04 vbhavank

I'm not sure why github isn't showing the link appropriately anymore, but please see the CI results for this PR here: https://travis-ci.org/github/Kitware/SMQTK/builds/680724077

Basically pytest is hitting every file and there are some that still have unprotected imports of torch/torchvision.

Purg avatar Apr 28 '20 21:04 Purg

This pull request introduces 3 alerts when merging 6f741d3fcbb0149d3a2744b9f970b6de22138894 into 9697837ccbcbcfaa6a67e42f3cf9bda157668ffe - view on LGTM.com

new alerts:

  • 3 for Unused import

lgtm-com[bot] avatar May 05 '20 20:05 lgtm-com[bot]

This pull request introduces 1 alert when merging c629a359f4d281bdaa696cda8edba4622c05fe8f into 9697837ccbcbcfaa6a67e42f3cf9bda157668ffe - view on LGTM.com

new alerts:

  • 1 for Unused import

lgtm-com[bot] avatar Jul 14 '20 21:07 lgtm-com[bot]