@@ -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