forked from NVIDIA/NVFlare
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig_fed_client.conf
executable file
·87 lines (69 loc) · 3.01 KB
/
config_fed_client.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
{
# version of the configuration
format_version = 2
# This is the application script which will be invoked. Client can replace this script with user's own training script.
app_script = "sgd_fl.py"
# Additional arguments needed by the training code. For example, in lightning, these can be --trainer.batch_size=xxx.
app_config = ""
# Client Computing Executors.
executors = [
{
# tasks the executors are defined to handle
tasks = ["train"]
# This particular executor
executor {
# Executor name : ClientAPILauncherExecutor
# This is an executor for Client API. The underline data exchange is using Pipe.
path = "nvflare.app_opt.pt.client_api_launcher_executor.ClientAPILauncherExecutor"
args {
# launcher_id is used to locate the Launcher object in "components"
launcher_id = "launcher"
# pipe_id is used to locate the Pipe object in "components"
pipe_id = "pipe"
# Timeout in seconds for waiting for a heartbeat from the training script. Defaults to 30 seconds.
# Please refer to the class docstring for all available arguments
heartbeat_timeout = 60
# format of the exchange parameters
params_exchange_format = "raw"
# if the transfer_type is FULL, then it will be sent directly
# if the transfer_type is DIFF, then we will calculate the
# difference VS received parameters and send the difference
params_transfer_type = "FULL"
# if train_with_evaluation is true, the executor will expect
# the custom code need to send back both the trained parameters and the evaluation metric
# otherwise only trained parameters are expected
train_with_evaluation = true
}
}
}
],
# this defined an array of task data filters. If provided, it will control the data from server controller to client executor
task_data_filters = []
# this defined an array of task result filters. If provided, it will control the result from client executor to server controller
task_result_filters = []
components = [
{
# component id is "launcher"
id = "launcher"
# the class path of this component
path = "nvflare.app_common.launchers.subprocess_launcher.SubprocessLauncher"
args {
# the launcher will invoke the script
script = "python3 -u custom/{app_script} {app_config} "
# if launch_once is true, the SubprocessLauncher will launch once for the whole job
# if launch_once is false, the SubprocessLauncher will launch a process for each task it receives from server
launch_once = true
}
},
{
id = "pipe"
path = "nvflare.fuel.utils.pipe.file_pipe.FilePipe"
args {
mode = "PASSIVE"
# root_path: is the directory location of the parameters exchange.
# You can also set it to an absolute path in your system.
root_path = "{WORKSPACE}/{JOB_ID}/{SITE_NAME}"
}
}
]
}