You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/07/10 18:58:08 UTC

[GitHub] [incubator-mxnet] leezu opened a new pull request #18689: Fix scipy dependency in probability module

leezu opened a new pull request #18689:
URL: https://github.com/apache/incubator-mxnet/pull/18689


   Scipy is an optional dependency of mxnet. Requiring it breaks the website build (and will also break mxnet in other environments where scipy isn't present)
   
   Fixes https://github.com/apache/incubator-mxnet/issues/18680


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #18689: Fix scipy dependency in probability module

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #18689:
URL: https://github.com/apache/incubator-mxnet/pull/18689#issuecomment-656938177


   Jenkins CI successfully triggered : [miscellaneous, unix-cpu]


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] szha commented on a change in pull request #18689: Fix scipy dependency in probability module

Posted by GitBox <gi...@apache.org>.
szha commented on a change in pull request #18689:
URL: https://github.com/apache/incubator-mxnet/pull/18689#discussion_r453087239



##########
File path: python/mxnet/gluon/probability/distributions/utils.py
##########
@@ -48,7 +51,10 @@ def compute(value):
         """Return digamma(value)
         """
         if isinstance(value, Number):
-            return sc.digamma(value, dtype='float32')
+            if sc is not None:
+                return sc.digamma(value, dtype='float32')

Review comment:
       why the fixed dtype?




----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] ys2843 edited a comment on pull request #18689: Fix scipy dependency in probability module

Posted by GitBox <gi...@apache.org>.
ys2843 edited a comment on pull request #18689:
URL: https://github.com/apache/incubator-mxnet/pull/18689#issuecomment-656889685


   Here is the preview with this fix: http://ec2-34-219-134-42.us-west-2.compute.amazonaws.com/api/python/docs/api/gluon/index.html
   
   Here is the build log: http://jenkins.mxnet-ci-dev.amazon-ml.com/job/docs/job/yang-website-build-master/133/consoleText


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] leezu commented on pull request #18689: Fix scipy dependency in probability module

Posted by GitBox <gi...@apache.org>.
leezu commented on pull request #18689:
URL: https://github.com/apache/incubator-mxnet/pull/18689#issuecomment-656962245


   @mxnet-bot run ci [unix-cpu]
   
   


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] ys2843 commented on pull request #18689: Fix scipy dependency in probability module

Posted by GitBox <gi...@apache.org>.
ys2843 commented on pull request #18689:
URL: https://github.com/apache/incubator-mxnet/pull/18689#issuecomment-656889685


   Here is the preview with this fix: http://ec2-34-219-134-42.us-west-2.compute.amazonaws.com/api/python/docs/api/gluon/index.html


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] xidulu commented on a change in pull request #18689: Fix scipy dependency in probability module

Posted by GitBox <gi...@apache.org>.
xidulu commented on a change in pull request #18689:
URL: https://github.com/apache/incubator-mxnet/pull/18689#discussion_r453144899



##########
File path: python/mxnet/gluon/probability/distributions/utils.py
##########
@@ -48,7 +51,10 @@ def compute(value):
         """Return digamma(value)
         """
         if isinstance(value, Number):
-            return sc.digamma(value, dtype='float32')
+            if sc is not None:
+                return sc.digamma(value, dtype='float32')

Review comment:
       Ur right, this decorator should be taking into account. 
   I will try to figure out a way to let these utilities be aware of the type flag.




----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #18689: Fix scipy dependency in probability module

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #18689:
URL: https://github.com/apache/incubator-mxnet/pull/18689#issuecomment-656962262


   Jenkins CI successfully triggered : [unix-cpu]


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] leezu commented on pull request #18689: Fix scipy dependency in probability module

Posted by GitBox <gi...@apache.org>.
leezu commented on pull request #18689:
URL: https://github.com/apache/incubator-mxnet/pull/18689#issuecomment-656938144


   @mxnet-bot run ci [unix-cpu, miscellaneous]


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] leezu commented on pull request #18689: Fix scipy dependency in probability module

Posted by GitBox <gi...@apache.org>.
leezu commented on pull request #18689:
URL: https://github.com/apache/incubator-mxnet/pull/18689#issuecomment-656918299


   @mxnet-bot run ci [unix-cpu]


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #18689: Fix scipy dependency in probability module

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #18689:
URL: https://github.com/apache/incubator-mxnet/pull/18689#issuecomment-656918350


   Jenkins CI successfully triggered : [unix-cpu]


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] xidulu commented on a change in pull request #18689: Fix scipy dependency in probability module

Posted by GitBox <gi...@apache.org>.
xidulu commented on a change in pull request #18689:
URL: https://github.com/apache/incubator-mxnet/pull/18689#discussion_r453139086



##########
File path: python/mxnet/gluon/probability/distributions/utils.py
##########
@@ -48,7 +51,10 @@ def compute(value):
         """Return digamma(value)
         """
         if isinstance(value, Number):
-            return sc.digamma(value, dtype='float32')
+            if sc is not None:
+                return sc.digamma(value, dtype='float32')

Review comment:
       Since _value_  is a a python scalar, the default output’s dtype would be float64, which is inconsistent DeepNumpy’s behavior.




----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] leezu commented on a change in pull request #18689: Fix scipy dependency in probability module

Posted by GitBox <gi...@apache.org>.
leezu commented on a change in pull request #18689:
URL: https://github.com/apache/incubator-mxnet/pull/18689#discussion_r453097047



##########
File path: python/mxnet/gluon/probability/distributions/utils.py
##########
@@ -48,7 +51,10 @@ def compute(value):
         """Return digamma(value)
         """
         if isinstance(value, Number):
-            return sc.digamma(value, dtype='float32')
+            if sc is not None:
+                return sc.digamma(value, dtype='float32')

Review comment:
       That's a question for @xidulu 




----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] leezu merged pull request #18689: Fix scipy dependency in probability module

Posted by GitBox <gi...@apache.org>.
leezu merged pull request #18689:
URL: https://github.com/apache/incubator-mxnet/pull/18689


   


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #18689: Fix scipy dependency in probability module

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #18689:
URL: https://github.com/apache/incubator-mxnet/pull/18689#issuecomment-656833019


   Hey @leezu , Thanks for submitting the PR 
   All tests are already queued to run once. If tests fail, you can trigger one or more tests again with the following commands: 
   - To trigger all jobs: @mxnet-bot run ci [all] 
   - To trigger specific jobs: @mxnet-bot run ci [job1, job2] 
   *** 
   **CI supported jobs**: [unix-gpu, clang, windows-gpu, unix-cpu, edge, website, miscellaneous, centos-gpu, centos-cpu, sanity, windows-cpu]
   *** 
   _Note_: 
    Only following 3 categories can trigger CI :PR Author, MXNet Committer, Jenkins Admin. 
   All CI tests must pass before the PR can be merged. 
   


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] szha commented on a change in pull request #18689: Fix scipy dependency in probability module

Posted by GitBox <gi...@apache.org>.
szha commented on a change in pull request #18689:
URL: https://github.com/apache/incubator-mxnet/pull/18689#discussion_r453140667



##########
File path: python/mxnet/gluon/probability/distributions/utils.py
##########
@@ -48,7 +51,10 @@ def compute(value):
         """Return digamma(value)
         """
         if isinstance(value, Number):
-            return sc.digamma(value, dtype='float32')
+            if sc is not None:
+                return sc.digamma(value, dtype='float32')

Review comment:
       @xidulu I see. That makes sense. We do have a flag for determining whether the output type should follow numpy convention or not. You can find it here:
   https://github.com/apache/incubator-mxnet/blob/master/python/mxnet/util.py#L1076-L1092
   
   It would be great if that convention is observed.




----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] xidulu commented on a change in pull request #18689: Fix scipy dependency in probability module

Posted by GitBox <gi...@apache.org>.
xidulu commented on a change in pull request #18689:
URL: https://github.com/apache/incubator-mxnet/pull/18689#discussion_r453144899



##########
File path: python/mxnet/gluon/probability/distributions/utils.py
##########
@@ -48,7 +51,10 @@ def compute(value):
         """Return digamma(value)
         """
         if isinstance(value, Number):
-            return sc.digamma(value, dtype='float32')
+            if sc is not None:
+                return sc.digamma(value, dtype='float32')

Review comment:
       @szha  Ur right, this decorator should be taking into account. 
   I will try to figure out a way to let these utilities be aware of the type flag.




----------------------------------------------------------------
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