Skip to content

Commit

Permalink
Regenerate stubs with Mypy 1.13.0
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 707053489
Change-Id: I19e5943e01d1056c7fd665668c179ac9d65ac083
  • Loading branch information
AleksMat authored and copybara-github committed Dec 17, 2024
1 parent b4b4ccb commit 6e3fcab
Showing 1 changed file with 20 additions and 22 deletions.
42 changes: 20 additions & 22 deletions saxml/client/python/sax.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
from typing import Any, Callable, List, Optional, Union

from typing import overload
from typing import Callable, overload

class AdminOptions:
timeout: float
Expand All @@ -11,9 +9,9 @@ class AdminOptions:
class AudioModel:
def __init__(self, *args, **kwargs) -> None: ...
@overload
def Recognize(self, id: str, options: ModelOptions = ...) -> list[tuple[str,float]]: ...
def Recognize(self, id: str, options: ModelOptions = ...) -> list[tuple[str, float]]: ...
@overload
def Recognize(self, audio_bytes: str, options: ModelOptions = ...) -> list[tuple[str,float]]: ...
def Recognize(self, audio_bytes: str, options: ModelOptions = ...) -> list[tuple[str, float]]: ...

class CustomModel:
def __init__(self, *args, **kwargs) -> None: ...
Expand All @@ -25,9 +23,9 @@ class CustomModel:
class LanguageModel:
def __init__(self, *args, **kwargs) -> None: ...
def Embed(self, text: str, options: ModelOptions = ...) -> list[float]: ...
def Generate(self, text: str, options: ModelOptions = ...) -> list[tuple[str,float]]: ...
def Generate(self, text: str, options: ModelOptions = ...) -> list[tuple[str, float]]: ...
def GenerateStream(self, text: str, callback: Callable, options: ModelOptions = ...) -> None: ...
def Gradient(self, prefix: str, suffix: str, options: ModelOptions = ...) -> tuple[list[float],dict[str,list[float]]]: ...
def Gradient(self, prefix: str, suffix: str, options: ModelOptions = ...) -> tuple[list[float], dict[str, list[float]]]: ...
def Score(self, prefix: str, suffix: list[str], options: ModelOptions = ...) -> list[float]: ...

class Model:
Expand All @@ -52,7 +50,7 @@ class ModelDetail:
@property
def model(self) -> str: ...
@property
def overrides(self) -> dict[str,str]: ...
def overrides(self) -> dict[str, str]: ...

class ModelOptions:
def __init__(self) -> None: ...
Expand All @@ -63,7 +61,7 @@ class ModelOptions:
def SetExtraInputTensor(self, arg0: str, arg1: list[float]) -> None: ...
def SetTimeout(self, arg0: float) -> None: ...
def ToDebugString(self) -> str: ...
def ToProto(self, *args, **kwargs) -> Any: ...
def ToProto(self, *args, **kwargs): ...
def __copy__(self) -> ModelOptions: ...
def __deepcopy__(self, arg0: dict) -> ModelOptions: ...

Expand All @@ -78,9 +76,9 @@ class ModelServerTypeStat:

class MultimodalModel:
def __init__(self, *args, **kwargs) -> None: ...
def Embed(self, *args, **kwargs) -> Any: ...
def Generate(self, *args, **kwargs) -> Any: ...
def Score(self, *args, **kwargs) -> Any: ...
def Embed(self, *args, **kwargs): ...
def Generate(self, *args, **kwargs): ...
def Score(self, *args, **kwargs): ...

class Options:
fail_fast: bool
Expand All @@ -92,22 +90,22 @@ class Options:

class VisionModel:
def __init__(self, *args, **kwargs) -> None: ...
def Classify(self, image_bytes: str, options: ModelOptions = ...) -> list[tuple[str,float]]: ...
def Detect(self, image_bytes: str, text: list[str] = ..., boxes: list[tuple[float,float,float,float]] = ..., options: ModelOptions = ...) -> list[tuple[float,float,float,float,bytes,float,tuple[int,int,bytes]]]: ...
def Classify(self, image_bytes: str, options: ModelOptions = ...) -> list[tuple[str, float]]: ...
def Detect(self, image_bytes: str, text: list[str] = ..., boxes: list[tuple[float, float, float, float]] = ..., options: ModelOptions = ...) -> list[tuple[float, float, float, float, bytes, float, tuple[int, int, bytes]]]: ...
def Embed(self, image: str, options: ModelOptions = ...) -> list[float]: ...
def ImageToImage(self, text: str, options: ModelOptions = ...) -> list[tuple[bytes,float]]: ...
def ImageToText(self, image_bytes: str, text: str = ..., options: ModelOptions = ...) -> list[tuple[bytes,float]]: ...
def TextAndImageToImage(self, text: str, image_bytes: str, options: ModelOptions = ...) -> list[tuple[bytes,float]]: ...
def TextToImage(self, text: str, options: ModelOptions = ...) -> list[tuple[bytes,float]]: ...
def ImageToImage(self, text: str, options: ModelOptions = ...) -> list[tuple[bytes, float]]: ...
def ImageToText(self, image_bytes: str, text: str = ..., options: ModelOptions = ...) -> list[tuple[bytes, float]]: ...
def TextAndImageToImage(self, text: str, image_bytes: str, options: ModelOptions = ...) -> list[tuple[bytes, float]]: ...
def TextToImage(self, text: str, options: ModelOptions = ...) -> list[tuple[bytes, float]]: ...
def TokenToVideo(self, tokens: list[float], options: ModelOptions = ...) -> list[bytes]: ...
def VideoToText(self, image_frames: list[str], text: str = ..., options: ModelOptions = ...) -> list[tuple[bytes,float]]: ...
def VideoToText(self, image_frames: list[str], text: str = ..., options: ModelOptions = ...) -> list[tuple[bytes, float]]: ...
def VideoToToken(self, image_frames: list[str], options: ModelOptions = ...) -> list[float]: ...

def GetACL(cell_or_model_id: str, method_id: str = ..., options: AdminOptions = ...) -> Union[str,dict[str,str]]: ...
def List(id: str, options: AdminOptions = ...) -> tuple[str,str,int]: ...
def GetACL(cell_or_model_id: str, method_id: str = ..., options: AdminOptions = ...) -> str | dict[str, str]: ...
def List(id: str, options: AdminOptions = ...) -> tuple[str, str, int]: ...
def ListAll(id: str, options: AdminOptions = ...) -> list[str]: ...
def ListDetail(id: str, options: AdminOptions = ...) -> ModelDetail: ...
def Publish(id: str, model_path: str, checkpoint_path: str, num_replicas: int, overrides: Optional[dict[str,str]] = ..., options: AdminOptions = ...) -> None: ...
def Publish(id: str, model_path: str, checkpoint_path: str, num_replicas: int, overrides: dict[str, str] | None = ..., options: AdminOptions = ...) -> None: ...
def SetACL(cell_or_model_id: str, acl: str, method_id: str = ..., options: AdminOptions = ...) -> None: ...
def StartDebugPort(arg0: int) -> None: ...
def Stats(id: str, options: AdminOptions = ...) -> list[ModelServerTypeStat]: ...
Expand Down

0 comments on commit 6e3fcab

Please sign in to comment.