Federated-Server

class mindspore_federated.FLServerJob(yaml_config, http_server_address, tcp_server_ip='127.0.0.1', checkpoint_dir='./fl_ckpt/', ssl_config=None)[source]

Define Federated Learning cloud-side tasks.

Parameters
  • yaml_config (str) – The yaml file path. More detail see federated_server_yaml.

  • http_server_address (str) – The http server address used for communicating.

  • tcp_server_ip (str) – The tcp server ip used for communicating. Default: “127.0.0.1”.

  • checkpoint_dir (str) – Path of checkpoint. Default: “./fl_ckpt/”.

  • ssl_config (Union(None, SSLConfig)) – Config of ssl. Default: None.

Examples

>>> job = FLServerJob(yaml_config=yaml_config, http_server_address=http_server_address,
...                   tcp_server_ip=tcp_server_ip, checkpoint_dir=checkpoint_dir)
>>> job.run()
run(feature_map=None, callback=None)[source]

Run fl server job.

Parameters
  • feature_map (Union(dict, FeatureMap, str)) – Feature map. Default: None.

  • callback (Union(None, Callback)) – Callback function. Default: None.

class mindspore_federated.FlSchedulerJob(yaml_config, manage_address, ssl_config=None)[source]

Define federated scheduler job.

Parameters
  • yaml_config (str) –

    The yaml file path. More detail see federated_server_yaml.

  • manage_address (str) – The management address.

  • ssl_config (Union(None, SSLConfig)) – Config of ssl. Default: None.

Examples

>>> job = FlSchedulerJob(yaml_config=yaml_config, manage_address=scheduler_manage_address)
>>> job.run()
run()[source]

Run scheduler job.