From 4c25957804a63bb7a1a40b73a274acf539b7fa06 Mon Sep 17 00:00:00 2001 From: doku88 Date: Mon, 16 Dec 2024 14:31:01 -0800 Subject: [PATCH] 0.2.97 PyPi; training quest & reward sig updates --- pyproject.toml | 2 +- setup.py | 2 +- synth_sdk/tracing/abstractions.py | 6 +++--- synth_sdk/tracing/upload.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9925346..83e2041 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "synth-sdk" -version = "0.2.96" +version = "0.2.97" description = "" authors = [{name = "Synth AI", email = "josh@usesynth.ai"}] license = {text = "MIT"} diff --git a/setup.py b/setup.py index 1d36af1..9de5cd3 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name="synth-sdk", - version="0.2.96", + version="0.2.97", packages=find_packages(), install_requires=[ "opentelemetry-api", diff --git a/synth_sdk/tracing/abstractions.py b/synth_sdk/tracing/abstractions.py index c794cfa..55cd523 100644 --- a/synth_sdk/tracing/abstractions.py +++ b/synth_sdk/tracing/abstractions.py @@ -142,15 +142,15 @@ 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, } @@ -158,7 +158,7 @@ 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 diff --git a/synth_sdk/tracing/upload.py b/synth_sdk/tracing/upload.py index 554039c..377432a 100644 --- a/synth_sdk/tracing/upload.py +++ b/synth_sdk/tracing/upload.py @@ -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 ]