Skip to content

Commit

Permalink
Merge pull request #234 from openclimatefix/fix-uk-site-model
Browse files Browse the repository at this point in the history
Fix uk site model
  • Loading branch information
peterdudfield authored Dec 9, 2024
2 parents e2f759a + f676cc4 commit b9bb6c2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/pvsite_forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,11 @@ def pvsite_forecast_page():
site_uuid=site_selection_uuid,
)

if len(ml_models) == 0:
class Models:
name = None
ml_models = [Models()]

ys = {}
xs = {}
for model in ml_models:
Expand Down Expand Up @@ -354,6 +359,9 @@ def convert_df(df: pd.DataFrame):
# round all columns to 3 decimal places
metrics = metrics.round(3)

# model name is None change to "None"
metrics["model_name"] = metrics["model_name"].fillna("None")

# make mode_name the columns by pivoting, and make the index the other columns
value_columns = one_metric_data.keys()
value_columns = [i for i in value_columns if i != "model_name"]
Expand Down

0 comments on commit b9bb6c2

Please sign in to comment.