FederatedScope icon indicating copy to clipboard operation
FederatedScope copied to clipboard

Unable to run demo in hyperparameter optimization

Open xuefeng-xu opened this issue 2 years ago • 2 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

xuefeng-xu avatar Jan 25 '24 03:01 xuefeng-xu

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

rayrayraykk avatar Feb 02 '24 10:02 rayrayraykk

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

xuefeng-xu avatar Feb 02 '24 10:02 xuefeng-xu