diff --git a/script/generate-mlperf-inference-submission/customize.py b/script/generate-mlperf-inference-submission/customize.py index 9bbe9b2d0..277b52933 100644 --- a/script/generate-mlperf-inference-submission/customize.py +++ b/script/generate-mlperf-inference-submission/customize.py @@ -553,9 +553,17 @@ def generate_submission(env, state, inp, submission_division): shutil.copy(measurements_json_path, destination) else: - if mode.lower() == "performance": - return { - "return": 1, "error": f"measurements.json missing in both paths: {measurements_json_path} and {os.path.join(result_scenario_path, 'user.conf')}"} + print( + f"Warning: measurements.json file not present, creating a dummy measurements.json in path {measurements_json_path}") + dummy_measurements_data = { + "input_data_types": env['MLC_ML_MODEL_INPUTS_DATA_TYPE'] if env.get('MLC_ML_MODEL_INPUTS_DATA_TYPE') else "TBD", + "retraining": env['MLC_ML_MODEL_RETRAINING'] if env.get('MLC_ML_MODEL_RETRAINING') else "TBD", + "starting_weights_filename": env['MLC_ML_MODEL_STARTING_WEIGHTS_FILENAME'] if env.get('MLC_ML_MODEL_STARTING_WEIGHTS_FILENAME') else "TBD", + "weight_data_types": env['MLC_ML_MODEL_WEIGHTS_DATA_TYPE'] if env.get('MLC_ML_MODEL_WEIGHTS_DATA_TYPE') else "TBD", + "weight_transformations": env['MLC_ML_MODEL_WEIGHT_TRANSFORMATIONS'] if env.get('MLC_ML_MODEL_WEIGHT_TRANSFORMATIONS') else "TBD" + } + with open(measurements_json_path, 'w') as json_file: + json.dump(data, json_file, indent=4) files = [] readme = False