How to use the lineflow.download.get_cache_root function in lineflow

To help you get started, we’ve selected a few lineflow examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tofunlp / lineflow / tests / test_download.py View on Github external
def setUp(self):
        self.default_cache_root = download.get_cache_root()
        self.temp_dir = tempfile.mkdtemp()
        download.set_cache_root(self.temp_dir)
github tofunlp / lineflow / tests / datasets / test_cnn_dailymail.py View on Github external
def setUp(self):
        self.default_cache_root = download.get_cache_root()
        self.temp_dir = tempfile.mkdtemp()
        download.set_cache_root(self.temp_dir)
github tofunlp / lineflow / tests / datasets / test_text_classification.py View on Github external
def setUp(self):
        self.default_cache_root = download.get_cache_root()
        self.temp_dir = tempfile.mkdtemp()
        download.set_cache_root(self.temp_dir)
        self.patcher = mock.patch('lineflow.datasets.text_classification.sys.maxsize',
                                  int(sys.float_info.max))
        self.patcher.start()
github tofunlp / lineflow / tests / datasets / test_msr_paraphrase.py View on Github external
def setUp(self):
        self.default_cache_root = download.get_cache_root()
        self.temp_dir = tempfile.mkdtemp()
        download.set_cache_root(self.temp_dir)
github tofunlp / lineflow / tests / datasets / test_imdb.py View on Github external
def setUp(self):
        self.default_cache_root = download.get_cache_root()
        self.temp_dir = tempfile.mkdtemp()
        download.set_cache_root(self.temp_dir)
github tofunlp / lineflow / tests / datasets / test_squad.py View on Github external
def setUp(self):
        self.default_cache_root = download.get_cache_root()
        self.temp_dir = tempfile.mkdtemp()
        download.set_cache_root(self.temp_dir)
github tofunlp / lineflow / tests / test_download.py View on Github external
def test_get_cache_directory(self):
        root = download.get_cache_root()
        path = download.get_cache_directory('test', False)
        self.assertEqual(path, os.path.join(root, 'test'))