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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug-fix] Refactor warning about global normalization to forecaster.py #1109

Merged
merged 2 commits into from Jan 13, 2023

Conversation

judussoari
Copy link
Collaborator

馃敩 Background

Fixes #1053
This code portion produced a warning on every single training step, which leads to huge, unnecessary log output.

if not self.config_normalization.global_normalization:
     log.warning("When Global modeling with local normalization, metrics are displayed in normalized scale.")
else:
     ...

馃敭 Key changes

Moved the warning to m.fit()

馃搵 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.

@judussoari judussoari added bug Something isn't working status: needs review PR needs to be reviewed by Reviewer(s) labels Jan 11, 2023
@judussoari judussoari added this to the Release 0.5.1 milestone Jan 11, 2023
@judussoari judussoari self-assigned this Jan 11, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jan 11, 2023

Codecov Report

Merging #1109 (bbdb8bf) into main (ebbe06a) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1109   +/-   ##
=======================================
  Coverage   90.14%   90.14%           
=======================================
  Files          21       21           
  Lines        4799     4800    +1     
=======================================
+ Hits         4326     4327    +1     
  Misses        473      473           
Impacted Files Coverage 螖
neuralprophet/forecaster.py 87.89% <100.00%> (+0.02%) 猬嗭笍
neuralprophet/time_net.py 90.78% <100.00%> (-0.02%) 猬囷笍

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

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.

Great, thank you!

@ourownstory ourownstory merged commit 05d5e10 into main Jan 13, 2023
@ourownstory ourownstory deleted the log_warnings_global branch January 13, 2023 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working status: needs review PR needs to be reviewed by Reviewer(s)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Global-local warning logged every training batch
3 participants