Skip to content

[BUG] Check pytorch-forecasting models with freq > "1D" #463

Merged
merged 4 commits into from
Jan 25, 2022
Merged

Conversation

martins0n
Copy link
Contributor

@martins0n martins0n commented Jan 24, 2022

IMPORTANT: Please do not create a Pull Request without creating an issue first.

Before submitting (must do checklist)

  • Did you read the contribution guide?
  • Did you update the docs? We use Numpy format for all the methods and classes.
  • Did you write any new necessary tests?
  • Did you update the CHANGELOG?

Type of Change

  • Examples / docs / tutorials / contributors update
  • Bug fix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves an existing feature)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Proposed Changes

Related Issue

Closing issues

closes #452

@martins0n martins0n changed the title Issue 452 [BUG] Check pytorch-forecasting models with freq > "1D" Jan 24, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jan 24, 2022

Codecov Report

Merging #463 (d900c5c) into master (ded5161) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #463   +/-   ##
=======================================
  Coverage   87.98%   87.98%           
=======================================
  Files         115      115           
  Lines        5441     5441           
=======================================
  Hits         4787     4787           
  Misses        654      654           
Impacted Files Coverage Δ
etna/transforms/nn/pytorch_forecasting.py 95.23% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ded5161...d900c5c. Read the comment docs.

Copy link
Contributor

@iKintosh iKintosh left a comment

Choose a reason for hiding this comment

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

One detail confuses me. But I guess that's because I don't know something about PF.

# making time_idx feature.
# it's needed for pytorch-forecasting for proper train-test split.
# it should be incremented by 1 for every new timestamp.
df_flat["time_idx"] = (df_flat["timestamp"] - self.min_timestamp) // pd.Timedelta("1s")
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need to keep only remainder of the division?

Copy link
Contributor Author

@martins0n martins0n Jan 25, 2022

Choose a reason for hiding this comment

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

It's just casting timestamp delta to integer.

@martins0n martins0n merged commit 70c5fac into master Jan 25, 2022
@martins0n martins0n deleted the issue-452 branch January 25, 2022 07:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Check pytorch-forecasting models with freq > "1D"
3 participants