langsmith-sdk icon indicating copy to clipboard operation
langsmith-sdk copied to clipboard

Issue: `evaluate` is very slow (because `get_git_info`)

Open davidgilbertson opened this issue 1 year ago • 6 comments

Issue you'd like to raise.

I've noticed that evaluate is taking over a minute and a half to run on a single example. I eventually tracked it down to the fact that LangSmith is calling some git commands in the background and this takes about 1m:28s (the actual evals take about 2 seconds).

Suggestion:

Is this really necessary? I should be able to run evals without involving git, no? Even if I'm an outlier with my very slow git repo, it still seems like overhead that could be avoided.

I don't want all that git info as my metadata anyway, I would like a way to opt out (or in).

If you're wondering why my git is so slow, it's because I'm using WSL2 + with files on Windows which is known to be slow with git. It's perfectly fine most of the time, but things like git status take a while. This is the first time I've come across a Python package that called git, so had never really noticed the problem until now.

davidgilbertson avatar Oct 07 '24 22:10 davidgilbertson

Fun! Thanks for flagging! Agreed with the feedback - will make some changes

hinthornw avatar Oct 08 '24 01:10 hinthornw

Has this been fixed? I still see that an evaluator takes a second to run, even when it's only returning just returning a hard value, which should be run in under a millisecond.

willemmulder avatar Dec 24 '24 14:12 willemmulder

For which SDK version?

hinthornw avatar Dec 24 '24 15:12 hinthornw

"langsmith": "^0.2.13",

Is what I currently have. Not sure if that is the latest.

willemmulder avatar Dec 24 '24 16:12 willemmulder

Evaluator timing would be different than the git call - what concurrency are you returning? And what are you using to clock the time? Any example code?

hinthornw avatar Dec 28 '24 21:12 hinthornw

Hey @hinthornw sorry we're not using evaluations at the moment, so can't verify. Let's assume it was unrelated to the post from OP👍

willemmulder avatar Mar 25 '25 15:03 willemmulder