Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[minor] add subdivisions to holidays #1584

Merged
merged 16 commits into from
Jun 21, 2024

Conversation

MaiBe-ctrl
Copy link
Collaborator

🔬 Background

🔮 Key changes

  • Explain the main changes introduced by this pull request for the reviewer.

📋 Review Checklist

  • I have performed a self-review of my own code.
  • I have commented my code, added docstrings and data types to function definitions.
  • I have added pytests to check whether my feature / fix works.

Please make sure to follow our best practices in the Contributing guidelines.

@MaiBe-ctrl
Copy link
Collaborator Author

chnage the country parameter to accept a dict or str to list and omit the new added parameter!

Copy link
Owner

@ourownstory ourownstory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merge get_country_holidays into get_holidays_from_country and move to hdays_utils

Copy link
Owner

@ourownstory ourownstory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good overall! I just suggest to move the get_holidays_from_country to hday_utils.py

self.holiday_names = utils.get_holidays_from_country(self.country, df)
self.holiday_names = self.get_holidays_from_country(self.country, df)

def get_holidays_from_country(self, country: Union[str, Iterable[str], dict], df=None):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self does not appear to be accessed in this method. I think we can safely move it to hdays_utils.py.

@ourownstory
Copy link
Owner

@MaiBe-ctrl Looks like you missed one utility function that was in time_dataset.py. I moved it to hday_utils.py. It was also not supporting subdivisions, so I added support for that, too. There is a lot of simplification potential to reduce the code in hday_utils.py, but we can leave that for the refactoring post-JIT.

Copy link
Owner

@ourownstory ourownstory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to merge once tests pass.

@MaiBe-ctrl MaiBe-ctrl merged commit 79ea9cd into ourownstory:main Jun 21, 2024
6 of 10 checks passed
@MaiBe-ctrl MaiBe-ctrl deleted the feature/1574-add-subdivisions branch June 21, 2024 00:31
Copy link

Model Benchmark

Benchmark Metric main current diff
PeytonManning MAE_val 0.34955 0.34955 0.0%
PeytonManning RMSE_val 0.50049 0.50049 0.0%
PeytonManning Loss_val 0.01771 0.01771 0.0%
PeytonManning MAE 0.34653 0.34653 0.0%
PeytonManning RMSE 0.49312 0.49312 0.0%
PeytonManning Loss 0.01464 0.01464 0.0%
PeytonManning time 14.7847 14.99 1.39%
AirPassengers MAE_val 30.6285 30.6285 0.0%
AirPassengers RMSE_val 31.5254 31.5254 0.0%
AirPassengers Loss_val 0.01277 0.01277 0.0%
AirPassengers MAE 6.16861 6.16861 0.0%
AirPassengers RMSE 7.85225 7.85225 0.0%
AirPassengers Loss 0.00065 0.00065 0.0%
AirPassengers time 9.24684 9.56 3.39% ⚠️
EnergyPriceDaily MAE_val 5.41157 5.41157 0.0%
EnergyPriceDaily RMSE_val 6.71538 6.71538 0.0%
EnergyPriceDaily Loss_val 0.02525 0.02525 0.0%
EnergyPriceDaily MAE 5.94936 5.94936 0.0%
EnergyPriceDaily RMSE 7.9833 7.9833 0.0%
EnergyPriceDaily Loss 0.02579 0.02579 0.0%
EnergyPriceDaily time 18.5817 18.47 -0.6%
YosemiteTemps MAE_val 0.56412 0.56412 0.0%
YosemiteTemps RMSE_val 0.83161 0.83161 0.0%
YosemiteTemps Loss_val 0.0004 0.0004 0.0%
YosemiteTemps MAE 0.98449 0.98449 0.0%
YosemiteTemps RMSE 1.75389 1.75389 0.0%
YosemiteTemps Loss 0.00132 0.00132 0.0%
YosemiteTemps time 39.8691 40.32 1.13%
\nModel training plots\n ## Model Training ### PeytonManning ![](https://asset.cml.dev/2674ed6eab06459d7904c5c6cdde50d02d1f0e43?cml=svg%2Bxml&cache-bypass=6eda5fb2-52dd-4d80-82d8-61388df583ce) ### YosemiteTemps ![](https://asset.cml.dev/80fd97c7b893476c67bf2022ad814bd7a52967b5?cml=svg%2Bxml&cache-bypass=67c5a318-a1a1-48d4-80b4-4170bc3081ac) ### AirPassengers ![](https://asset.cml.dev/85d0a8e9bd99f47bb431fadc7d312cb231fc02fe?cml=svg%2Bxml&cache-bypass=86afacde-0c16-4e29-af0d-87c876f2cd01) ### EnergyPriceDaily ![](https://asset.cml.dev/7ef5cc5693f75daaf6d7541b804c3711f76b8dd3?cml=svg%2Bxml&cache-bypass=c0ee71af-9aca-47fc-8139-2646d135a6af) \n

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add_country_holidays is missing subdivisions
2 participants