Skip to content

Commit

Permalink
Address some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbieker committed Feb 5, 2024
1 parent 922d58e commit af03922
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 76 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,3 @@ dmypy.json

# Pyre type checker
.pyre/
configs/datamodule/configuration/leonardo_wind_configuration.yaml
17 changes: 9 additions & 8 deletions configs.example/model/wind_multimodal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ output_quantiles: [0.02, 0.1, 0.25, 0.5, 0.75, 0.9, 0.98]
#--------------------------------------------
# NWP encoder
#--------------------------------------------
nwp_encoders_dict:
ecmwf:
_target_: pvnet.models.multimodal.encoders.encoders3d.DefaultPVNet
_partial_: True
in_channels: 14
out_features: 256
number_of_conv3d_layers: 6
conv3d_channels: 32
image_size_pixels: 16

nwp_encoder:
_target_: pvnet.models.multimodal.encoders.encoders3d.DefaultPVNet
_partial_: True
in_channels: 14
out_features: 256
number_of_conv3d_layers: 6
conv3d_channels: 32
image_size_pixels: 16

#--------------------------------------------
# Sensor encoder settings
Expand Down
47 changes: 0 additions & 47 deletions configs/datamodule/configuration/leonardo_wind_configuration.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions configs/datamodule/ocf_datapipes.yaml

This file was deleted.

7 changes: 2 additions & 5 deletions pvnet/models/multimodal/multimodal.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ def __init__(
add_image_embedding_channel: bool = False,
include_gsp_yield_history: bool = True,
include_sun: bool = True,
include_gsp: bool = True,
embedding_dim: Optional[int] = 16,
forecast_minutes: int = 30,
history_minutes: int = 60,
Expand Down Expand Up @@ -108,7 +107,6 @@ def __init__(
interval_minutes: The interval between each sample of the target data
wind_encoder: Encoder for wind data
wind_history_minutes: Length of recent wind data used as input.
include_gsp: Whether to include GSP data in the model
pv_interval_minutes: The interval between each sample of the PV data
sat_interval_minutes: The interval between each sample of the satellite data
sensor_interval_minutes: The interval between each sample of the sensor data
Expand All @@ -119,7 +117,6 @@ def __init__(
self.include_nwp = nwp_encoders_dict is not None and len(nwp_encoders_dict) != 0
self.include_pv = pv_encoder is not None
self.include_sun = include_sun
self.include_gsp = include_gsp
self.include_wind = wind_encoder is not None
self.include_sensor = sensor_encoder is not None
self.embedding_dim = embedding_dim
Expand Down Expand Up @@ -210,7 +207,7 @@ def __init__(
if wind_history_minutes is None:
wind_history_minutes = history_minutes

self.wind_encoder = wind_encoder(sequence_length=self.history_len_30)
self.wind_encoder = wind_encoder(sequence_length=wind_history_minutes // interval_minutes)

# Update num features
fusion_input_features += self.wind_encoder.out_features
Expand All @@ -219,7 +216,7 @@ def __init__(
if sensor_history_minutes is None:
sensor_history_minutes = history_minutes

self.sensor_encoder = sensor_encoder(sequence_length=self.history_len_30)
self.sensor_encoder = sensor_encoder(sequence_length=sensor_history_minutes // sensor_interval_minutes)

# Update num features
fusion_input_features += self.sensor_encoder.out_features
Expand Down

0 comments on commit af03922

Please sign in to comment.