Skip to content

Commit

Permalink
Delay in int test
Browse files Browse the repository at this point in the history
  • Loading branch information
hinthornw committed Jun 18, 2024
1 parent 809c2d5 commit 5c70549
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 9 deletions.
6 changes: 4 additions & 2 deletions python/langsmith/_expect.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,10 +413,12 @@ def score(
## Private Methods

@overload
def __call__(self, value: Any, /) -> _Matcher: ...
def __call__(self, value: Any, /) -> _Matcher:
...

@overload
def __call__(self, /, *, client: ls_client.Client) -> _Expect: ...
def __call__(self, /, *, client: ls_client.Client) -> _Expect:
...

def __call__(
self,
Expand Down
6 changes: 4 additions & 2 deletions python/langsmith/_internal/_aiter.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,12 @@ def __len__(self) -> int:
return len(self._children)

@overload
def __getitem__(self, item: int) -> AsyncIterator[T]: ...
def __getitem__(self, item: int) -> AsyncIterator[T]:
...

@overload
def __getitem__(self, item: slice) -> Tuple[AsyncIterator[T], ...]: ...
def __getitem__(self, item: slice) -> Tuple[AsyncIterator[T], ...]:
...

def __getitem__(
self, item: Union[int, slice]
Expand Down
6 changes: 4 additions & 2 deletions python/langsmith/_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ class SkipException(Exception): # type: ignore[no-redef]
@overload
def test(
func: Callable,
) -> Callable: ...
) -> Callable:
...


@overload
Expand All @@ -52,7 +53,8 @@ def test(
output_keys: Optional[Sequence[str]] = None,
client: Optional[ls_client.Client] = None,
test_suite_name: Optional[str] = None,
) -> Callable[[Callable], Callable]: ...
) -> Callable[[Callable], Callable]:
...


def test(*args: Any, **kwargs: Any) -> Callable:
Expand Down
1 change: 0 additions & 1 deletion python/langsmith/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,6 @@ def batch_ingest_runs(
self._post_batch_ingest_runs(orjson.dumps(body_chunks))

def _post_batch_ingest_runs(self, body: bytes):

try:
for api_url, api_key in self._write_api_urls.items():
self.request_with_retries(
Expand Down
3 changes: 3 additions & 0 deletions python/langsmith/evaluation/_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,9 @@ def evaluate_comparative(
View the evaluation results for experiment:...
>>> results_1.wait()
>>> results_2.wait()
>>> import time
...
... time.sleep(10) # Wait for the traces to be fully processed
Finally, you would compare the two prompts directly:
>>> import json
Expand Down
6 changes: 4 additions & 2 deletions python/langsmith/run_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ def __call__(
@overload
def traceable(
func: Callable[P, R],
) -> SupportsLangsmithExtra[P, R]: ...
) -> SupportsLangsmithExtra[P, R]:
...


@overload
Expand All @@ -243,7 +244,8 @@ def traceable(
project_name: Optional[str] = None,
process_inputs: Optional[Callable[[dict], dict]] = None,
_invocation_params_fn: Optional[Callable[[dict], dict]] = None,
) -> Callable[[Callable[P, R]], SupportsLangsmithExtra[P, R]]: ...
) -> Callable[[Callable[P, R]], SupportsLangsmithExtra[P, R]]:
...


def traceable(
Expand Down

0 comments on commit 5c70549

Please sign in to comment.