diff --git a/nucleus/model.py b/nucleus/model.py index 55f7e2e5..59dd174e 100644 --- a/nucleus/model.py +++ b/nucleus/model.py @@ -4,6 +4,7 @@ from .async_job import AsyncJob from .constants import ( + ANNOTATIONS_KEY METADATA_KEY, MODEL_TAGS_KEY, MODEL_TRAINED_SLICE_IDS_KEY, @@ -18,6 +19,7 @@ PolygonPrediction, SegmentationPrediction, ) +from nucleus.utils import format_prediction_response class Model: @@ -343,3 +345,10 @@ def remove_trained_slice_ids(self, slide_ids: List[str]): ) return response.json() + def ungrouped_export(self, model_run_id): + json_response = self._client.make_request( + payload={}, + route=f"modelRun/{model_run_id}/ungrouped", + requests_command=requests.get, + ) + return format_prediction_response({ANNOTATIONS_KEY: json_response})