Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add batch scoring script for other od models #2690

Merged
merged 3 commits into from
Sep 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
sharma-riti marked this conversation as resolved.
Show resolved Hide resolved
# 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
Loading