Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
4d717b1
Merge branch 'development' into release
karthikscale3 Apr 24, 2024
0233826
Merge branch 'main' of github.com:Scale3-Labs/langtrace-python-sdk in…
karthikscale3 Apr 28, 2024
7f4e951
Merge branch 'development' into release
karthikscale3 Apr 28, 2024
81a6ca0
Merge
karthikscale3 Jun 13, 2024
0c19f77
Merge branch 'development' into release
karthikscale3 Jun 13, 2024
c3a6ccf
remove logs
karthikscale3 Jun 13, 2024
a99cf10
remove requirements
karthikscale3 Jun 13, 2024
1379b27
Merge branch 'main' of github.com:Scale3-Labs/langtrace-python-sdk in…
karthikscale3 Jun 17, 2024
dae04e7
Merge branch 'development' into release
karthikscale3 Jun 17, 2024
129e927
Merge branch 'main' of github.com:Scale3-Labs/langtrace-python-sdk in…
karthikscale3 Jun 24, 2024
16e67f9
Merge branch 'development' into release
karthikscale3 Jun 24, 2024
e604e93
Bump version
karthikscale3 Jun 24, 2024
7e00473
Merge branch 'main' of github.com:Scale3-Labs/langtrace-python-sdk in…
karthikscale3 Jun 24, 2024
6ac71aa
Merge branch 'development' into release
karthikscale3 Jun 24, 2024
c39bf01
Merge branch 'main' of github.com:Scale3-Labs/langtrace-python-sdk in…
karthikscale3 Jun 24, 2024
f89e38c
Merge branch 'development' into release
karthikscale3 Jun 24, 2024
e95e743
Merge branch 'main' of github.com:Scale3-Labs/langtrace-python-sdk in…
karthikscale3 Jul 19, 2024
c62e803
Squash
karthikscale3 Jul 25, 2024
d7fd3fb
Merge
karthikscale3 Jul 25, 2024
c4ea507
Merge branch 'development' into release
karthikscale3 Jul 25, 2024
4c74fd8
Merge
karthikscale3 Jul 31, 2024
9a83e20
Merge branch 'development' into release
karthikscale3 Jul 31, 2024
09d5631
Merge
karthikscale3 Aug 3, 2024
508e72b
Merge
karthikscale3 Aug 3, 2024
ad44fa3
Merge branch 'main' of github.com:Scale3-Labs/langtrace-python-sdk in…
karthikscale3 Aug 13, 2024
ad168b3
Merge branch 'development' into release
karthikscale3 Aug 13, 2024
6876f92
Merge branch 'main' of github.com:Scale3-Labs/langtrace-python-sdk in…
karthikscale3 Aug 30, 2024
630169a
Merge branch 'development' into release
karthikscale3 Aug 30, 2024
0e1aae3
Merge branch 'main' of github.com:Scale3-Labs/langtrace-python-sdk in…
karthikscale3 Sep 1, 2024
c266698
Merge branch 'development' into release
karthikscale3 Sep 1, 2024
5b9895f
merge
karthikscale3 Sep 4, 2024
04fd825
Merge branch 'development' into release
karthikscale3 Sep 4, 2024
510e4b8
Merge branch 'main' of github.com:Scale3-Labs/langtrace-python-sdk in…
karthikscale3 Sep 6, 2024
e63bee2
Merge branch 'development' into release
karthikscale3 Sep 6, 2024
9741a3e
Merge branch 'main' of github.com:Scale3-Labs/langtrace-python-sdk in…
karthikscale3 Sep 8, 2024
4f7f3c4
Merge branch 'development' into release
karthikscale3 Sep 8, 2024
32fac05
merge
karthikscale3 Sep 11, 2024
4920395
Merge branch 'development' into release
karthikscale3 Sep 11, 2024
2e8956d
Merge branch 'main' of github.com:Scale3-Labs/langtrace-python-sdk in…
karthikscale3 Sep 11, 2024
372ae29
Merge branch 'development' into release
karthikscale3 Sep 11, 2024
da82f72
bump version
karthikscale3 Sep 26, 2024
ef0332f
Merge branch 'development' into release
karthikscale3 Sep 26, 2024
105749c
Merge branch 'main' of github.com:Scale3-Labs/langtrace-python-sdk in…
karthikscale3 Oct 8, 2024
0f99827
Merge branch 'development' into release
karthikscale3 Oct 8, 2024
b52fce7
Merge branch 'main' of github.com:Scale3-Labs/langtrace-python-sdk in…
karthikscale3 Oct 8, 2024
ddaf4b5
Merge branch 'main' of github.com:Scale3-Labs/langtrace-python-sdk in…
karthikscale3 Oct 10, 2024
54cddc8
Merge branch 'development' into release
karthikscale3 Oct 10, 2024
ced0a31
Merge branch 'main' of github.com:Scale3-Labs/langtrace-python-sdk in…
karthikscale3 Oct 16, 2024
4e22bde
Merge branch 'development' into release
karthikscale3 Oct 16, 2024
135bdc7
bump version
karthikscale3 Oct 18, 2024
6b0a460
Merge branch 'development' into release
karthikscale3 Oct 22, 2024
7824c39
Merge branch 'main' of github.com:Scale3-Labs/langtrace-python-sdk in…
karthikscale3 Oct 22, 2024
109990a
minor
karthikscale3 Oct 22, 2024
2e9befb
version
karthikscale3 Oct 31, 2024
21cdc08
Merge branch 'development' into release
karthikscale3 Oct 31, 2024
7959744
Merge branch 'development' into release
karthikscale3 Oct 31, 2024
aa3dc2f
switch to http exporter
karthikscale3 Oct 31, 2024
4e22e16
Include setuptools to deps
karthikscale3 Nov 15, 2024
a7b34ab
Merge branch 'development' into release
karthikscale3 Nov 15, 2024
736fb60
Merge branch 'main' of github.com:Scale3-Labs/langtrace-python-sdk in…
karthikscale3 Nov 19, 2024
41c58e8
Merge branch 'development' into release
karthikscale3 Nov 19, 2024
129f764
Merge branch 'main' of github.com:Scale3-Labs/langtrace-python-sdk in…
karthikscale3 Nov 25, 2024
f7188c5
Merge branch 'development' into release
karthikscale3 Nov 25, 2024
d43358a
Merge branch 'main' of github.com:Scale3-Labs/langtrace-python-sdk in…
karthikscale3 Dec 1, 2024
fa7b13b
Merge branch 'development' into release
karthikscale3 Dec 1, 2024
fab8619
merge
karthikscale3 Dec 10, 2024
5649f0a
Merge branch 'development' into release
karthikscale3 Dec 10, 2024
0274620
Merge branch 'main' of github.com:Scale3-Labs/langtrace-python-sdk in…
karthikscale3 Jan 20, 2025
0897cc7
Merge branch 'development' into release
karthikscale3 Jan 20, 2025
8eee1e1
Merge branch 'main' of github.com:Scale3-Labs/langtrace-python-sdk in…
karthikscale3 Jan 20, 2025
8cc7f7c
Merge branch 'development' into release
karthikscale3 Jan 20, 2025
d6b6531
Merge branch 'main' of github.com:Scale3-Labs/langtrace-python-sdk in…
karthikscale3 Jan 20, 2025
30b6e00
Merge branch 'development' into release
karthikscale3 Jan 20, 2025
1d7362a
Merge branch 'main' of github.com:Scale3-Labs/langtrace-python-sdk in…
karthikscale3 Jan 22, 2025
36ba737
Merge branch 'development' into release
karthikscale3 Jan 22, 2025
d9bcdb4
Merge branch 'main' of github.com:Scale3-Labs/langtrace-python-sdk in…
karthikscale3 Jan 27, 2025
a5f3da6
Merge branch 'development' into release
karthikscale3 Jan 27, 2025
b856e03
Merge branch 'main' of github.com:Scale3-Labs/langtrace-python-sdk in…
karthikscale3 Jan 27, 2025
5f14b58
Merge branch 'development' into release
karthikscale3 Jan 27, 2025
fd9baed
merge
karthikscale3 Feb 6, 2025
ece9c97
Merge branch 'development' into release
karthikscale3 Feb 6, 2025
cd1a481
Merge branch 'main' of github.com:Scale3-Labs/langtrace-python-sdk in…
karthikscale3 Feb 7, 2025
a3730af
Merge branch 'development' into release
karthikscale3 Feb 7, 2025
5453a92
merge
karthikscale3 Mar 5, 2025
5d65fb3
Merge branch 'development' into release
karthikscale3 Mar 5, 2025
0661c29
Merge branch 'main' of github.com:Scale3-Labs/langtrace-python-sdk in…
karthikscale3 Mar 12, 2025
a51cff1
Merge branch 'development' into release
karthikscale3 Mar 12, 2025
0a3a4a6
Merge branch 'main' of github.com:Scale3-Labs/langtrace-python-sdk in…
karthikscale3 Mar 13, 2025
d1695ac
Merge branch 'development' into release
karthikscale3 Mar 13, 2025
5663107
Merge branch 'main' of github.com:Scale3-Labs/langtrace-python-sdk in…
karthikscale3 Apr 2, 2025
d2967d9
Merge branch 'development' into release
karthikscale3 Apr 2, 2025
e5b75c3
Merge branch 'development' into release
karthikscale3 Apr 2, 2025
ab8e6a0
Merge branch 'release' of github.com:Scale3-Labs/langtrace-python-sdk…
karthikscale3 Apr 2, 2025
fe9f482
Merge branch 'development' into release
karthikscale3 Apr 2, 2025
071658a
Merge branch 'main' of github.com:Scale3-Labs/langtrace-python-sdk in…
karthikscale3 Apr 2, 2025
0a4f622
Merge branch 'development' into release
karthikscale3 Apr 2, 2025
8c1dc5a
bump version
karthikscale3 Apr 2, 2025
0abf70b
bump version
karthikscale3 Apr 2, 2025
2cb5ea6
add project details
alizenhom Apr 14, 2025
319e07b
cleanup
alizenhom Apr 14, 2025
6be30ae
Merge pull request #525 from Scale3-Labs/ali/add-project-details
alizenhom Apr 14, 2025
5f89b69
Obinna/s3 en 1111 fix dspy error (#528)
obinnascale3 Apr 17, 2025
b283588
Improve Cleanlab Instrumentation (#529)
karthikscale3 Apr 17, 2025
b91c347
merge
karthikscale3 Apr 17, 2025
b3fab0a
merge
karthikscale3 Apr 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/examples/dspy_example/QA_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

# configure the language model to be used by dspy

llm = dspy.Claude()
dspy.settings.configure(lm=llm)
lm = dspy.LM('claude-3-opus-20240229')
dspy.configure(lm=lm)

# create a prompt format that says that the llm will take a question and give back an answer
predict = dspy.Predict("question -> answer")
Expand Down
4 changes: 2 additions & 2 deletions src/examples/dspy_example/QA_basic_with_chain_of_thought.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
langtrace.init(disable_instrumentations={"all_except": ["dspy", "anthropic"]})

# configure the language model to be used by dspy
llm = dspy.Claude()
dspy.settings.configure(lm=llm)
lm = dspy.LM('claude-3-opus-20240229')
dspy.configure(lm=lm)


# create a signature for basic question answering
Expand Down
4 changes: 2 additions & 2 deletions src/examples/dspy_example/QA_basic_with_signature.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
langtrace.init(disable_instrumentations={"all_except": ["dspy", "anthropic"]})

# configure the language model to be used by dspy
llm = dspy.Claude()
dspy.settings.configure(lm=llm)
lm = dspy.LM('claude-3-opus-20240229')
dspy.configure(lm=lm)


# create a signature for basic question answering
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
langtrace.init(disable_instrumentations={"all_except": ["dspy", "anthropic"]})

# configure the language model to be used by dspy
llm = dspy.Claude()
dspy.settings.configure(lm=llm)
lm = dspy.LM('claude-3-opus-20240229')
dspy.configure(lm=lm)


# create a signature for basic question answering
Expand Down
4 changes: 2 additions & 2 deletions src/examples/dspy_example/math_problems_cot.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

langtrace.init()

turbo = dspy.OpenAI(model="gpt-3.5-turbo", max_tokens=250)
dspy.settings.configure(lm=turbo)
lm = dspy.LM('gpt-3.5-turbo')
dspy.configure(lm=lm)

# Load math questions from the GSM8K dataset
gsm8k = GSM8K()
Expand Down
4 changes: 2 additions & 2 deletions src/examples/dspy_example/math_problems_cot_parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

langtrace.init()

turbo = dspy.OpenAI(model="gpt-3.5-turbo", max_tokens=250)
dspy.settings.configure(lm=turbo)
lm = dspy.LM('gpt-3.5-turbo')
dspy.configure(lm=lm)

# Load math questions from the GSM8K dataset
gsm8k = GSM8K()
Expand Down
4 changes: 2 additions & 2 deletions src/examples/dspy_example/program_of_thought_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

langtrace.init()

turbo = dspy.OpenAI(model="gpt-3.5-turbo", max_tokens=250)
dspy.settings.configure(lm=turbo)
lm = dspy.LM('gpt-3.5-turbo')
dspy.configure(lm=lm)


# Define a simple signature for basic question answering
Expand Down
4 changes: 2 additions & 2 deletions src/examples/dspy_example/react.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

langtrace.init()

turbo = dspy.OpenAI(model="gpt-3.5-turbo", max_tokens=250)
dspy.settings.configure(lm=turbo)
lm = dspy.LM('gpt-3.5-turbo')
dspy.configure(lm=lm)

colbertv2_wiki17_abstracts = dspy.ColBERTv2(
url="http://20.102.90.50:2017/wiki17_abstracts"
Expand Down
4 changes: 4 additions & 0 deletions src/langtrace_python_sdk/instrumentation/cleanlab/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ def traced_method(
result_json = str(result)

span.set_attribute("tlm.result", str(result_json))
trustworthiness_score = result_json["trustworthiness_score"]
log = result_json["log"]
span.set_attribute("tlm.trustworthiness_score", str(trustworthiness_score))
span.set_attribute("tlm.explanation", str(log.get("explanation", "")))
span.set_status(Status(StatusCode.OK))

return result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,6 @@ def _instrument(self, **kwargs):
"MultiChainComparison.forward",
patch_signature("MultiChainComparison.forward", version, tracer),
)
_W(
"dspy.predict.retry",
"Retry.forward",
patch_signature("Retry.forward", version, tracer),
)
_W(
"dspy.evaluate.evaluate",
"Evaluate.__call__",
Expand Down
2 changes: 1 addition & 1 deletion src/langtrace_python_sdk/instrumentation/dspy/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def traced_method(wrapped, instance, args, kwargs):
prog = {
"name": args[0].prog.__class__.__name__,
"signature": (
str(args[0].prog.signature) if args[0].prog.signature else None
str(args[0].prog.signature) if hasattr(args[0].prog, "signature") else None
),
}
span_attributes["dspy.optimizer.module.prog"] = json.dumps(prog)
Expand Down
2 changes: 1 addition & 1 deletion src/langtrace_python_sdk/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "3.8.14"
__version__ = "3.8.15"
Loading