Skip to content

Commit 0b088b9

Browse files
authored
Use lambda
1 parent e09fb8f commit 0b088b9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

examples/model_diagnostics/model_diagnostics_demo.ipynb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -636,8 +636,7 @@
636636
"MODEL_RUN_ID = ''\n",
637637
"model = client.get_model(MODEL_ID)\n",
638638
"\n",
639-
"def is_correct_model_run(run): return run[\"id\"] == MODEL_RUN_ID\n",
640-
"model_run = next(filter(is_correct_model_run, model.model_runs), None)\n",
639+
"model_run = next(filter(lambda run: run['id'] == MODEL_RUN_ID, model.model_runs), None)\n",
641640
"labels = model_run.export_labels(download=True)"
642641
]
643642
}

0 commit comments

Comments
 (0)