Skip to content

Commit 3a1f2aa

Browse files
authored
Merge pull request #1678 from confident-ai/telemetry-new-traceable-evaluate-users
telemetry: new traceable evaluate users
2 parents e92816f + cd3a80b commit 3a1f2aa

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

deepeval/telemetry.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class Feature(Enum):
1717
REDTEAMING = "redteaming"
1818
SYNTHESIZER = "synthesizer"
1919
EVALUATION = "evaluation"
20+
COMPONENT_EVALUATION = "component_evaluation"
2021
GUARDRAIL = "guardrail"
2122
BENCHMARK = "benchmark"
2223
CONVERSATION_SIMULATOR = "conversation_simulator"
@@ -166,17 +167,21 @@ def capture_evaluation_run(type: str):
166167
# data
167168
event = f"Ran {type}"
168169
distinct_id = get_unique_id()
170+
feature = Feature.COMPONENT_EVALUATION if event == "Ran traceable evaluate()" else Feature.EVALUATION
169171
properties = {
170172
"logged_in_with": get_logged_in_with(),
171173
"environment": IS_RUNNING_IN_JUPYTER,
172174
"user.status": get_status(),
173175
"user.unique_id": get_unique_id(),
174-
"feature_status.evaluation": get_feature_status(Feature.EVALUATION),
175176
"user.public_ip": (
176177
anonymous_public_ip if anonymous_public_ip else "Unknown"
177178
),
178179
}
179-
set_last_feature(Feature.EVALUATION)
180+
if feature == Feature.EVALUATION:
181+
properties["feature_status.evaluation"] = get_feature_status(feature)
182+
elif feature == Feature.COMPONENT_EVALUATION:
183+
properties["feature_status.component_evaluation"] = get_feature_status(feature)
184+
set_last_feature(feature)
180185
# capture posthog
181186
posthog.capture(
182187
distinct_id=distinct_id, event=event, properties=properties

0 commit comments

Comments
 (0)