Skip to content

Commit

Permalink
Fix Petals coverage [skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
AjayP13 committed Dec 25, 2023
1 parent fad9efe commit 138fc29
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/llms/petals.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
_ServerInferenceSession_step: None | Callable = None


def _is_batch_size_exception_func(e: BaseException) -> bool: # pragma: no cover
def _is_batch_size_exception_func(e: BaseException) -> bool:
from hivemind.p2p.p2p_daemon_bindings.utils import P2PHandlerError

return (
Expand Down Expand Up @@ -66,7 +66,7 @@ def _patched_on_request_failure(


@cache
def _monkey_patch_ServerInferenceSession_step(): # pragma: no cover
def _monkey_patch_ServerInferenceSession_step():
from hivemind.p2p.p2p_daemon_bindings.utils import P2PHandlerError # noqa: F401

try:
Expand All @@ -80,7 +80,7 @@ def _monkey_patch_ServerInferenceSession_step(): # pragma: no cover
_ServerInferenceSession.step = _catch_memory_error__ServerInferenceSession_step


class Petals(HFTransformers): # pragma: no cover
class Petals(HFTransformers):
def __init__(
self,
model_name: str,
Expand Down

0 comments on commit 138fc29

Please sign in to comment.