Skip to content

Commit

Permalink
Issue/round 2 (#69)
Browse files Browse the repository at this point in the history
* round t 2 d.p

* lint
  • Loading branch information
peterdudfield authored Aug 22, 2023
1 parent 6601cf7 commit 737217e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions forecast-inference/forecast_inference/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@

import click
import dotenv
from psp.models.base import PvSiteModel
from psp.typings import PvId, Timestamp, X
from pvsite_datamodel.connection import DatabaseConnection
from pvsite_datamodel.sqlmodels import ForecastSQL, ForecastValueSQL

import numpy as np
from forecast_inference.data.pv_data_sources import DbPvDataSource
from forecast_inference.utils.config import load_config
from forecast_inference.utils.imports import import_from_module
from forecast_inference.utils.profiling import profile
from psp.models.base import PvSiteModel
from psp.typings import PvId, Timestamp, X
from pvsite_datamodel.connection import DatabaseConnection
from pvsite_datamodel.sqlmodels import ForecastSQL, ForecastValueSQL

_log = logging.getLogger(__name__)

Expand Down Expand Up @@ -56,7 +56,7 @@ def _run_model_and_save_for_one_pv(
dict(
start_utc=timestamp + dt.timedelta(minutes=start),
end_utc=timestamp + dt.timedelta(minutes=end),
forecast_power_kw=value,
forecast_power_kw=np.round(value, 2),
horizon_minutes=start,
)
for (start, end), value in zip(model.config.horizons, pred.powers)
Expand Down

0 comments on commit 737217e

Please sign in to comment.