@@ -38,10 +38,8 @@ def __init__(
3838 self ,
3939 * ,
4040 client_wrapper : SyncClientWrapper ,
41- evaluation_context_variable : ContextVar [Optional [EvaluationContext ]],
4241 ):
4342 super ().__init__ (client_wrapper = client_wrapper )
44- self ._evaluation_context_variable = evaluation_context_variable
4543
4644 def run (
4745 self ,
@@ -70,7 +68,6 @@ def run(
7068 dataset = dataset ,
7169 evaluators = evaluators ,
7270 workers = workers ,
73- evaluation_context_variable = self ._evaluation_context_variable ,
7471 )
7572
7673
@@ -118,31 +115,14 @@ def __init__(
118115 httpx_client = httpx_client ,
119116 )
120117
121- self .evaluation_context_variable : ContextVar [Optional [EvaluationContext ]] = ContextVar (
122- EVALUATION_CONTEXT_VARIABLE_NAME
123- )
124-
125- eval_client = ExtendedEvalsClient (
126- client_wrapper = self ._client_wrapper ,
127- evaluation_context_variable = self .evaluation_context_variable ,
128- )
118+ eval_client = ExtendedEvalsClient (client_wrapper = self ._client_wrapper )
129119 eval_client .client = self
130120 self .evaluations = eval_client
131121 self .prompts = ExtendedPromptsClient (client_wrapper = self ._client_wrapper )
132122
133123 # Overload the .log method of the clients to be aware of Evaluation Context
134- # TODO: Overload the log for Evaluators and Tools once run_id is added
135- # to them.
136- self .prompts = log_with_evaluation_context (
137- client = self .prompts ,
138- evaluation_context_variable = self .evaluation_context_variable ,
139- )
140- # self.evaluators = log_with_evaluation_context(client=self.evaluators)
141- # self.tools = log_with_evaluation_context(client=self.tools)
142- self .flows = log_with_evaluation_context (
143- client = self .flows ,
144- evaluation_context_variable = self .evaluation_context_variable ,
145- )
124+ self .prompts = log_with_evaluation_context (client = self .prompts )
125+ self .flows = log_with_evaluation_context (client = self .flows )
146126
147127 if opentelemetry_tracer_provider is not None :
148128 self ._tracer_provider = opentelemetry_tracer_provider
@@ -157,9 +137,7 @@ def __init__(
157137 instrument_provider (provider = self ._tracer_provider )
158138 self ._tracer_provider .add_span_processor (
159139 HumanloopSpanProcessor (
160- exporter = HumanloopSpanExporter (
161- client = self ,
162- )
140+ exporter = HumanloopSpanExporter (client = self ),
163141 ),
164142 )
165143
0 commit comments