Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 13, 2024
1 parent 4ab9ad3 commit a6e72f3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions ocf_datapipes/config/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,11 @@ class Satellite(DataSourceMixin, TimeResolutionMixin, DropoutMixin):
description="The temporal resolution (in minutes) of the data."
"Note that this needs to be divisible by 5.",
)
satellite_scaling_methods: Optional[List[str]] = Field(['mean_std'],
description='There are few ways to scale the satellite data. '
'1. None, 2. mean_std, 3. min_max')
satellite_scaling_methods: Optional[List[str]] = Field(
["mean_std"],
description="There are few ways to scale the satellite data. "
"1. None, 2. mean_std, 3. min_max",
)


class HRVSatellite(DataSourceMixin, TimeResolutionMixin, DropoutMixin):
Expand Down
6 changes: 3 additions & 3 deletions ocf_datapipes/training/pvnet_site.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
NWP_MEANS,
NWP_STDS,
RSS_MEAN,
RSS_STD,
RSS_RAW_MAX,
RSS_RAW_MIN,
RSS_STD,
)
from ocf_datapipes.utils.utils import (
combine_to_single_dataset,
Expand Down Expand Up @@ -276,9 +276,9 @@ def construct_sliced_data_pipeline(
roi_width_pixels=conf_sat.satellite_image_size_pixels_width,
)
scaling_methods = conf_sat.satellite_scaling_methods
if 'min_max' in scaling_methods:
if "min_max" in scaling_methods:
sat_datapipe = sat_datapipe.normalize(min_values=RSS_RAW_MIN, max_values=RSS_RAW_MAX)
if 'mean_std':
if "mean_std":
sat_datapipe = sat_datapipe.normalize(mean=RSS_MEAN, std=RSS_STD)

if "pv" in datapipes_dict:
Expand Down

0 comments on commit a6e72f3

Please sign in to comment.