From: Neo Chien Date: Thu, 29 Aug 2019 03:12:28 +0000 (+0800) Subject: [TEST] Not assuming HOME in tvm/download.py (#3803) X-Git-Tag: upstream/0.7.0~1992 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5eaf74abfe900286d956328c9267bc266d512400;p=platform%2Fupstream%2Ftvm.git [TEST] Not assuming HOME in tvm/download.py (#3803) * Not assuming HOME in tvm/download.py * Trigger notification --- diff --git a/python/tvm/contrib/download.py b/python/tvm/contrib/download.py index b3ba7ef..2dd9559 100644 --- a/python/tvm/contrib/download.py +++ b/python/tvm/contrib/download.py @@ -119,7 +119,10 @@ def download(url, path, overwrite=False, size_compare=False, verbose=1, retries= .format(repr(err), retries, 's' if retries > 1 else '')) -TEST_DATA_ROOT_PATH = os.path.join(os.path.expanduser('~'), '.tvm_test_data') +if "TEST_DATA_ROOT_PATH" in os.environ: + TEST_DATA_ROOT_PATH = os.environ.get("TEST_DATA_ROOT_PATH") +else: + TEST_DATA_ROOT_PATH = os.path.join(os.path.expanduser('~'), '.tvm_test_data') os.makedirs(TEST_DATA_ROOT_PATH, exist_ok=True)