Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue: Langsmith fails to batch ingest runs #808

Open
omrish-Glossai opened this issue Jun 20, 2024 · 9 comments
Open

Issue: Langsmith fails to batch ingest runs #808

omrish-Glossai opened this issue Jun 20, 2024 · 9 comments

Comments

@omrish-Glossai
Copy link

Issue you'd like to raise.

Hello,
I am using LangSmith and Langchain to trace my LLM usage. While running several times I receive the following warning:
langsmith.client:Failed to batch ingest runs: LangSmithConnectionError("Connection error caused failure to POST https://api.smith.langchain.com/runs/batch in LangSmith API. Please confirm your internet connection.. ConnectionError(ProtocolError('Connection aborted.', timeout('The write operation timed out')))")

When receiving this, the specific trace is not logged to the project.

Suggestion:

No response

@hinthornw
Copy link
Collaborator

Hi @omrish-Glossai could you confirm which langsmith version you are using?

We increased timeouts/persistence of the requests in more recent versions, which would reduce the occurrence of this type of connection error

@omrish-Glossai
Copy link
Author

I am using langsmith 0.1.77.

@dalmad2
Copy link

dalmad2 commented Jul 22, 2024

Has anyone figured this out?

@Veghit
Copy link

Veghit commented Aug 20, 2024

this happens using 0.1.199 as well
any workaround? maybe changing the client configuration somehow?

@ShubhamMaddhashiya-bidgely
Copy link

ShubhamMaddhashiya-bidgely commented Aug 23, 2024

I am also facing the same issue, I'm using langsmith==0.1.99

@MichalKrakovskyBSS
Copy link

Same here, any chance to change the config somehow?

@hinthornw
Copy link
Collaborator

Hi all this usually happens for one of two reasons:

  1. Network issues
  2. Payload is too large (> ~24 MB)

We've updated the error messaging recently to make it (hopefully) more clear which of the two is causing this, and we'll also try to make the load balancer erroring a bit more clear

@hinthornw
Copy link
Collaborator

To handle (2), we typically recommend excluding large, unhelpful content from traces: E.g.: https://docs.smith.langchain.com/how_to_guides/tracing/mask_inputs_outputs#rule-based-masking-of-inputs-and-outputs

Or in @traceable you can use process_inputs/outputs, or you can fully control with the trace context manager.

We're also working to help automate some of this and also increase the max-payload size permitted.

@jeevanions
Copy link

Not sure this is a solution but kind of worked around by changing this param

client = Client(auto_batch_tracing=False)
evaluate(....,client=client,...)

It takes more time though but finishes without any issues,.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants