|
158 | 158 | "outputs": [], |
159 | 159 | "source": [ |
160 | 160 | "# create run with default variant\n", |
161 | | - "base_run = pf.run(flow=flow, data=data)" |
162 | | - ] |
163 | | - }, |
164 | | - { |
165 | | - "cell_type": "code", |
166 | | - "execution_count": null, |
167 | | - "metadata": {}, |
168 | | - "outputs": [], |
169 | | - "source": [ |
170 | | - "pf.stream(base_run)" |
| 161 | + "base_run = pf.run(flow=flow, data=data, stream=True)" |
171 | 162 | ] |
172 | 163 | }, |
173 | 164 | { |
|
213 | 204 | " \"groundtruth\": \"${data.answer}\",\n", |
214 | 205 | " \"prediction\": \"${run.outputs.category}\",\n", |
215 | 206 | " }, # map the url field from the data to the url input of the flow\n", |
| 207 | + " stream=True,\n", |
216 | 208 | ")" |
217 | 209 | ] |
218 | 210 | }, |
219 | | - { |
220 | | - "cell_type": "code", |
221 | | - "execution_count": null, |
222 | | - "metadata": {}, |
223 | | - "outputs": [], |
224 | | - "source": [ |
225 | | - "pf.stream(eval_run)" |
226 | | - ] |
227 | | - }, |
228 | 211 | { |
229 | 212 | "cell_type": "code", |
230 | 213 | "execution_count": null, |
|
293 | 276 | " flow=flow,\n", |
294 | 277 | " data=data,\n", |
295 | 278 | " variant=\"${summarize_text_content.variant_1}\", # here we specify node \"summarize_text_content\" to use variant 1 verison.\n", |
| 279 | + " stream=True,\n", |
296 | 280 | ")" |
297 | 281 | ] |
298 | 282 | }, |
299 | | - { |
300 | | - "cell_type": "code", |
301 | | - "execution_count": null, |
302 | | - "metadata": {}, |
303 | | - "outputs": [], |
304 | | - "source": [ |
305 | | - "pf.stream(variant_run)" |
306 | | - ] |
307 | | - }, |
308 | 283 | { |
309 | 284 | "cell_type": "code", |
310 | 285 | "execution_count": null, |
|
338 | 313 | " \"groundtruth\": \"${data.answer}\",\n", |
339 | 314 | " \"prediction\": \"${run.outputs.category}\",\n", |
340 | 315 | " }, # map the url field from the data to the url input of the flow\n", |
| 316 | + " stream=True,\n", |
341 | 317 | ")" |
342 | 318 | ] |
343 | 319 | }, |
344 | | - { |
345 | | - "cell_type": "code", |
346 | | - "execution_count": null, |
347 | | - "metadata": {}, |
348 | | - "outputs": [], |
349 | | - "source": [ |
350 | | - "pf.stream(eval_run_variant)" |
351 | | - ] |
352 | | - }, |
353 | 320 | { |
354 | 321 | "cell_type": "code", |
355 | 322 | "execution_count": null, |
|
414 | 381 | "name": "python", |
415 | 382 | "nbconvert_exporter": "python", |
416 | 383 | "pygments_lexer": "ipython3", |
417 | | - "version": "3.9.17" |
| 384 | + "version": "3.8.17" |
418 | 385 | }, |
419 | 386 | "orig_nbformat": 4 |
420 | 387 | }, |
|
0 commit comments