alibaba / FederatedScope

An easy-to-use federated learning platform
https://www.federatedscope.io
Apache License 2.0
1.26k stars 206 forks source link

Unable to run demo in hyperparameter optimization #752

Open xuefeng-xu opened 7 months ago

xuefeng-xu commented 7 months ago

Describe the bug HPO demo https://federatedscope.io/docs/use-hpo/

To Reproduce Steps to reproduce the behavior: https://federatedscope.io/docs/use-hpo/#an-hands-on-exercise

python federatedscope/hpo.py --cfg scripts/example_configs/toy_rs.yaml

Expected behavior https://federatedscope.io/docs/use-hpo/#an-hands-on-exercise

Screenshots

2024-01-25 10:55:55,376 (cfg_fl_setting:221)WARNING: We found the number of gpu is insufficient, thus cfg.federate.process_num=0
Traceback (most recent call last):
  File "/Users/xxf/code/FederatedScope/federatedscope/hpo.py", line 34, in <module>
    update_logger(init_cfg, clear_before_add=True)
  File "/Users/xxf/code/FederatedScope/federatedscope/core/auxiliaries/logging.py", line 125, in update_logger
    f" {socket.gethostbyname(socket.gethostname())}")
socket.gaierror: [Errno 8] nodename nor servname provided, or not known

Desktop (please complete the following information):

rayrayraykk commented 7 months ago

It looks like this is because your logging module not compatible.

xuefeng-xu commented 7 months ago

Thanks, I was able to run the FEMNIST demo, but fail in the HPO demo. Could you provide more details about how to resolve the logging module issue?

python federatedscope/main.py --cfg scripts/example_configs/femnist.yaml