You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by tq...@apache.org on 2021/05/14 21:51:44 UTC

[tvm] branch main updated: Fix AttributeError when TEST_DATA_ROOT_PATH is set (#8047)

This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new e52b817  Fix AttributeError when TEST_DATA_ROOT_PATH is set (#8047)
e52b817 is described below

commit e52b8172e9e4035f48b93532a465ce08672258a3
Author: chiwwang <84...@users.noreply.github.com>
AuthorDate: Sat May 15 05:51:23 2021 +0800

    Fix AttributeError when TEST_DATA_ROOT_PATH is set (#8047)
    
    Initiate a Path object from TEST_DATA_ROOT_PATH to fix the error:
    AttributeError: 'str' object has no attribute 'mkdir'
---
 python/tvm/contrib/download.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python/tvm/contrib/download.py b/python/tvm/contrib/download.py
index dd7967f..f7c68a9 100644
--- a/python/tvm/contrib/download.py
+++ b/python/tvm/contrib/download.py
@@ -121,7 +121,7 @@ def download(url, path, overwrite=False, size_compare=False, verbose=1, retries=
 
 
 if "TEST_DATA_ROOT_PATH" in environ:
-    TEST_DATA_ROOT_PATH = environ.get("TEST_DATA_ROOT_PATH")
+    TEST_DATA_ROOT_PATH = Path(environ.get("TEST_DATA_ROOT_PATH"))
 else:
     TEST_DATA_ROOT_PATH = Path(Path("~").expanduser(), ".tvm_test_data")
 TEST_DATA_ROOT_PATH.mkdir(parents=True, exist_ok=True)