File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
nvflare/app_common/workflows Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 3838class BaseModelController (Controller , FLComponentWrapper , ABC ):
3939 def __init__ (
4040 self ,
41- persistor_id = "persistor" ,
41+ persistor_id : str = AppConstants . DEFAULT_PERSISTOR_ID ,
4242 ignore_result_error : bool = False ,
4343 allow_empty_global_weights : bool = False ,
4444 task_check_period : float = 0.5 ,
4545 ):
4646 """FLModel based controller.
4747
4848 Args:
49- persistor_id (str, optional): ID of the persistor component. Defaults to "persistor".
49+ persistor_id (str, optional): ID of the persistor component. Defaults to AppConstants.DEFAULT_PERSISTOR_ID ( "persistor") .
5050 ignore_result_error (bool, optional): whether this controller can proceed if client result has errors.
5151 Defaults to False.
5252 allow_empty_global_weights (bool, optional): whether to allow empty global weights. Some pipelines can have
Original file line number Diff line number Diff line change 1616from typing import Callable , List , Union
1717
1818from nvflare .app_common .abstract .fl_model import FLModel
19+ from nvflare .app_common .app_constant import AppConstants
1920from nvflare .app_common .workflows .base_model_controller import BaseModelController
2021
2122
2223class ModelController (BaseModelController , ABC ):
2324 def __init__ (
2425 self ,
2526 * args ,
26- persistor_id : str = "persistor" ,
27+ persistor_id : str = AppConstants . DEFAULT_PERSISTOR_ID ,
2728 ** kwargs ,
2829 ):
2930 """Model Controller API for FLModel-based Controller.
3031
3132 Args:
32- persistor_id (str, optional): ID of the persistor component. Defaults to "" .
33+ persistor_id (str, optional): ID of the persistor component. Defaults to AppConstants.DEFAULT_PERSISTOR_ID ("persistor") .
3334 """
3435 super ().__init__ (* args , persistor_id , ** kwargs )
3536
You can’t perform that action at this time.
0 commit comments