From bba70b793f787d1e9f672c7ffc2ef86908c40f32 Mon Sep 17 00:00:00 2001 From: Steffy-zxf Date: Wed, 24 Mar 2021 10:57:42 +0800 Subject: [PATCH] relocation chnsenticorp & lcqmc dataset --- paddlenlp/datasets/experimental/chnsenticorp.py | 5 ++--- paddlenlp/datasets/experimental/lcqmc.py | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/paddlenlp/datasets/experimental/chnsenticorp.py b/paddlenlp/datasets/experimental/chnsenticorp.py index b3d8307c47a28..1d19f14aa3837 100644 --- a/paddlenlp/datasets/experimental/chnsenticorp.py +++ b/paddlenlp/datasets/experimental/chnsenticorp.py @@ -48,13 +48,12 @@ class ChnSentiCorp(DatasetBuilder): def _get_data(self, mode, **kwargs): """Downloads dataset.""" - default_root = DATA_HOME + default_root = os.path.join(DATA_HOME, self.__class__.__name__) filename, data_hash = self.SPLITS[mode] fullname = os.path.join(default_root, filename) if not os.path.exists(fullname) or (data_hash and not md5file(fullname) == data_hash): - path = get_path_from_url(self.URL, default_root, self.MD5) - fullname = os.path.join(default_root, filename) + get_path_from_url(self.URL, default_root, self.MD5) return fullname diff --git a/paddlenlp/datasets/experimental/lcqmc.py b/paddlenlp/datasets/experimental/lcqmc.py index a75bb0f7f7429..ceacf6583e608 100644 --- a/paddlenlp/datasets/experimental/lcqmc.py +++ b/paddlenlp/datasets/experimental/lcqmc.py @@ -47,13 +47,12 @@ class LCQMC(DatasetBuilder): } def _get_data(self, mode, **kwargs): - default_root = DATA_HOME + default_root = os.path.join(DATA_HOME, self.__class__.__name__) filename, data_hash = self.SPLITS[mode] fullname = os.path.join(default_root, filename) if not os.path.exists(fullname) or (data_hash and not md5file(fullname) == data_hash): - path = get_path_from_url(self.URL, default_root, self.MD5) - fullname = os.path.join(default_root, filename) + get_path_from_url(self.URL, default_root, self.MD5) return fullname