From ab8068dbc96804a5c1a8b898fd115175cfebfe75 Mon Sep 17 00:00:00 2001 From: mmkamani7 Date: Tue, 13 Jul 2021 23:25:42 -0700 Subject: [PATCH] minor changes --- fedtorch/components/datasets/loader/libsvm_datasets.py | 2 +- fedtorch/nodes/nodes.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fedtorch/components/datasets/loader/libsvm_datasets.py b/fedtorch/components/datasets/loader/libsvm_datasets.py index 2ef67c1..3cd30de 100644 --- a/fedtorch/components/datasets/loader/libsvm_datasets.py +++ b/fedtorch/components/datasets/loader/libsvm_datasets.py @@ -116,7 +116,7 @@ def download(self,root, data_url, raw_file_path, file_path): return if not self._check_exists(raw_file_path): with TqdmUpTo(unit='B', unit_scale=True, unit_divisor=1024, miniters=1, desc=raw_file_path) as t: - urllib.request.urlretrieve(data_url,raw_file_path, reporthook=t.update_to, data=None) + urllib.request.urlretrieve(data_url, raw_file_path, reporthook=t.update_to, data=None) dataset = load_svmlight_file(raw_file_path) features, labels = self._get_images_and_labels(dataset) if self.name == "MSD": diff --git a/fedtorch/nodes/nodes.py b/fedtorch/nodes/nodes.py index ea66603..ae1f98e 100644 --- a/fedtorch/nodes/nodes.py +++ b/fedtorch/nodes/nodes.py @@ -66,6 +66,8 @@ def initialize_dataset(self): if self.args.graph.rank == 0: data_loader = get_dataset(self.args, self.args.data, self.args.data_dir, split='train') del data_loader + data_loader = get_dataset(self.args, self.args.data, self.args.data_dir, split='test') + del data_loader dist.barrier(group=self.all_clients_group) def load_local_dataset(self):