@@ -62,11 +62,11 @@ def with_streaming_response(self) -> EvalResourceWithStreamingResponse:
6262
6363 def evaluate_rows (
6464 self ,
65+ task_id : str ,
6566 * ,
6667 input_rows : Iterable [Dict [str , Union [bool , float , str , Iterable [object ], object , None ]]],
6768 scoring_functions : List [str ],
6869 task_config : eval_evaluate_rows_params .TaskConfig ,
69- task_id : str ,
7070 x_llama_stack_client_version : str | NotGiven = NOT_GIVEN ,
7171 x_llama_stack_provider_data : str | NotGiven = NOT_GIVEN ,
7272 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -86,6 +86,8 @@ def evaluate_rows(
8686
8787 timeout: Override the client-level default timeout for this request, in seconds
8888 """
89+ if not task_id :
90+ raise ValueError (f"Expected a non-empty value for `task_id` but received { task_id !r} " )
8991 extra_headers = {
9092 ** strip_not_given (
9193 {
@@ -96,13 +98,12 @@ def evaluate_rows(
9698 ** (extra_headers or {}),
9799 }
98100 return self ._post (
99- "/v1/eval/evaluate-rows " ,
101+ f "/v1/eval/tasks/ { task_id } /evaluations " ,
100102 body = maybe_transform (
101103 {
102104 "input_rows" : input_rows ,
103105 "scoring_functions" : scoring_functions ,
104106 "task_config" : task_config ,
105- "task_id" : task_id ,
106107 },
107108 eval_evaluate_rows_params .EvalEvaluateRowsParams ,
108109 ),
@@ -114,9 +115,9 @@ def evaluate_rows(
114115
115116 def run_eval (
116117 self ,
118+ task_id : str ,
117119 * ,
118120 task_config : eval_run_eval_params .TaskConfig ,
119- task_id : str ,
120121 x_llama_stack_client_version : str | NotGiven = NOT_GIVEN ,
121122 x_llama_stack_provider_data : str | NotGiven = NOT_GIVEN ,
122123 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -136,6 +137,8 @@ def run_eval(
136137
137138 timeout: Override the client-level default timeout for this request, in seconds
138139 """
140+ if not task_id :
141+ raise ValueError (f"Expected a non-empty value for `task_id` but received { task_id !r} " )
139142 extra_headers = {
140143 ** strip_not_given (
141144 {
@@ -146,14 +149,8 @@ def run_eval(
146149 ** (extra_headers or {}),
147150 }
148151 return self ._post (
149- "/v1/eval/run" ,
150- body = maybe_transform (
151- {
152- "task_config" : task_config ,
153- "task_id" : task_id ,
154- },
155- eval_run_eval_params .EvalRunEvalParams ,
156- ),
152+ f"/v1/eval/tasks/{ task_id } /jobs" ,
153+ body = maybe_transform ({"task_config" : task_config }, eval_run_eval_params .EvalRunEvalParams ),
157154 options = make_request_options (
158155 extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
159156 ),
@@ -187,11 +184,11 @@ def with_streaming_response(self) -> AsyncEvalResourceWithStreamingResponse:
187184
188185 async def evaluate_rows (
189186 self ,
187+ task_id : str ,
190188 * ,
191189 input_rows : Iterable [Dict [str , Union [bool , float , str , Iterable [object ], object , None ]]],
192190 scoring_functions : List [str ],
193191 task_config : eval_evaluate_rows_params .TaskConfig ,
194- task_id : str ,
195192 x_llama_stack_client_version : str | NotGiven = NOT_GIVEN ,
196193 x_llama_stack_provider_data : str | NotGiven = NOT_GIVEN ,
197194 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -211,6 +208,8 @@ async def evaluate_rows(
211208
212209 timeout: Override the client-level default timeout for this request, in seconds
213210 """
211+ if not task_id :
212+ raise ValueError (f"Expected a non-empty value for `task_id` but received { task_id !r} " )
214213 extra_headers = {
215214 ** strip_not_given (
216215 {
@@ -221,13 +220,12 @@ async def evaluate_rows(
221220 ** (extra_headers or {}),
222221 }
223222 return await self ._post (
224- "/v1/eval/evaluate-rows " ,
223+ f "/v1/eval/tasks/ { task_id } /evaluations " ,
225224 body = await async_maybe_transform (
226225 {
227226 "input_rows" : input_rows ,
228227 "scoring_functions" : scoring_functions ,
229228 "task_config" : task_config ,
230- "task_id" : task_id ,
231229 },
232230 eval_evaluate_rows_params .EvalEvaluateRowsParams ,
233231 ),
@@ -239,9 +237,9 @@ async def evaluate_rows(
239237
240238 async def run_eval (
241239 self ,
240+ task_id : str ,
242241 * ,
243242 task_config : eval_run_eval_params .TaskConfig ,
244- task_id : str ,
245243 x_llama_stack_client_version : str | NotGiven = NOT_GIVEN ,
246244 x_llama_stack_provider_data : str | NotGiven = NOT_GIVEN ,
247245 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -261,6 +259,8 @@ async def run_eval(
261259
262260 timeout: Override the client-level default timeout for this request, in seconds
263261 """
262+ if not task_id :
263+ raise ValueError (f"Expected a non-empty value for `task_id` but received { task_id !r} " )
264264 extra_headers = {
265265 ** strip_not_given (
266266 {
@@ -271,14 +271,8 @@ async def run_eval(
271271 ** (extra_headers or {}),
272272 }
273273 return await self ._post (
274- "/v1/eval/run" ,
275- body = await async_maybe_transform (
276- {
277- "task_config" : task_config ,
278- "task_id" : task_id ,
279- },
280- eval_run_eval_params .EvalRunEvalParams ,
281- ),
274+ f"/v1/eval/tasks/{ task_id } /jobs" ,
275+ body = await async_maybe_transform ({"task_config" : task_config }, eval_run_eval_params .EvalRunEvalParams ),
282276 options = make_request_options (
283277 extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
284278 ),
0 commit comments