From 29ac6e1be46f0fea0aec6fbf6004d81029d1d42d Mon Sep 17 00:00:00 2001 From: Sean Yang Date: Tue, 14 Jan 2025 12:33:07 -0800 Subject: [PATCH] address comments --- nvflare/private/fed/app/simulator/simulator_runner.py | 5 +++++ nvflare/private/fed/server/job_cmds.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/nvflare/private/fed/app/simulator/simulator_runner.py b/nvflare/private/fed/app/simulator/simulator_runner.py index 4351af8081..3994fd5107 100644 --- a/nvflare/private/fed/app/simulator/simulator_runner.py +++ b/nvflare/private/fed/app/simulator/simulator_runner.py @@ -172,6 +172,9 @@ def setup(self): if self.args.log_config: log_config_file_path = self.args.log_config + if not os.path.isfile(log_config_file_path): + self.logger.error(f"log_config: {log_config_file_path} is not a valid file path") + return False else: log_config_file_path = os.path.join(self.args.workspace, "local", WorkspaceConstants.LOGGING_CONFIG) if not os.path.isfile(log_config_file_path): @@ -691,6 +694,8 @@ def do_one_task(self, client, num_of_threads, gpu, lock, timeout=60.0, task_name client_workspace = os.path.join(self.args.workspace, client.client_name) if self.args.log_config: logging_config = self.args.log_config + if not os.path.isfile(logging_config): + raise ValueError(f"log_config: {logging_config} is not a valid file path") else: logging_config = os.path.join( self.args.workspace, client.client_name, "local", WorkspaceConstants.LOGGING_CONFIG diff --git a/nvflare/private/fed/server/job_cmds.py b/nvflare/private/fed/server/job_cmds.py index 147210fcec..e5290aa370 100644 --- a/nvflare/private/fed/server/job_cmds.py +++ b/nvflare/private/fed/server/job_cmds.py @@ -94,7 +94,7 @@ def get_spec(self): ), CommandSpec( name=AdminCommandNames.CONFIGURE_JOB_LOG, - description="configure logging of a job", + description="configure logging of a running job", usage=f"{AdminCommandNames.CONFIGURE_JOB_LOG} job_id server|client ... config", handler_func=self.configure_job_log, authz_func=self.authorize_configure_job_log,