Skip to content

Commit

Permalink
Fix decorator issue (#2542)
Browse files Browse the repository at this point in the history
  • Loading branch information
YuanTingHsieh authored May 1, 2024
1 parent 6bd0bf5 commit d4b6661
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nvflare/client/decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ def _replace_func_args(func, kwargs, model: FLModel):


class ObjectHolder:
pass
def __init__(self):
self.metrics = None


object_holder = ObjectHolder()
Expand Down Expand Up @@ -71,7 +72,7 @@ def wrapper(*args, **kwargs):

if object_holder.metrics is not None:
return_value.metrics = object_holder.metrics
object_holder = None
object_holder = ObjectHolder()

send(model=return_value)

Expand Down

0 comments on commit d4b6661

Please sign in to comment.