From 9bb5879fb1885f90990a97b52dc9ec214776c1b0 Mon Sep 17 00:00:00 2001 From: Yuhong Wen Date: Thu, 29 Aug 2024 23:21:52 -0400 Subject: [PATCH] Fix for last index of module path (#2881) * Update the generated component classes table. * Added back the MLflowReceiver. * Change to match the last module_path from source_file. --------- Co-authored-by: Chester Chen <512707+chesterxgchen@users.noreply.github.com> --- nvflare/job_config/fed_job_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvflare/job_config/fed_job_config.py b/nvflare/job_config/fed_job_config.py index 318f3fbfde..480f613788 100644 --- a/nvflare/job_config/fed_job_config.py +++ b/nvflare/job_config/fed_job_config.py @@ -203,7 +203,7 @@ def _get_custom_file(self, custom_dir, module, source_file): if package not in FL_PACKAGES and module not in self.custom_modules: module_path = module.replace(".", os.sep) if module_path in source_file: - index = source_file.index(module_path) + index = source_file.rindex(module_path) dest = source_file[index:] self.custom_modules.append(module)