Skip to content

Commit 2433d6e

Browse files
author
Ubuntu
committed
review feedback
1 parent 0e36040 commit 2433d6e

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

nucleus/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -820,13 +820,12 @@ def predict(
820820
predictions_processed += response[PREDICTIONS_PROCESSED_KEY]
821821
predictions_ignored += response[PREDICTIONS_IGNORED_KEY]
822822

823-
agg_response = {
823+
return {
824824
MODEL_RUN_ID_KEY: model_run_id,
825825
PREDICTIONS_PROCESSED_KEY: predictions_processed,
826826
PREDICTIONS_IGNORED_KEY: predictions_ignored,
827827
ERRORS_KEY: errors,
828828
}
829-
return agg_response
830829

831830
def commit_model_run(
832831
self, model_run_id: str, payload: Optional[dict] = None

nucleus/dataset.py

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ def get_scene(self, reference_id) -> Scene:
533533
)
534534

535535
def export_predictions(self, model):
536-
"""Exports all predications from a model run"""
536+
"""Exports all predications from a model on this dataset"""
537537
json_response = self._client.make_request(
538538
payload=None,
539539
route=f"dataset/{self.id}/model/{model.id}/export",
@@ -543,19 +543,22 @@ def export_predictions(self, model):
543543

544544
def calculate_evaluation_metrics(self, model, options=None):
545545
"""
546-
class_agnostic -- A flag to specify if matching algorithm should be class-agnostic or not.
547-
Default value: True
548546
549-
allowed_label_matches -- An optional list of AllowedMatch objects to specify allowed matches
550-
for ground truth and model predictions.
551-
If specified, 'class_agnostic' flag is assumed to be False
547+
:param model: the model to calculate eval metrics for
548+
:param options: Dict with keys:
549+
class_agnostic -- A flag to specify if matching algorithm should be class-agnostic or not.
550+
Default value: True
552551
553-
Type 'AllowedMatch':
554-
{
555-
ground_truth_label: string, # A label for ground truth annotation.
556-
model_prediction_label: string, # A label for model prediction that can be matched with
557-
# corresponding ground truth label.
558-
}
552+
allowed_label_matches -- An optional list of AllowedMatch objects to specify allowed matches
553+
for ground truth and model predictions.
554+
If specified, 'class_agnostic' flag is assumed to be False
555+
556+
Type 'AllowedMatch':
557+
{
558+
ground_truth_label: string, # A label for ground truth annotation.
559+
model_prediction_label: string, # A label for model prediction that can be matched with
560+
# corresponding ground truth label.
561+
}
559562
560563
payload:
561564
{

0 commit comments

Comments
 (0)