Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mmkamani7 committed Jul 14, 2021
1 parent b58da74 commit ab8068d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion fedtorch/components/datasets/loader/libsvm_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down
2 changes: 2 additions & 0 deletions fedtorch/nodes/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit ab8068d

Please sign in to comment.