fix import failure in hub test (#14742)
authorAiling Zhang <ailzhang@fb.com>
Tue, 4 Dec 2018 16:34:04 +0000 (08:34 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 4 Dec 2018 16:37:05 +0000 (08:37 -0800)
commit86ffc2a5f1f004f586526e4c2a7c2f11ed9ea633
tree6d97bbacaad984770d16083bfa1572506408c1ba
parent9e58c4ef918b77850b343deac16960bb90b9e9ce
fix import failure in hub test (#14742)

Summary:
Fix #14610

I can repro the test failure following the steps provided, and this fixes the issue for me. Seems the timing of inserting has to happen after the downloading.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/14742

Differential Revision: D13318533

Pulled By: ailzhang

fbshipit-source-id: b9207b4572d5a9443e516d9a84632e3d7b68e477
torch/hub.py