From e543153cbe729f588ea817b51332c384bba37c6d Mon Sep 17 00:00:00 2001 From: YuanTingHsieh Date: Mon, 22 Jan 2024 15:39:29 -0800 Subject: [PATCH] temp commit --- nvflare/app_common/abstract/params_converter.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nvflare/app_common/abstract/params_converter.py b/nvflare/app_common/abstract/params_converter.py index 6ec2e0e546..4cf2d52663 100644 --- a/nvflare/app_common/abstract/params_converter.py +++ b/nvflare/app_common/abstract/params_converter.py @@ -15,17 +15,19 @@ from abc import ABC, abstractmethod from typing import Any, List +from nvflare.apis.fl_constant import FLContextKey from nvflare.apis.dxo import from_shareable -from nvflare.apis.filter import Filter from nvflare.apis.fl_context import FLContext from nvflare.apis.shareable import Shareable -class ParamsConverter(Filter, ABC): +class ParamsConverter(ABC): def __init__(self, supported_tasks: List[str] = None): self.supported_tasks = supported_tasks def process(self, task_name: str, shareable: Shareable, fl_ctx: FLContext) -> Shareable: + task_name = fl_ctx.get_prop(FLContextKey.TASK_NAME) + print("\n\n {task_name=} in ParamsConverter \n\n") if not self.supported_tasks or task_name in self.supported_tasks: dxo = from_shareable(shareable) dxo.data = self.convert(dxo.data, fl_ctx)