Skip to content

Commit

Permalink
0.2.97 PyPi; training quest & reward sig updates
Browse files Browse the repository at this point in the history
  • Loading branch information
DoKu88 committed Dec 16, 2024
1 parent 785e40c commit 4c25957
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "synth-sdk"
version = "0.2.96"
version = "0.2.97"
description = ""
authors = [{name = "Synth AI", email = "[email protected]"}]
license = {text = "MIT"}
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name="synth-sdk",
version="0.2.96",
version="0.2.97",
packages=find_packages(),
install_requires=[
"opentelemetry-api",
Expand Down
6 changes: 3 additions & 3 deletions synth_sdk/tracing/abstractions.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,23 +142,23 @@ class TrainingQuestion(BaseModel):
A training question is a question that an agent (system_id) is trying to answer.
It contains an intent and criteria that the agent is trying to meet.
'''
id: str
intent: str
criteria: str
question_id: Optional[str] = None

def to_dict(self):
return {
"id": self.id,
"intent": self.intent,
"criteria": self.criteria,
"question_id": self.question_id,
}


class RewardSignal(BaseModel):
'''
A reward signal tells us how well an agent (system_id) is doing on a particular question (question_id).
'''
question_id: Optional[str] = None
question_id: str
system_id: str
reward: Union[float, int, bool]
annotation: Optional[str] = None
Expand Down
2 changes: 1 addition & 1 deletion synth_sdk/tracing/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def is_event_loop_running():
def format_upload_output(dataset, traces):
# Format questions array
questions_data = [
{"intent": q.intent, "criteria": q.criteria, "question_id": q.question_id}
{"intent": q.intent, "criteria": q.criteria, "id": q.id}
for q in dataset.questions
]

Expand Down

0 comments on commit 4c25957

Please sign in to comment.