checkpointing.identifier.func_call.base
1from abc import ABC, abstractmethod 2from checkpointing.identifier.func_call.context import FuncCallContext 3from checkpointing._typing import ContextId 4 5 6class FuncCallIdentifierBase(ABC): 7 """ 8 Base class for function call identifiers. 9 """ 10 11 @abstractmethod 12 def identify(self, context: FuncCallContext) -> ContextId: 13 """ 14 Args: 15 context: context of a function call 16 17 Returns: 18 a unique identifier of this function call, name it `ContextId`. 19 20 Any change in the `context` that could result in a different return value 21 of a function call should result in a different returned `ContextId`. 22 """ 23 pass
class
FuncCallIdentifierBase(abc.ABC):
7class FuncCallIdentifierBase(ABC): 8 """ 9 Base class for function call identifiers. 10 """ 11 12 @abstractmethod 13 def identify(self, context: FuncCallContext) -> ContextId: 14 """ 15 Args: 16 context: context of a function call 17 18 Returns: 19 a unique identifier of this function call, name it `ContextId`. 20 21 Any change in the `context` that could result in a different return value 22 of a function call should result in a different returned `ContextId`. 23 """ 24 pass
Base class for function call identifiers.
@abstractmethod
def
identify( self, context: checkpointing.identifier.func_call.context.FuncCallContext) -> ~ContextId:
12 @abstractmethod 13 def identify(self, context: FuncCallContext) -> ContextId: 14 """ 15 Args: 16 context: context of a function call 17 18 Returns: 19 a unique identifier of this function call, name it `ContextId`. 20 21 Any change in the `context` that could result in a different return value 22 of a function call should result in a different returned `ContextId`. 23 """ 24 pass
Args
- context: context of a function call
Returns
a unique identifier of this function call, name it
ContextId.Any change in the
contextthat could result in a different return value of a function call should result in a different returnedContextId.