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

feat: ProphetModelDataset #720

Merged
merged 19 commits into from
Sep 27, 2024
Merged

feat: ProphetModelDataset #720

merged 19 commits into from
Sep 27, 2024

Conversation

galenseilis
Copy link
Contributor

Description

This PR was created to add Meta's (formerly Facebook's) Prophet model. It is a probabilistic modelling for time series forecasting.

Development notes

The Prophet module provides functions for serializing and deserializing models to/from JSON. Beyond that the behaviour is intended to be the same as the JSONDataset. I have subclassed from JSONDataset and overrode the _load and _save methods to use Prophet's serialization during these methods.

I have tried to emulate the tests for JSONDataset, but with a code duplicate for a trained Prophet model instead of a test file.

Checklist

  • Opened this PR as a 'Draft Pull Request' if it is work-in-progress
  • Updated the documentation to reflect the code changes
  • Added a description of this change in the relevant RELEASE.md file
  • Added tests to cover my changes

@galenseilis galenseilis changed the title Draft Pull Request - ProphetModelDataset Draft Pull Request Jun 8, 2024
@galenseilis galenseilis marked this pull request as draft June 8, 2024 02:30
@galenseilis galenseilis changed the title Draft Pull Request ProphetModelDataset Jun 8, 2024
@galenseilis galenseilis changed the title ProphetModelDataset feat: ProphetModelDataset Jun 8, 2024
@merelcht
Copy link
Member

Hi @galenseilis, thanks for the PR. I think this would be a great candidate to go in as an experimental dataset . This relaxes the requirements for tests. How does that sound?

@galenseilis
Copy link
Contributor Author

Hi @galenseilis, thanks for the PR. I think this would be a great candidate to go in as an experimental dataset . This relaxes the requirements for tests. How does that sound?

Sounds good to me!

@merelcht
Copy link
Member

Great! @galenseilis are you okay moving it to the experimental directory yourself or do you want me to jump in and make the PR ready for review?

@galenseilis
Copy link
Contributor Author

Great! @galenseilis are you okay moving it to the experimental directory yourself or do you want me to jump in and make the PR ready for review?

Hi @merelcht , I would appreciate it if you would jump in to make the PR ready for review. My apologies for any inconvenience.

@merelcht
Copy link
Member

@galenseilis no worries, happy to help!

Signed-off-by: Merel Theisen <[email protected]>
Signed-off-by: Merel Theisen <[email protected]>
Signed-off-by: Merel Theisen <[email protected]>
Signed-off-by: Merel Theisen <[email protected]>
@merelcht
Copy link
Member

@galenseilis, I've made all changes required. I've updated the tests and docstrings. The rest are mostly docs build and linting changes. Let me know if all looks good and I'll ask the team to review 🙂

@merelcht merelcht marked this pull request as ready for review August 28, 2024 08:23
@ankatiyar ankatiyar self-requested a review September 26, 2024 11:33
Copy link
Contributor

@ElenaKhaustova ElenaKhaustova left a comment

Choose a reason for hiding this comment

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

Thank you @galenseilis for the contribution and @merelcht for polishing it!

I left one nit comment but the implementation LGTM.

I approve the PR but as far as I understand it is blocked by #850 now, so we need to resolve it first.

Signed-off-by: Ankita Katiyar <[email protected]>
Signed-off-by: Ankita Katiyar <[email protected]>
Signed-off-by: Ankita Katiyar <[email protected]>
Copy link
Contributor

@ankatiyar ankatiyar left a comment

Choose a reason for hiding this comment

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

Thanks @galenseilis, I took the liberty to add this to the release notes and fixed bandit related security stuff! Happy to get this in for the next release!

@ankatiyar ankatiyar enabled auto-merge (squash) September 27, 2024 14:05
@ankatiyar ankatiyar merged commit 970862b into kedro-org:main Sep 27, 2024
14 checks passed
harm-matthias-harms pushed a commit to harm-matthias-harms/kedro-plugins that referenced this pull request Oct 1, 2024
* Added dataset and tests for Facebook's Prophet model

* Removed in-path example.

* Added prophet as optional dependency in toml

* Added prophet as testing dependency

* Update docstring to have a doctest example with example data

Signed-off-by: galenseilis <[email protected]>

* Try without assert

* Move ProphetModelDataset to experimental datasets

Signed-off-by: Merel Theisen <[email protected]>

* Move test fixtures + fix imports

Signed-off-by: Merel Theisen <[email protected]>

* Fix prophet docstring and tests

Signed-off-by: Merel Theisen <[email protected]>

* Fix lint

Signed-off-by: Merel Theisen <[email protected]>

* Fix docs

Signed-off-by: Merel Theisen <[email protected]>

* Fix docs

Signed-off-by: Merel Theisen <[email protected]>

* Bandit

Signed-off-by: Ankita Katiyar <[email protected]>

* Add nosec instead

Signed-off-by: Ankita Katiyar <[email protected]>

* Add to release notes

Signed-off-by: Ankita Katiyar <[email protected]>

---------

Signed-off-by: galenseilis <[email protected]>
Signed-off-by: Merel Theisen <[email protected]>
Signed-off-by: Ankita Katiyar <[email protected]>
Co-authored-by: Merel Theisen <[email protected]>
Co-authored-by: Merel Theisen <[email protected]>
Co-authored-by: Ankita Katiyar <[email protected]>
Co-authored-by: Ankita Katiyar <[email protected]>
Signed-off-by: Harm Matthias Harms <[email protected]>
MinuraPunchihewa pushed a commit to MinuraPunchihewa/kedro-plugins that referenced this pull request Oct 1, 2024
* Added dataset and tests for Facebook's Prophet model

* Removed in-path example.

* Added prophet as optional dependency in toml

* Added prophet as testing dependency

* Update docstring to have a doctest example with example data

Signed-off-by: galenseilis <[email protected]>

* Try without assert

* Move ProphetModelDataset to experimental datasets

Signed-off-by: Merel Theisen <[email protected]>

* Move test fixtures + fix imports

Signed-off-by: Merel Theisen <[email protected]>

* Fix prophet docstring and tests

Signed-off-by: Merel Theisen <[email protected]>

* Fix lint

Signed-off-by: Merel Theisen <[email protected]>

* Fix docs

Signed-off-by: Merel Theisen <[email protected]>

* Fix docs

Signed-off-by: Merel Theisen <[email protected]>

* Bandit

Signed-off-by: Ankita Katiyar <[email protected]>

* Add nosec instead

Signed-off-by: Ankita Katiyar <[email protected]>

* Add to release notes

Signed-off-by: Ankita Katiyar <[email protected]>

---------

Signed-off-by: galenseilis <[email protected]>
Signed-off-by: Merel Theisen <[email protected]>
Signed-off-by: Ankita Katiyar <[email protected]>
Co-authored-by: Merel Theisen <[email protected]>
Co-authored-by: Merel Theisen <[email protected]>
Co-authored-by: Ankita Katiyar <[email protected]>
Co-authored-by: Ankita Katiyar <[email protected]>
Signed-off-by: Minura Punchihewa <[email protected]>
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.

4 participants