nvflare.app_common.executors.task_script_runner module

class TaskScriptRunner(site_name: str, script_path: str, script_args: str | None = None, redirect_print_to_log=True)[source]

Bases: object

Wrapper for function given function path and args

Parameters:
  • site_name (str) – site name

  • script_path (str) – script file name, such as train.py

  • script_args (str, Optional) – script arguments to pass in.

get_script_full_path(site_name, script_path) str[source]
get_sys_argv()[source]
logger = <Logger nvflare.app_common.executors.task_script_runner (WARNING)>
run()[source]

Call the task_fn with any required arguments.

log_print(*args, logger=<Logger nvflare.app_common.executors.task_script_runner (WARNING)>, **kwargs)[source]