Commit e770d249 authored by Ubuntu's avatar Ubuntu
Browse files

Fix problem with debug code still around

parent a73abb57
......@@ -24,7 +24,6 @@ def evaluate(test_images_path, predictions_output_path):
for prediction in output:
prediction["image_id"] = image_id
predictions.append(output)
break
fp = open(predictions_output_path, "w")
fp.write(json.dumps(predictions))
......
......@@ -7,7 +7,9 @@ import glob
import os
import traceback
from PIL import Image
import aicrowd_helpers
use_aicrowd_helpers = True
if use_aicrowd_helpers:
import aicrowd_helpers
# from eval import evaluate
from api_ml_bc.aicrowd_bridge import evaluate
......@@ -113,12 +115,12 @@ def gather_input_output_path():
return test_images_path, predictions_output_path
def run():
########################################################################
# Register Prediction Start
########################################################################
aicrowd_helpers.execution_start()
if use_aicrowd_helpers:
aicrowd_helpers.execution_start()
########################################################################
# Gather Input and Output paths from environment variables
......@@ -137,9 +139,10 @@ def run():
########################################################################
# Register Prediction Complete
########################################################################
aicrowd_helpers.execution_success({
"predictions_output_path" : predictions_output_path
})
if use_aicrowd_helpers:
aicrowd_helpers.execution_success({
"predictions_output_path" : predictions_output_path
})
if __name__ == "__main__":
try:
......@@ -147,4 +150,5 @@ if __name__ == "__main__":
except Exception as e:
error = traceback.format_exc()
print(error)
###aicrowd_helpers.execution_error(error)
\ No newline at end of file
if use_aicrowd_helpers:
aicrowd_helpers.execution_error(error)
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment