Skip to content

Commit

Permalink
Insights Fixes (#526)
Browse files Browse the repository at this point in the history
Summary:
Insights example no longer worked after building master. This seems to be because of 2 issues:

1. Paths in setup.py needed to be updated after this refactoring #419 .
2. cifar_torchvision.pt seems to have been corrupted when this file was moved in #419, based on comparing the sizes in these 2 revisions:
https://github.com/pytorch/captum/blob/9bcf257f9b3811230f370ced1b0801d8df5aa9ee/captum/insights/models/cifar_torchvision.pt - > 244 KB
https://github.com/pytorch/captum/blob/master/captum/insights/attr_vis/models/cifar_torchvision.pt - >239 KB (master)

It seems like this was caused by the new file not being detected as binary, causing some corruption when pushed. This updates gitattributes to treat all .pt files as binary.

Pull Request resolved: #526

Reviewed By: bilalsal

Differential Revision: D24952285

Pulled By: vivekmig

fbshipit-source-id: 77b54caad7a4f2d2888ea59260603e00d62748ec
  • Loading branch information
vivekmig authored and facebook-github-bot committed Nov 13, 2020
1 parent 83a7e3e commit 26cad25
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
tutorials/* linguist-documentation
*.pt binary
Binary file modified captum/insights/attr_vis/models/cifar_torchvision.pt
Binary file not shown.
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ def report(*args):
INSIGHTS_REQUIRES = ["flask", "ipython", "ipywidgets", "jupyter"]

INSIGHTS_FILE_SUBDIRS = [
"insights/frontend/build",
"insights/models",
"insights/widget/static",
"insights/attr_vis/frontend/build",
"insights/attr_vis/models",
"insights/attr_vis/widget/static",
]

TUTORIALS_REQUIRES = INSIGHTS_REQUIRES + ["torchtext", "torchvision"]
Expand Down

0 comments on commit 26cad25

Please sign in to comment.