nvflare.fuel.utils.class_utils module

class ModuleScanner(base_pkgs: List[str], module_names: List[str], exclude_libs=True)[source]

Bases: object

Scanner to look for and load specified module names.

Parameters
  • base_pkgs – base packages to look for modules in

  • module_names – module names to load

  • exclude_libs – excludes modules containing .libs if True. Defaults to True.

get_module_name(class_name)[source]
get_class(class_path)[source]
get_config_classname(config_dict: dict)[source]
get_instance_method(instance, method_name)[source]
get_object_method(obj, method_name)[source]
instantiate_class(class_path, init_params)[source]

Method for creating an instance for the class.

Parameters
  • class_path – full path of the class

  • init_params – A dictionary that contains the name of the transform and constructor input

  • a (arguments. The transform name will be appended to medical.common.transforms to make) –

  • built. (full name of the transform to be) –