Commit Graph

97 Commits

Author SHA1 Message Date
William FH b37085fabe fix threading (#499)
- Call info within tracing queue
- Default to batching even if info endpoint fails

If you turn batching off, you have to make your own tracer / traceable
flow that handles threading yourself now.
2024-03-05 08:03:46 -08:00
William FH 9b224db58f Custom hide/filter inputs/outputs (#488)
This lets you scope hide inputs/outputs to a client. It also lets you
add custom filters (rather than just masking everything.

You could then use this in the traceable decorator or langchain tracer
to filter runs within a given trace.

It would _not_ facilitate filtering on a span level though, since it
only sees the inputs/outputs and the client is shared within a trace.

Alternatives could include a single function (filter_run) that takes in
a Run object, though then we'd have to re-construct the run within the
client, which is a bit annoying
2024-03-04 09:23:55 -08:00
William FH 86c2a44fd6 Batching Fix (#474) 2024-02-24 18:50:22 -08:00
William FH d79fcf164d Wfh/strip not given (#472) 2024-02-23 16:01:16 -08:00
William FH 54ff955f87 Orjson non str key fix (#471) 2024-02-23 15:58:38 -08:00
William FH 563dcb5f7b Add split batches (#469) 2024-02-22 17:29:15 -08:00
William FH fc65996e98 Add py 429 retries (#467) 2024-02-22 16:17:34 -08:00
William FH 1b40136dd2 Wfh/project name (#449)
Add support for:
```
@traceable(project_name="foo")
def foo():
    pass
```
and

```
langsmith.run_helpers.get_current_run_tree()
```

Add support for
```
run_tree.add_metadata()
run_tree.add_events()
run_tree.add_tags()
```
2024-02-16 10:12:44 -08:00
William FH 01211bca96 Update typehints (#448)
So you get linter warnings if you try to do a name. It doesn't actually
alter the behavior, so if we choose to extend the number of types, it
would just be a linting issue rather than a runtime issue
2024-02-15 12:28:02 -08:00
William FH 286a5a60c6 0.1.1 (#445)
Add Warnings for unrecognized traceable run_type
2024-02-15 09:14:14 -08:00
William FH a9a12e98f2 Release w/ updates to listRuns (#440) 2024-02-14 14:27:02 -08:00
William FH dc8e7db9ee Add multi project query support (OR) (#439) 2024-02-14 13:19:35 -08:00
Savvas Mantzouranidis 4846756b2e fix depracation warning of .utcnow() (#418)
as seen in the [official
docs](https://docs.python.org/3/library/datetime.html#datetime.datetime.utcnow)
datetime.datetime.utcnow() is being deprecated and the suggested
function to use instead is datetime.datetime.now(datetime.UTC) (which
also supports the .isoformat() function)

---------

Co-authored-by: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com>
2024-02-09 17:01:12 -08:00
William FH c6dfe31034 increase timeout (#414) 2024-02-09 01:37:06 -08:00
William FH c27e0fce96 Fix threadpoole exutor and batching (#412) 2024-02-08 18:35:49 -08:00
William FH 8e26d22dfb Include stats in readProject (#408)
and speed up int tests
2024-02-07 00:17:26 -08:00
William FH 8fdd2f45c1 Add include_stats (#407) 2024-02-06 13:00:52 -08:00
William FH 8ed33dd725 Wfh/use system batch config (#404) 2024-02-05 16:30:38 -08:00
William FH bef4dfa993 Add info endpoint (#403) 2024-02-05 14:02:18 -08:00
William FH 0f466e6262 Add trace ID + dotted order (#392)
Also
- Delete execution_order
- Add default start_time in js
2024-02-01 18:44:01 -08:00
William FH 3b38bcc2c7 Update to use parallel testing (#395) 2024-02-01 16:04:51 -08:00
William FH 9bf23e4e5c Update default python serialization (#394)
Fall back to repr when you reach a certain depth of regular class
traversal
2024-02-01 15:36:47 -08:00
William FH 2c7f1665ca Release: 0.0.84 (#388) 2024-01-28 17:09:52 -08:00
William FH 003ef89e91 Wrap OpenAi (#385)
Co-authored-by: Nuno Campos <nuno@langchain.dev>
2024-01-28 16:50:47 -08:00
William FH 00dacc5abe Enable no args decorator (#386)
Change to let you do this:
```
from langsmith import traceable

@traceable
def foo():
    return "bar"
```

Rather than ONLY this:
```
from langsmith import traceable

@traceable() # <- need to call the function
def foo():
    return "bar"
```
2024-01-28 15:42:59 -08:00
William FH 32dda9c1c3 Better Serialize (#387)
Better default handling for:
1. Regular python objects
2. dataclasses
3. attrs
2024-01-27 18:56:39 -08:00
Nuno Campos 377135f6e1 Autoscale background threads for tracer auto batching (#382)
Co-authored-by: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com>
2024-01-27 18:04:15 -08:00
William FH 57456015cf Batch Tracer Endpoint & Tracer Sampling (#342)
Co-authored-by: Nuno Campos <nuno@langchain.dev>
2024-01-27 17:59:58 -08:00
William FH 76487f7d07 Track langchain env vars (#362) 2024-01-17 16:34:11 -08:00
William FH e0a9f2f97b Add version info to user-agent header (#357) 2024-01-16 12:40:32 -08:00
William FH f0fbd3e4bc Fix URL Parse (#352) 2024-01-11 15:32:41 -08:00
William FH ed34564912 Update @traceable Generic Typing (#341)
Previously, mypy would complain when using strict typing
2024-01-08 09:03:30 -08:00
William FH 9c2b756a59 Add git info (#340)
Add helper to fetch git repo info
2024-01-02 19:28:44 -08:00
William FH 43fd528e8e Extend is_traceable to support class call (#333) 2023-12-21 06:54:38 -08:00
infra 59d0b154a0 Remove unused docker files and add version 2023-12-13 18:13:21 -08:00
William FH b2e703813f Improve run evaluator decorator (#322) 2023-12-07 16:34:06 -08:00
William FH 2001f6b493 Read Share Dataset (#314)
In shared method
2023-11-30 21:46:35 -08:00
William Fu-Hinthorn 85358c88f3 update test 2023-11-30 20:46:22 -08:00
Nuno Campos a467fb46b4 Use pytest asyncio auto mode (#299) 2023-11-20 09:34:51 -08:00
William FH 18449e5848 Fix linting; Add has_dataset method, update to LangSmithNotFoundError (#294) 2023-11-13 16:01:53 -08:00
jakerachleff 94c23cd286 Add method to consistently get project (#289)
We plan to introduce an environment variable in hosted langserve that
will overwrite the project used for traces from hosted deployments. We
don't centralize how we refer to projects in any of our repos, so in
order to ensure that our tracing works properly and our project
selection is consistent, we need to introduce a shared method for
getting the project that we can use throughout our different repos
2023-11-08 14:53:16 -08:00
William FH 96b06a0ee3 Better pydantic serialization (#285)
For pydantic objects in the json, try to use their method to serialize
2023-11-06 14:32:36 -08:00
William FH 9402c0401c Add target ID support (#276) 2023-10-29 00:26:35 -07:00
William FH 7bd7a8596e Trace if explicitly set (#274) 2023-10-27 14:31:14 -07:00
William FH dcb3846447 Add as_runnable function (#268) 2023-10-25 14:20:55 -07:00
William FH 2c9d69591b Support Generators for traceable (#250)
For generator functions, log a list of outputs by default. Let user
define a reduce_fn within the decorated function to support custom
behavior (e.g., if you wanted to reduce OAI dictionaries and only log
the resulting string.
2023-10-17 09:10:35 -07:00
William FH d3c92386f4 Wfh/upate feedback async (#240) 2023-09-26 20:06:49 -07:00
William FH c66383c7ea 0.0.40 (#236) 2023-09-21 14:52:18 -07:00
William FH c71d8e1683 Write Queue Compatible (#221)
Context: feedback is entering the write queue and so we can't get the
info back in the response.

- Update the return object to be populated from the creation object
rather than the API response.
- Permit manual specification of the ID's
- Update the evaluate_run() return object to be the evaluationresult
2023-09-13 15:50:13 -07:00
Jacob Lee 804dbbb002 Add convenience methods for creating examples, coerce LangChain messages if passed into createChatExample (#215)
Co-authored-by: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com>
2023-09-12 13:01:18 -07:00