Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Fix checkpointing bug in tabular forecasting #995

Merged
merged 3 commits into from
Nov 23, 2021

Conversation

ethanwharris
Copy link
Collaborator

@ethanwharris ethanwharris commented Nov 23, 2021

What does this PR do?

The parameters are needed to restore the checkpoint, but pandas data frames can't be pickled in some versions of pandas. This PR changes it to store the first row of data as a dict (inherently serializable) rather than a dataframe.

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests? [not needed for typos/docs]
  • Did you verify new and existing tests pass locally with your changes?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

PR review

  • Is this pull request ready for review? (if not, please submit in draft mode)

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@ethanwharris ethanwharris added the bug / fix Something isn't working label Nov 23, 2021
Copy link
Member

@Borda Borda left a comment

Choose a reason for hiding this comment

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

do we have a test for this case?

@codecov
Copy link

codecov bot commented Nov 23, 2021

Codecov Report

Merging #995 (752037e) into master (19cf911) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #995   +/-   ##
=======================================
  Coverage   88.40%   88.40%           
=======================================
  Files         250      250           
  Lines       13199    13199           
=======================================
  Hits        11668    11668           
  Misses       1531     1531           
Flag Coverage Δ
unittests 88.40% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...h/core/integrations/pytorch_forecasting/adapter.py 91.66% <100.00%> (ø)
flash/tabular/forecasting/data.py 94.82% <100.00%> (ø)
flash/tabular/forecasting/model.py 81.81% <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 19cf911...752037e. Read the comment docs.

@ethanwharris ethanwharris merged commit 5f11d8f into master Nov 23, 2021
@ethanwharris ethanwharris deleted the bugfix/tabular_forecasting_checkpoints branch November 23, 2021 22:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug / fix Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants