langchain-ai / langsmith-sdk

LangSmith Client SDK Implementations
https://smith.langchain.com/
MIT License
346 stars 59 forks source link

langsmith.client: Failed to batch ingest runs: LangSmithError('Failed to POST https://api.smith.langchain.com/runs/batch in LangSmith API. HTTPError(\'400 Client Error: Bad Request for url: https://api.smith.langchain.com/runs/batch\', \'{"detail":"dotted_order must contain a single part for root runs for run_id:... #751

Closed ldorigo closed 1 month ago

ldorigo commented 1 month ago

Issue you'd like to raise.

[2024-05-31 12:01:10,642: WARNING] langsmith.client: Failed to batch ingest runs: LangSmithError('Failed to POST https://api.smith.langchain.com/runs/batch in LangSmith API. HTTPError(\'400 Client Error: Bad Request for url: https://api.smith.langchain.com/runs/batch\', \'{"detail":"dotted_order must contain a single part for root runs for run_id:0ba586ea-a9c0-45d5-a1f3-711121ee97c2 trace_id:bbc2d4c6-cf3a-41e5-89b5-2cfcbda67958 dotted_order:20240531T095804831161Zbbc2d4c6-cf3a-41e5-89b5-2cfcbda67958.20240531T100019272195Zc8912efb-69e3-4f67-844c-bbd2efe5ece3.20240531T100100540304Z0ba586ea-a9c0-45d5-a1f3-711121ee97c2 parent_run_id:None"}\')')

I think it's related to https://github.com/langchain-ai/langchain/issues/22353 - I manually fixed that issue by modifying Langchain's code to initialize RunTree.events to [] in case it was None, but I think I only masked the root issue - now I get the error above.

Suggestion:

No response

keenborder786 commented 1 month ago

okay can you please share the code of your chain where you are using this tracer?

hinthornw commented 1 month ago

Thanks for raising this issue - definitely something going on - will try to get to the bottom. Any code example could help speed things along

hinthornw commented 1 month ago

Figured it out i believe. Will cut a new release