From b4fb81537e6a5fdcd7dd1bf300e18f278f453dfb Mon Sep 17 00:00:00 2001
From: Yifan Zhao <yifanz16@illinois.edu>
Date: Mon, 22 Mar 2021 23:21:22 -0500
Subject: [PATCH] Fixed small problem in frontend when using python 3.6

---
 hpvm/projects/torch2hpvm/torch2hpvm/compile.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hpvm/projects/torch2hpvm/torch2hpvm/compile.py b/hpvm/projects/torch2hpvm/torch2hpvm/compile.py
index f0d8c3b131..f469c871f9 100644
--- a/hpvm/projects/torch2hpvm/torch2hpvm/compile.py
+++ b/hpvm/projects/torch2hpvm/torch2hpvm/compile.py
@@ -201,7 +201,8 @@ class ModelExporter:
 
         def link_from_to(from_: PathLike, to: PathLike):
             from_, to = Path(from_), Path(to)
-            from_.unlink(missing_ok=True)
+            if from_.exists():
+                from_.unlink()
             from_.symlink_to(to.absolute())
 
         if isinstance(dataset, BinDataset):
-- 
GitLab