openfl.native.native.init

Contents

openfl.native.native.init#

openfl.native.native.init(workspace_template='default', log_level='INFO', log_file=None, agg_fqdn=None, col_names=None)[source]#

Initialize the openfl package.

It performs the following tasks:

1. Creates a workspace in ~/.local/workspace (Equivalent to fx workspace create –prefix ~/.local/workspace –template $workspace_template) 2. Setup certificate authority (equivalent to `fx workspace certify) 3. Setup aggregator PKI (equivalent to fx aggregator generate-cert-request followed by fx aggregator certify) 4. Setup list of collaborators (col_names) and their PKI. (Equivalent to running fx collaborator generate-cert-request followed by fx collaborator certify for each of the collaborators in col_names) 5. Setup logging

Parameters:
  • workspace_template (str) – The template that should be used as the basis for the experiment. Defaults to ‘default’. Other options include are any of the template names [keras_cnn_mnist, tf_2dunet, tf_cnn_histology, mtorch_cnn_histology, torch_cnn_mnist].

  • log_level (str) – Log level for logging. METRIC level is available. Defaults to ‘INFO’.

  • log_file (str) – Name of the file in which the log will be duplicated. If None, logs are not saved to a file. Defaults to None.

  • agg_fqdn (str) – The local node’s fully qualified domain name (if it can’t be resolved automatically). Defaults to None.

  • col_names (list[str]) – The names of the collaborators that will be created. These collaborators will be set up to participate in the experiment, but are not required to. Defaults to None.

Returns:

None