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] Convert timezones to UTC by default #1085

Merged
merged 6 commits into from
Feb 23, 2023

Conversation

christymctse
Copy link
Collaborator

🔬 Background

🔮 Key changes

  • Adding UTC as true in the parameter to convert timezone to UTC timestamp
  • Removed warning which stated that NP is not supporting timezone specified dataset

📋 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.

@codecov-commenter
Copy link

codecov-commenter commented Dec 23, 2022

Codecov Report

Merging #1085 (47ee3cb) into main (544a420) will not change coverage.
The diff coverage is 50.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@           Coverage Diff           @@
##             main    #1085   +/-   ##
=======================================
  Coverage   90.18%   90.18%           
=======================================
  Files          36       36           
  Lines        5066     5066           
=======================================
  Hits         4569     4569           
  Misses        497      497           
Impacted Files Coverage Δ
neuralprophet/df_utils.py 94.52% <50.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Collaborator

@noxan noxan left a comment

Choose a reason for hiding this comment

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

While testing with the energy dataset I receive the following issue:

AttributeError                            Traceback (most recent call last)
/var/folders/h5/r0lsf_xx0dgf0y4_7tyr6zx80000gn/T/ipykernel_55050/2978023471.py in <module>
      4 )
      5 
----> 6 metrics = m.fit(df)
      7 
      8 forecast = m.predict(df)

neural_prophet/neuralprophet/forecaster.py in fit(self, df, freq, validation_df, epochs, batch_size, learning_rate, early_stopping, minimal, metrics, progress, checkpointing, continue_training, num_workers)
...
    504             return PeriodProperties(data, orig)
    505 
--> 506         raise AttributeError("Can only use .dt accessor with datetimelike values")

AttributeError: Can only use .dt accessor with datetimelike values

@noxan
Copy link
Collaborator

noxan commented Jan 9, 2023

Would also be great to have the new code in place where the old code was, so that all checks and transformations on the ds column are in the same place.

@noxan noxan added the status: needs update PR has outstanding comment(s) or PR test(s) that need to be resolved label Jan 28, 2023
@ourownstory
Copy link
Owner

@christymctse What's the status on this?

@christymctse
Copy link
Collaborator Author

@christymctse What's the status on this?

Will be working on this next week

@christymctse
Copy link
Collaborator Author

@noxan @ourownstory, sorry about get back late
Just fixed the bug and it should be working fine on the energy dataset now

@ourownstory
Copy link
Owner

@noxan Can you please give this another review to check whether it is ready for merge? Thank you!

@ourownstory ourownstory added the priority:P3 Low priority label Feb 22, 2023
Copy link
Collaborator

@noxan noxan left a comment

Choose a reason for hiding this comment

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

Thanks @christymctse for the adjustments, it works for me now - good job 👍

@noxan noxan changed the title convert timezone to utc [Minor] Convert timezones to UTC by default Feb 23, 2023
@noxan noxan merged commit 89f6d82 into ourownstory:main Feb 23, 2023
@github-actions
Copy link

Model Benchmark

Benchmark Metric main current diff
YosemiteTemps MAE_val 1.72948 1.72949 0.0%
YosemiteTemps RMSE_val 2.27386 2.27386 0.0%
YosemiteTemps Loss_val 0.00096 0.00096 0.0%
YosemiteTemps MAE 1.45189 1.45189 0.0%
YosemiteTemps RMSE 2.16631 2.16631 0.0%
YosemiteTemps Loss 0.00066 0.00066 0.0%
YosemiteTemps time 130.273 100.44 -22.9% 🎉
AirPassengers MAE_val 15.4077 15.4077 -0.0%
AirPassengers RMSE_val 19.5099 19.5099 -0.0%
AirPassengers Loss_val 0.00196 0.00196 -0.0%
AirPassengers MAE 9.86947 9.86947 0.0%
AirPassengers RMSE 11.7222 11.7222 0.0%
AirPassengers Loss 0.00057 0.00057 0.0%
AirPassengers time 5.50433 4.34 -21.15% 🎉
PeytonManning MAE_val 0.64636 0.64636 0.0%
PeytonManning RMSE_val 0.79276 0.79276 0.0%
PeytonManning Loss_val 0.01494 0.01494 0.0%
PeytonManning MAE 0.42701 0.42701 0.0%
PeytonManning RMSE 0.57032 0.57032 0.0%
PeytonManning Loss 0.00635 0.00635 0.0%
PeytonManning time 16.0501 12.48 -22.24% 🎉
Model training plots

Model Training

PeytonManning

YosemiteTemps

AirPassengers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:P3 Low priority status: needs update PR has outstanding comment(s) or PR test(s) that need to be resolved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants