nvflare.app_common.executors.exec_task_fn_wrapper module

class ExecTaskFuncWrapper(task_fn_path: str, task_main_args: str | None = None, task_fn_args: Dict | None = None)[source]

Bases: object

Wrapper for function given function path and args

Parameters:
  • task_fn_path (str) – function path (ex: train.main, custom/train.main, custom.train.main).

  • task_fn_args (Dict, optional) – function arguments to pass in.

check_fn_inputs(task_fn_path, require_args: bool, required_args_size: int, args_default_size: int)[source]

Check if the provided task_fn_args are compatible with the task_fn.

get_sys_argv()[source]
run()[source]

Call the task_fn with any required arguments.