resources fix

Summary: I don't know why RE tests sometimes fail here, but maybe it's a race condition. If that's right, this should fix it.

Reviewed By: shapovalov

Differential Revision: D46020054

fbshipit-source-id: 20b746b09ad9bd77c2601ac681047ccc6cc27ed9
This commit is contained in:
Jeremy Reizenstein 2023-05-19 06:41:33 -07:00 committed by Facebook GitHub Bot
parent b0462598ac
commit ff80183fdb

View File

@ -136,7 +136,10 @@ def _provide_torchvision_weights(par_path: str, filename: str) -> None:
dest.mkdir(parents=True)
if not (dest / filename).is_symlink():
try:
(dest / filename).symlink_to(source)
except FileExistsError:
print("FileExistsError: no symlink created.")
def provide_lpips_vgg() -> None: