diff --git a/valhub/submissions/views.py b/valhub/submissions/views.py index c0952bd1..8d1863df 100644 --- a/valhub/submissions/views.py +++ b/valhub/submissions/views.py @@ -267,7 +267,7 @@ def update_submission_result(request: Request, submission_id: str): return Response(response_data, status=status.HTTP_400_BAD_REQUEST) required_fields = [ - "mean_run_time", + "mean_runtime", "function_parameters", "metrics", ] @@ -283,7 +283,7 @@ def update_submission_result(request: Request, submission_id: str): return Response(response_data, status=status.HTTP_400_BAD_REQUEST) logging.info(f"results = {results}") - submission.mrt = float(results["mean_run_time"]) + submission.mrt = float(results["mean_runtime"]) submission.data_requirements = results["function_parameters"] submission.result = results["metrics"] try: diff --git a/workers/src/pvinsight-validation-runner.py b/workers/src/pvinsight-validation-runner.py index f24f775f..762cdbbd 100644 --- a/workers/src/pvinsight-validation-runner.py +++ b/workers/src/pvinsight-validation-runner.py @@ -552,8 +552,8 @@ def run( # noqa: C901 public_metrics_dict["module"] = module_name # Get the mean and median run times - public_metrics_dict["mean_run_time"] = results_df["run_time"].mean() - public_metrics_dict["median_run_time"] = results_df["run_time"].median() + public_metrics_dict["mean_runtime"] = results_df["runtime"].mean() + public_metrics_dict["median_runtime"] = results_df["runtime"].median() public_metrics_dict["function_parameters"] = [ "time_series", *config_data["allowable_kwargs"], @@ -628,7 +628,7 @@ def m_median(df: pd.DataFrame, column: str): for val in config_data["ground_truth_compare"]: if metric == "runtime": - key = "run_time" + key = "runtime" else: key = f"{metric}_{val}" @@ -643,7 +643,7 @@ def m_median(df: pd.DataFrame, column: str): metric_result = operation_function(results_df, key) - metric_result_dict = {f"{operation}_{key}": metric_result} + metric_result_dict = {f"{operation}_{metric}": metric_result} metrics_dict.update(metric_result_dict) public_metrics_dict["metrics"] = metrics_dict