Fix why satellite data wasnt checked
The fix is to use hasattr not in
Small code that shows bug
from pvnet.models.base_model import BaseModel as PVNetBaseModel
from ocf_datapipes.config.load import load_yaml_configuration
name = "openclimatefix/pvnet_uk_region"
version = "aa73cdafd1db8df3c8b7f5ecfdb160989e7639ac"
data_config_filename = PVNetBaseModel.get_data_config(name, version)
data_config = load_yaml_configuration(data_config_filename)
assert "satellite" in data_config.input_data # this doesnt work
assert hasattr(data_config.input_data, "satellite") # this does
Pull Request
Description
Fix why satellite data wasnt checked The fix is to use
hasattr
notin
Small code that shows bug
How Has This Been Tested?
Added a test and checked it failed with old code
Checklist: