Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdudfield committed Nov 25, 2024
1 parent ad5fab6 commit d68d494
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/india_api/internal/inputs/indiadb/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def get_predicted_power_production_for_location(
site = sites[0]

if site.ml_model is not None:
ml_model_name = site.ml_model.model_name
ml_model_name = site.ml_model.name
log.info(f"Using ml model {ml_model_name}")

# read actual generations
Expand Down Expand Up @@ -294,7 +294,7 @@ def get_site_forecast(self, site_uuid: str, email: str) -> list[internal.Predict
# get site and the get the ml model name
site = get_site_by_uuid(session=session, site_uuid=site_uuid)
if site.ml_model is not None:
ml_model_name = site.ml_model.model_name
ml_model_name = site.ml_model.name
log.info(f"Using ml model {ml_model_name}")

if isinstance(site_uuid, str):
Expand Down
1 change: 1 addition & 0 deletions src/india_api/internal/inputs/indiadb/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ def make_fake_forecast_values(db_session, sites, model_name):
horizon_minutes=horizon,
)
forecast_value.ml_model = ml_model
site.ml_model = ml_model

forecast_values.append(forecast_value)

Expand Down

0 comments on commit d68d494

Please sign in to comment.