Skip to content

Commit

Permalink
Sprawling .pyi updates related to pybind11 PRs #4831, #4833.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 571968911
Change-Id: Ibca7c1d4907f7e0bb1e6c591c294c07ebaf2a2c7
  • Loading branch information
Ralf W. Grosse-Kunstleve authored and copybara-github committed Oct 9, 2023
1 parent 18e73bc commit 233a590
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions saxml/client/python/sax.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Callable, Dict, List, Tuple
from typing import Any, Callable, List

from typing import overload

Expand All @@ -11,9 +11,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 @@ -24,11 +24,11 @@ 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 Embed(self, text: str, options: ModelOptions = ...) -> list[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 Score(self, prefix: str, suffix: List[str], options: ModelOptions = ...) -> 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:
@overload
Expand All @@ -52,14 +52,14 @@ 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: ...
def GetTimeout(self) -> float: ...
def SetExtraInput(self, arg0: str, arg1: float) -> None: ...
def SetExtraInputString(self, arg0: str, arg1: str) -> None: ...
def SetExtraInputTensor(self, arg0: str, arg1: List[float]) -> None: ...
def SetExtraInputTensor(self, arg0: str, arg1: list[float]) -> None: ...
def SetTimeout(self, arg0: float) -> None: ...
def ToDebugString(self) -> str: ...
def __copy__(self) -> ModelOptions: ...
Expand Down Expand Up @@ -88,21 +88,21 @@ 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] = ..., options: ModelOptions = ...) -> List[Tuple[float,float,float,float,bytes,float]]: ...
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 VideoToText(self, image_frames: List[str], text: str = ..., options: ModelOptions = ...) -> List[Tuple[bytes,float]]: ...
def Classify(self, image_bytes: str, options: ModelOptions = ...) -> list[tuple[str,float]]: ...
def Detect(self, image_bytes: str, text: list[str] = ..., options: ModelOptions = ...) -> list[tuple[float,float,float,float,bytes,float]]: ...
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 VideoToText(self, image_frames: list[str], text: str = ..., options: ModelOptions = ...) -> list[tuple[bytes,float]]: ...

def List(id: str, options: AdminOptions = ...) -> Tuple[str,str,int]: ...
def ListAll(id: str, options: AdminOptions = ...) -> List[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, options: AdminOptions = ...) -> None: ...
def StartDebugPort(arg0: int) -> None: ...
def Stats(id: str, options: AdminOptions = ...) -> List[ModelServerTypeStat]: ...
def Stats(id: str, options: AdminOptions = ...) -> list[ModelServerTypeStat]: ...
def Unpublish(id: str, options: AdminOptions = ...) -> None: ...
def Update(id: str, model_path: str, checkpoint_path: str, num_replicas: int, options: AdminOptions = ...) -> None: ...
def WaitForReady(id: str, num_replicas: int, options: AdminOptions = ...) -> None: ...

0 comments on commit 233a590

Please sign in to comment.