bluefog icon indicating copy to clipboard operation
bluefog copied to clipboard

Error when calling push-sum optimizer

Open yangxuanfei opened this issue 3 years ago • 3 comments

Note that the bottom layer has the definition of DistributedPushSumOptimizer, why call this error: AttributeErron: module "bluefog.torch’’has no attribute 'DistributedPushSumOntimizer‘

yangxuanfei avatar Jun 15 '22 13:06 yangxuanfei

Hi yangxuanfei,

It is might because of the typo? DistributedPushSumOntimizer, note you wrote Ontimizer instead of Optimizer?

The definition of this in here: https://github.com/Bluefog-Lib/bluefog/blob/master/bluefog/torch/optimizers.py#L1180

If it is note the typo, could check the versions?

Thanks

BichengYing avatar Jun 17 '22 00:06 BichengYing

Thanks for the reply, but I checked and it wasn't a typo. Are you referring to the version problem of bluefog? We are using version 0.3.0, is this a problem?

yangxuanfei avatar Jun 17 '22 06:06 yangxuanfei

Oh, we didn't expose this optimizer. See the source code here https://github.com/Bluefog-Lib/bluefog/blob/master/bluefog/torch/init.py#L21 Because we are not satisfied the current implementation and the performance doesn't seem very good.

However, if you really want to use it, you can try this

from bluefog.torch.optimizers import DistributedPushSumOptimizer

I will encourage you to improve the original source code if you have any idea. Code is here https://github.com/Bluefog-Lib/bluefog/blob/8f74265c50c31e3e62aa21bed74fdc98c109542e/bluefog/torch/optimizers.py#L1026

BichengYing avatar Jun 18 '22 07:06 BichengYing