Skip to content

Commit

Permalink
add batch scoring script for other od models (#2690)
Browse files Browse the repository at this point in the history
* add batch scoring for other od models

* fix doc

* remove duplicate scoring script
  • Loading branch information
sharma-riti authored Sep 29, 2023
1 parent 18bebc5 commit ad32a8e
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@
# Licensed under the MIT license.

import os
import argparse
import json

from azureml.core.model import Model
from azureml.automl.core.shared import logging_utilities

from azureml.automl.dnn.vision.common.logging_utils import get_logger
from azureml.automl.dnn.vision.common.model_export_utils import (
load_model,
run_inference_batch,
)

# Uncomment line 16-18 and comment line 19-21 to run batch scoring
# for models other than yolo.
# from azureml.automl.dnn.vision.object_detection.writers.score import (
# _score_with_model,
# )
from azureml.automl.dnn.vision.object_detection_yolo.writers.score import (
_score_with_model,
)
Expand Down Expand Up @@ -49,6 +52,7 @@ def init():

def run(mini_batch):
logger.info("Running inference.")
result = run_inference_batch(model, mini_batch, _score_with_model, batch_size)
result = run_inference_batch(
model, mini_batch, _score_with_model, batch_size)
logger.info("Finished inferencing.")
return result

0 comments on commit ad32a8e

Please sign in to comment.