Registering the parties

Since parties call out to the aggregator, the Federated Learning experiment itself does not need to access remote server information. Consequently, each party must set up a configuration file that can connect it to the Federated Learning system.

Cloud open beta

This is a Cloud open preview and is not supported for use in production environments.

Unsigned certification flags

If you work with Federated Learning on a server that does not use a signed certificate, when you create the party in Python code, these flags need to be passed:

p = Party( config_dict = party_config, token = auth_token, self_signed_cert=True )

When you call the party from the command line, the -s flag needs to be passed, as follows:

python -m ibmfl.party.party -s <config file> <Bearer token>

Configuring the parties’ yml file

Note: Each party needs to implement the following yml file on their remote server. This is a step for each party involved and not the admin.

Each party must create or modify a party*.yml for each remote server to be used in model training, the * denoting party0.yml, party1.yml and so on.

Here is an example of how to configure the file:

  aggregator:
    ip: [CPD_HOSTNAME]/ml/v4/trainings/[TRAINING_ID]
  connection:
    info:
      id: [REMOTE_TRAINING_SYSTEM_ID]
  data:
    info:
      npz_file: /Users/demo/federated-learning/examples/data_party1.npz
    name: CustomDataHandler
    path: /Users/demo/federated-learning/examples/custom_data_handler.py
  local_training:
    name: LocalTrainingHandler
    path: ibmfl.party.training.local_training_handler
  protocol_handler:
    name: PartyProtocolHandler
    path: ibmfl.party.party_protocol_handler

The user needs to specify:

  • aggregator: ip: IP address of the cluster that runs the Federated Learning experiment.
  • connection: info: id: ID of the user in the Remote Training System used in the Federated Learning experiment. It is gotten after you create a Remote Training System.
  • local_training: path: Path to the party’s data file used for training. It is gotten from the Federated Python SDK package. See Preparing the parties’ configuration.
  • data: name / path: Name and path to the data handler file.
  • local_training: name / path: Name and path to the training handler file. This is gotten from the Python SDK package.

Note: As Remote Training Systems are meant to run in different locations, you may encounter unexpected behaviour when running multiple parties that are based on the same system.

Run the training system on remote servers

The Federated Learning experiment must be ready to receive calls from the remote systems at this step. Ensure that all the parties in the selected Remote Training Systems run their local model training on their remote system.

Have each party run the yml file with this command:

python -m ibmfl.party.party <config file> <Bearer token>

Next steps

Return to the Federated Learning GUI to run the experiment.