You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After the benchmark finishes running, the predicted values and target values are saved in the result file. For example, if you set --save-path "your_result_path", the result file will be located at /result/your_result_path.
The result file is in .tar.gz format. You need to extract this file to access the results.
The predicted values are stored in the "inference_data" column, while the target values are in the "actual_data" column. However, you may notice that they appear as garbled code because they are encoded in base64. You can use the function below to get the decoded predicted and target values.
importbase64importpickleimportnumpyasnpimportpandasaspddefdecode_data(filepath: str) ->pd.DataFrame:
""" Load the result file, decode base64-encoded inference and actual data columns. :param filepath: The path to the result data. :return: The decoded data. """data=pd.read_csv(filepath)
forindex, rowindata.iterrows():
decoded_inference_data=base64.b64decode(row["inference_data"])
decoded_actual_data=base64.b64decode(row["actual_data"])
data.at[index, "inference_data"] =pickle.loads(decoded_inference_data)
data.at[index, "actual_data"] =pickle.loads(decoded_actual_data)
returndata'''If you want to save the decoded data as a CSV file. Please follow the steps below.your_result_path = r"your_result_path/your_result.csv"decoded_result = decode_data(your_result_path)pd.set_option('display.width', None) # Avoid ellipses in the data.np.set_printoptions(threshold=np.inf) # Avoid ellipses in the data.decoded_result.to_csv("decoded_result.csv", index=None)'''