NVE / avalanche_ml

Applying machine learning in the Norwegian Avalanche warning Service
MIT License
2 stars 1 forks source link

Enable fetching single dates without caching #22

Closed widforss closed 3 years ago

widforss commented 3 years ago

We want to be able to fetch a single date, without checking if the date exists in the caches, since we want the data that is online right now. To do this a secondary constructor is defined for ForecastDataset, the .date() static method.

Using this constructor, we can fetch data for dates without a valid forecast as well. This will lead to a special LabeledData with .label set to None.

Also fixes a bug where the cache of regobs was specific to a set of regobs types, and if a new set of types was requested, the cache content was returned instead of the requested data.

Makes the import of varsomdata python library independent of the current working directory.

When pulling this, one may need to run git submodule update as varsomdata is updated as well, with dates and regions for the new season.