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

warn user if suspicion of wrong index in from_group_dataframe() #1628

Merged
merged 5 commits into from
Mar 11, 2023

Conversation

dennisbader
Copy link
Collaborator

Fixes #1607.

@dennisbader dennisbader requested a review from hrzn as a code owner March 7, 2023 16:12
@codecov-commenter
Copy link

codecov-commenter commented Mar 7, 2023

Codecov Report

Patch coverage: 50.00% and project coverage change: -0.09 ⚠️

Comparison is base (fdc5a31) 94.13% compared to head (5352453) 94.04%.

📣 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

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1628      +/-   ##
==========================================
- Coverage   94.13%   94.04%   -0.09%     
==========================================
  Files         125      125              
  Lines       11306    11294      -12     
==========================================
- Hits        10643    10622      -21     
- Misses        663      672       +9     
Impacted Files Coverage Δ
darts/timeseries.py 92.21% <50.00%> (-0.29%) ⬇️

... and 8 files with indirect coverage changes

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

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@madtoinou madtoinou left a comment

Choose a reason for hiding this comment

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

Minor comment about the phrasing, to make it even more obvious to the user that a monotonically increasing time index for the whole DataFrame is potentially not what they expect/want.

if time_col is None and df.index.is_monotonic_increasing:
logger.warning(
"UserWarning: `time_col` was not set and `df` has a monotonically increasing (time) index. You can "
"ignore this warning if the index represents the actual index of each individual time series group."
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would maybe add something between parentheses saying that a monotonically increasing time index in this context means that the groups have non-overlapping (time) index.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

👍

@dennisbader dennisbader requested review from madtoinou and removed request for hrzn March 11, 2023 11:33
@dennisbader dennisbader merged commit 301122e into master Mar 11, 2023
@dennisbader dennisbader deleted the fix/from_group_dataframe_warning branch March 11, 2023 12:39
alexcolpitts96 pushed a commit to alexcolpitts96/darts that referenced this pull request May 31, 2023
…8co#1628)

* warn user if suspicion of wrong index in TimeSeries.from_group_dataframe()

* imroved warning message

---------

Co-authored-by: madtoinou <32447896+madtoinou@users.noreply.github.com>
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.

Raise warning in from_group_dataframe() for monotonically increasing index.
3 participants