Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
Signed-off-by: sagewe <wbwmat@gmail.com>
  • Loading branch information
sagewe committed Dec 11, 2023
1 parent bf9e8a6 commit 98a72f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion python/fate/arch/computing/api/_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,10 @@ def _call_stack_strings():
return call_stack_strings


def computing_profile(func):
T = typing.TypeVar("T", bound=typing.Callable)


def computing_profile(func: T) -> T:
@wraps(func)
def _fn(*args, **kwargs):
function_call_stack = _call_stack_strings()
Expand Down
4 changes: 2 additions & 2 deletions python/fate/arch/context/_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def with_namespace(self, namespace: NS):
)

@property
def computing(self):
def computing(self) -> "KVTableContext":
return self._get_computing()

@property
Expand Down Expand Up @@ -259,7 +259,7 @@ def _get_federation(self):
raise RuntimeError(f"federation not set")
return self._federation

def _get_computing(self):
def _get_computing(self) -> "KVTableContext":
if self._computing is None:
raise RuntimeError(f"computing not set")
return self._computing
Expand Down

0 comments on commit 98a72f0

Please sign in to comment.