From 9d07d756aa935ceb650e0e67a90298e57b29627d Mon Sep 17 00:00:00 2001 From: Emmanuel Kahembwe Date: Sat, 1 Aug 2020 06:22:03 +0100 Subject: [PATCH] NameError: name 'mpu' is not defined (#305) mpu object is bound to the class instance.. the if statement uses `self.mpu' but just `mpu` is called in the following lines.. This raises a NameError --- deepspeed/pt/deepspeed_light.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deepspeed/pt/deepspeed_light.py b/deepspeed/pt/deepspeed_light.py index 6c335754bf50..20d680796127 100755 --- a/deepspeed/pt/deepspeed_light.py +++ b/deepspeed/pt/deepspeed_light.py @@ -650,8 +650,8 @@ def deepspeed_io(self, data_parallel_world_size = None data_parallel_rank = None if self.mpu is not None: - data_parallel_world_size = mpu.get_data_parallel_world_size() - data_parallel_rank = mpu.get_data_parallel_rank() + data_parallel_world_size = self.mpu.get_data_parallel_world_size() + data_parallel_rank = self.mpu.get_data_parallel_rank() return DeepSpeedDataLoader(dataset=dataset, batch_size=batch_size,