diff --git a/sdk/python/jobs/automl-standalone-jobs/automl-image-object-detection-task-fridge-items-batch-scoring/scripts/batch_scoring.py b/sdk/python/jobs/automl-standalone-jobs/automl-image-object-detection-task-fridge-items-batch-scoring/scripts/batch_scoring.py index 70543715ea..5591c6e82c 100644 --- a/sdk/python/jobs/automl-standalone-jobs/automl-image-object-detection-task-fridge-items-batch-scoring/scripts/batch_scoring.py +++ b/sdk/python/jobs/automl-standalone-jobs/automl-image-object-detection-task-fridge-items-batch-scoring/scripts/batch_scoring.py @@ -2,10 +2,7 @@ # 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 @@ -13,6 +10,12 @@ 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, ) @@ -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