You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/09/29 16:07:58 UTC

[GitHub] [incubator-superset] kkalyan opened a new pull request #11107: fix: Disabling timezone of dataframe before passing Prophet

kkalyan opened a new pull request #11107:
URL: https://github.com/apache/incubator-superset/pull/11107


   While running forecasting with Druid. Prophet throws the following exception. This PR removes the timezone info. 
   ValueError: Column ds has timezone specified, which is not supported. Remove timezone
   https://github.com/apache/incubator-superset/issues/11106
   
   @villebro
   
   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### TEST PLAN
   <!--- What steps should be taken to verify the changes -->
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Changes UI
   - [ ] Requires DB Migration.
   - [ ] Confirm DB Migration upgrade and downgrade tested.
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] villebro merged pull request #11107: fix: Disabling timezone of dataframe before passing Prophet

Posted by GitBox <gi...@apache.org>.
villebro merged pull request #11107:
URL: https://github.com/apache/incubator-superset/pull/11107


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] villebro commented on a change in pull request #11107: fix: Disabling timezone of dataframe before passing Prophet

Posted by GitBox <gi...@apache.org>.
villebro commented on a change in pull request #11107:
URL: https://github.com/apache/incubator-superset/pull/11107#discussion_r497344751



##########
File path: superset/utils/pandas_postprocessing.py
##########
@@ -599,6 +599,7 @@ def _prophet_fit_and_predict(  # pylint: disable=too-many-arguments
         weekly_seasonality=weekly_seasonality,
         daily_seasonality=daily_seasonality,
     )
+    df["ds"] = df["ds"].dt.tz_convert(None)

Review comment:
       I believe we need to check first if the timezone is set. Can you check to see if this works? (I unfortunately don't have my Druid cluster handy right now)
   ```suggestion
       if df["ds"].dt.tz:
           df["ds"] = df["ds"].dt.tz_convert(None)
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] kkalyan commented on a change in pull request #11107: fix: Disabling timezone of dataframe before passing Prophet

Posted by GitBox <gi...@apache.org>.
kkalyan commented on a change in pull request #11107:
URL: https://github.com/apache/incubator-superset/pull/11107#discussion_r497526148



##########
File path: superset/utils/pandas_postprocessing.py
##########
@@ -599,6 +599,7 @@ def _prophet_fit_and_predict(  # pylint: disable=too-many-arguments
         weekly_seasonality=weekly_seasonality,
         daily_seasonality=daily_seasonality,
     )
+    df["ds"] = df["ds"].dt.tz_convert(None)

Review comment:
       thank you @villebro. committed your suggestion. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] villebro commented on pull request #11107: fix: Disabling timezone of dataframe before passing Prophet

Posted by GitBox <gi...@apache.org>.
villebro commented on pull request #11107:
URL: https://github.com/apache/incubator-superset/pull/11107#issuecomment-700810132


   Thanks @kkalyan , I'll review shortly. I assume this is Druid SQL?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] kkalyan commented on pull request #11107: fix: Disabling timezone of dataframe before passing Prophet

Posted by GitBox <gi...@apache.org>.
kkalyan commented on pull request #11107:
URL: https://github.com/apache/incubator-superset/pull/11107#issuecomment-700823848


   @villebro yes, its Druid SQL (version: 0.19.0). After patching this one line change, forecasting worked fine. 
   
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] villebro commented on pull request #11107: fix: Disabling timezone of dataframe before passing Prophet

Posted by GitBox <gi...@apache.org>.
villebro commented on pull request #11107:
URL: https://github.com/apache/incubator-superset/pull/11107#issuecomment-701495668


   @kkalyan the cypress test seems flaky, gonna restart it until it starts working.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org