nvflare.app_common.widgets.validation_json_generator module

class ValidationJsonGenerator(results_dir='cross_site_val', json_file_name='cross_val_results.json')[source]

Bases: Widget

Catches VALIDATION_RESULT_RECEIVED event and generates a results.json containing accuracy of each validated model.

  • results_dir (str, optional) – Name of the results directory. Defaults to cross_site_val

  • json_file_name (str, optional) – Name of the json file. Defaults to cross_val_results.json

handle_event(event_type: str, fl_ctx: FLContext)[source]

Handles events.

  • event_type (str) – event type fired by workflow.

  • fl_ctx (FLContext) – FLContext information.