alibaba / FederatedScope

An easy-to-use federated learning platform

Home Page:https://www.federatedscope.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to run demo in hyperparameter optimization

xuefeng-xu opened this issue · comments

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):

  • OS: Mac
  • Version 14.2.1

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

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