Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
YuanTingHsieh committed Nov 7, 2023
1 parent 75ffcae commit 5ae7bb6
Show file tree
Hide file tree
Showing 23 changed files with 68 additions and 25 deletions.
5 changes: 4 additions & 1 deletion job_templates/cyclic_cc_pt/config_fed_client.conf
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,12 @@
path = "nvflare.fuel.utils.pipe.file_pipe.FilePipe"

args {
# Mode of the endpoint. A pipe has two endpoints.
# An endpoint can be either the one that initiates communication or the one listening.
# PASSIVE is the one listening.
mode = "PASSIVE"

# root_path: is the directory location of the parameters exchange.
# root_path: is the directory location of the data exchange.
# If empty string, it will be set to the app_dir of the running job.
# You can also set it to an absolute path in your system.
root_path = ""
Expand Down
2 changes: 1 addition & 1 deletion job_templates/cyclic_cc_pt/info.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
executor_type = "launcher_executor"
contributor = "NVIDIA"
init_publish_date = "2023-10-13"
last_updated_date = "2023-11-06" # yyyy-mm-dd
last_updated_date = "2023-11-07" # yyyy-mm-dd
5 changes: 4 additions & 1 deletion job_templates/cyclic_pt/config_fed_client.conf
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,12 @@
path = "nvflare.fuel.utils.pipe.file_pipe.FilePipe"

args {
# Mode of the endpoint. A pipe has two endpoints.
# An endpoint can be either the one that initiates communication or the one listening.
# PASSIVE is the one listening.
mode = "PASSIVE"

# root_path: is the directory location of the parameters exchange.
# root_path: is the directory location of the data exchange.
# If empty string, it will be set to the app_dir of the running job.
# You can also set it to an absolute path in your system.
root_path = ""
Expand Down
2 changes: 1 addition & 1 deletion job_templates/cyclic_pt/info.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
executor_type = "launcher_executor"
contributor = "NVIDIA"
init_publish_date = "2023-10-13"
last_updated_date = "2023-11-06" # yyyy-mm-dd
last_updated_date = "2023-11-07" # yyyy-mm-dd
5 changes: 4 additions & 1 deletion job_templates/sag_nemo/app_1/config_fed_client.conf
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,12 @@
path = "nvflare.fuel.utils.pipe.file_pipe.FilePipe"

args {
# Mode of the endpoint. A pipe has two endpoints.
# An endpoint can be either the one that initiates communication or the one listening.
# PASSIVE is the one listening.
mode = "PASSIVE"

# root_path: is the directory location of the parameters exchange.
# root_path: is the directory location of the data exchange.
# If empty string, it will be set to the app_dir of the running job.
# You can also set it to an absolute path in your system.
root_path = ""
Expand Down
5 changes: 4 additions & 1 deletion job_templates/sag_nemo/app_2/config_fed_client.conf
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,12 @@
path = "nvflare.fuel.utils.pipe.file_pipe.FilePipe"

args {
# Mode of the endpoint. A pipe has two endpoints.
# An endpoint can be either the one that initiates communication or the one listening.
# PASSIVE is the one listening.
mode = "PASSIVE"

# root_path: is the directory location of the parameters exchange.
# root_path: is the directory location of the data exchange.
# If empty string, it will be set to the app_dir of the running job.
# You can also set it to an absolute path in your system.
root_path = ""
Expand Down
5 changes: 4 additions & 1 deletion job_templates/sag_nemo/app_3/config_fed_client.conf
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,12 @@
path = "nvflare.fuel.utils.pipe.file_pipe.FilePipe"

args {
# Mode of the endpoint. A pipe has two endpoints.
# An endpoint can be either the one that initiates communication or the one listening.
# PASSIVE is the one listening.
mode = "PASSIVE"

# root_path: is the directory location of the parameters exchange.
# root_path: is the directory location of the data exchange.
# If empty string, it will be set to the app_dir of the running job.
# You can also set it to an absolute path in your system.
root_path = ""
Expand Down
2 changes: 1 addition & 1 deletion job_templates/sag_nemo/info.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
executor_type = "launcher_executor"
contributor = "NVIDIA"
init_publish_date = "2023-10-24"
last_updated_date = "2023-11-06" # yyyy-mm-dd
last_updated_date = "2023-11-07" # yyyy-mm-dd
5 changes: 4 additions & 1 deletion job_templates/sag_pt/config_fed_client.conf
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,12 @@
path = "nvflare.fuel.utils.pipe.file_pipe.FilePipe"

args {
# Mode of the endpoint. A pipe has two endpoints.
# An endpoint can be either the one that initiates communication or the one listening.
# PASSIVE is the one listening.
mode = "PASSIVE"

# root_path: is the directory location of the parameters exchange.
# root_path: is the directory location of the data exchange.
# If empty string, it will be set to the app_dir of the running job.
# You can also set it to an absolute path in your system.
root_path = ""
Expand Down
2 changes: 1 addition & 1 deletion job_templates/sag_pt/info.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
executor_type = "launcher_executor"
contributor = "NVIDIA"
init_publish_date = "2023-09-11"
last_updated_date = "2023-11-06" # yyyy-mm-dd
last_updated_date = "2023-11-07" # yyyy-mm-dd
5 changes: 4 additions & 1 deletion job_templates/sag_pt_deploy_map/app_1/config_fed_client.conf
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,12 @@
path = "nvflare.fuel.utils.pipe.file_pipe.FilePipe"

args {
# Mode of the endpoint. A pipe has two endpoints.
# An endpoint can be either the one that initiates communication or the one listening.
# PASSIVE is the one listening.
mode = "PASSIVE"

# root_path: is the directory location of the parameters exchange.
# root_path: is the directory location of the data exchange.
# If empty string, it will be set to the app_dir of the running job.
# You can also set it to an absolute path in your system.
root_path = ""
Expand Down
5 changes: 4 additions & 1 deletion job_templates/sag_pt_deploy_map/app_2/config_fed_client.conf
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,12 @@
path = "nvflare.fuel.utils.pipe.file_pipe.FilePipe"

args {
# Mode of the endpoint. A pipe has two endpoints.
# An endpoint can be either the one that initiates communication or the one listening.
# PASSIVE is the one listening.
mode = "PASSIVE"

# root_path: is the directory location of the parameters exchange.
# root_path: is the directory location of the data exchange.
# If empty string, it will be set to the app_dir of the running job.
# You can also set it to an absolute path in your system.
root_path = ""
Expand Down
2 changes: 1 addition & 1 deletion job_templates/sag_pt_deploy_map/info.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
executor_type = "launcher_executor"
contributor = "NVIDIA"
init_publish_date = "2023-09-11"
last_updated_date = "2023-11-02" # yyyy-mm-dd
last_updated_date = "2023-11-07" # yyyy-mm-dd
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,12 @@
path = "nvflare.fuel.utils.pipe.file_pipe.FilePipe"

args {
# Mode of the endpoint. A pipe has two endpoints.
# An endpoint can be either the one that initiates communication or the one listening.
# PASSIVE is the one listening.
mode = "PASSIVE"

# root_path: is the directory location of the parameters exchange.
# root_path: is the directory location of the data exchange.
# If empty string, it will be set to the app_dir of the running job.
# You can also set it to an absolute path in your system.
root_path = ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,12 @@
path = "nvflare.fuel.utils.pipe.file_pipe.FilePipe"

args {
# Mode of the endpoint. A pipe has two endpoints.
# An endpoint can be either the one that initiates communication or the one listening.
# PASSIVE is the one listening.
mode = "PASSIVE"

# root_path: is the directory location of the parameters exchange.
# root_path: is the directory location of the data exchange.
# If empty string, it will be set to the app_dir of the running job.
# You can also set it to an absolute path in your system.
root_path = ""
Expand Down
2 changes: 1 addition & 1 deletion job_templates/sag_pt_gnn_supervised/info.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
executor_type = "launcher_executor"
contributor = "NVIDIA"
init_publish_date = "2023-10-31"
last_updated_date = "2023-11-06" # yyyy-mm-dd
last_updated_date = "2023-11-07" # yyyy-mm-dd
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,12 @@
path = "nvflare.fuel.utils.pipe.file_pipe.FilePipe"

args {
# Mode of the endpoint. A pipe has two endpoints.
# An endpoint can be either the one that initiates communication or the one listening.
# PASSIVE is the one listening.
mode = "PASSIVE"

# root_path: is the directory location of the parameters exchange.
# root_path: is the directory location of the data exchange.
# If empty string, it will be set to the app_dir of the running job.
# You can also set it to an absolute path in your system.
root_path = ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,12 @@
path = "nvflare.fuel.utils.pipe.file_pipe.FilePipe"

args {
# Mode of the endpoint. A pipe has two endpoints.
# An endpoint can be either the one that initiates communication or the one listening.
# PASSIVE is the one listening.
mode = "PASSIVE"

# root_path: is the directory location of the parameters exchange.
# root_path: is the directory location of the data exchange.
# If empty string, it will be set to the app_dir of the running job.
# You can also set it to an absolute path in your system.
root_path = ""
Expand Down
2 changes: 1 addition & 1 deletion job_templates/sag_pt_gnn_unsupervised/info.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
executor_type = "launcher_executor"
contributor = "NVIDIA"
init_publish_date = "2023-10-31"
last_updated_date = "2023-11-06" # yyyy-mm-dd
last_updated_date = "2023-11-07" # yyyy-mm-dd
7 changes: 5 additions & 2 deletions job_templates/sag_tf/config_fed_client.conf
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ components = [
{
id = "from_nvflare"
# NVFlare server side expects a flattened dict, where each key maps to one array
# while Keras layer.get_weights() returns a hierachical dict, where each key might map to a list of arrays
# while Keras layer.get_weights() returns a hierarchical dict, where each key might map to a list of arrays
# for example: {"layer0": [weights_array, bias_array]}, so we need to do the conversion
# please refer to nvflare.app_opt.tf.utils for detailed implementation
# convert flattened numpy dict back to a dict of {layer_name: layer.get_weights()}
Expand All @@ -80,9 +80,12 @@ components = [
path = "nvflare.fuel.utils.pipe.file_pipe.FilePipe"

args {
# Mode of the endpoint. A pipe has two endpoints.
# An endpoint can be either the one that initiates communication or the one listening.
# PASSIVE is the one listening.
mode = "PASSIVE"

# root_path: is the directory location of the parameters exchange.
# root_path: is the directory location of the data exchange.
# If empty string, it will be set to the app_dir of the running job.
# You can also set it to an absolute path in your system.
root_path = ""
Expand Down
2 changes: 1 addition & 1 deletion job_templates/sag_tf/info.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
executor_type = "launcher_executor"
contributor = "NVIDIA"
init_publish_date = "2023-09-11"
last_updated_date = "2023-11-06" # yyyy-mm-dd
last_updated_date = "2023-11-07" # yyyy-mm-dd
4 changes: 2 additions & 2 deletions job_templates/swarm_cse_pt/config_fed_client.conf
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ executors = [
# All tasks prefixed with swarm_ are routed to SwarmClientController
tasks = ["swarm_*"]
executor {
# client-side controller for training and logic and aggregration management
# client-side controller for training and logic and aggregation management
path = "nvflare.app_common.ccwf.SwarmClientController"
args {
# train task must be implemented by Executor
learn_task_name = "train"
# how long to wait for current learn task before timing out the gathering
learn_task_timeout = 600
# ids must map to corresponding componenets
# ids must map to corresponding components
persistor_id = "persistor"
aggregator_id = "aggregator"
shareable_generator_id = "shareable_generator"
Expand Down
6 changes: 5 additions & 1 deletion nvflare/fuel/utils/pipe/file_pipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ def __init__(self, mode: Mode, root_path: str, file_check_interval=0.1):
"""Implementation of communication through the file system.
Args:
root_path: root path
mode (Mode): Mode of the endpoint. A pipe has two endpoints.
An endpoint can be either the one that initiates communication or the one listening.
root_path (str): root path for this file pipe, folders and files will be created under this root_path
for communication.
file_check_interval (float): how often should to check the file exists.
"""
super().__init__(mode=mode)
check_positive_number("file_check_interval", file_check_interval)
Expand Down

0 comments on commit 5ae7bb6

Please sign in to comment.