Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'MetaClient' object has no attribute 'use' #2

Open
Leeway2ZC opened this issue Nov 6, 2024 · 2 comments
Open

AttributeError: 'MetaClient' object has no attribute 'use' #2

Leeway2ZC opened this issue Nov 6, 2024 · 2 comments

Comments

@Leeway2ZC
Copy link

在client.py中实例化client = MetaClient() 时,MetaClient继承自core\client.py的Client()类,但是在Client类的初始化函数中用到了USE_SIM_SYSHET属性,而这个属性似乎没有定义过?需要在FedMeta\config.yaml中自己定义一个吗?

FedMeta\client.py:
line 135
if name == 'main':
client = MetaClient()
client.run()
line 21
class MetaClient(Client):

Flamingo\core\client.py:
line 104、37、67
class Client():
def init(self):
....
args = get_args()
....
self.args = args
for key, value in vars(args).items():
# if value is not None:
setattr(self, key, value)
....
if self.USE_SIM_SYSHET:

@Leeway2ZC
Copy link
Author

Leeway2ZC commented Nov 6, 2024

在FedMeta\config.yaml中加上USE_SIM_SYSHET: False和USE_TENSORBOARD: True之后程序能运行,但是似乎对内存要求很高,请问内存要求是怎么样的呢

@isaacveg
Copy link
Owner

isaacveg commented Nov 7, 2024

USE_SIM_SYSHET的用处是使用模拟的系统异构,每次会随机产生发送数据时间和训练花费时间。可参考example中提供了该属性的config。

关于内存,由于这个项目使用的是MPI,所有客户端都会加载数据集和模型到显存或者内存中,本意是在服务器级别的设备上最大限度模拟实际情况以及后续移植到边缘设备平台上,因此内存占用高是正常的。如果需要低内存需求的FL框架,可以考虑使用少量客户端,或者修改client的dataset和model方法,在未选中时将数据释放。或者尝试其他项目https://github.com/TsingZ0/PFLlib

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants