initial commit of matrix normal base API , regression, and MN-RSA#341
Conversation
Update with mainline repo
…sman/brainiak into matnormal-regression-rsa
|
@narayanan2004, @lcnature, are you in touch with @mshvartsman about this PR? |
|
@mihaic Sorry, not yet. I will have a look at it after Friday. @mshvartsman I just had a quick glance a the console output of the automatic testing system, it seems that there are quite a few formatting complaint in brainiak/utils/utils.py and a few in your brainiak/matnormal module. You can probably see them if you just run the run-checks.sh |
Fixing style issues in utils.py
…iniak into matnormal-regression-rsa
|
Hi @mshvartsman Will continue to read other codes :) |
|
Github rendering of math in notebooks seems pretty bad unfortunately -- it looks fine locally. |
|
Sorry for so many vacuous commits as I get this ship-shape: for some reason |
|
Current linux failures look to be due to tensorflow being incompatible with old libc (e.g. tensorflow/tensorflow#177), I'm guessing because the test server runs Centos/Springdale 6. There are various hackarounds possible (easiest might be installing TF from conda) but I don't know how to make any of them work with the CI setup. Any advice? |
|
@mshvartsman, you are right. TensorFlow does appear to require glibc >= 2.17 (tensorflow/tensorflow#53), although this requirement is not explicitly documented, as far as I can tell. We do want to be able to depend on TensorFlow, so I am looking into a workaround for our Jenkins server. |
|
I added PR #357 as a workaround for the TensorFlow issue. |
|
Great -- so what are next steps? Review / merge #357 and then I need to modify the build script somewhere also to pass |
|
After PR #357 is merged, I will modify the Jenkins configuration to pass the flag. The Jenkins configuration is not part of this repo. Travis is not affected. As for the GitHub Latex rendering, I am not aware of a workaround, but I don't think it matters. Users can see the rendering locally, as you mentioned; additionally, we should use our HTML docs for displaying examples (see issue #268). |
|
@mshvartsman, please add the commit from PR #357 to your branch, so we can use the Jenkins workaround. |
|
I didn't mean to be obscure. Merging master will add the commit. |
|
@mshvartsman @mihaic Other than the last comment above, I think the PR is good to go! |
| r : float or 1D ndarray | ||
| Pearson correlation values for input variables | ||
| """ | ||
|
|
There was a problem hiding this comment.
Please remove this one whitespace difference as well.
There was a problem hiding this comment.
I think that's done.
|
The conda build fix doesn't look too onerous, we might as well do it. I think I got all the spots where pymanopt is special-cased and did the same for TFP? The one place I'm not sure about is Latest TF in conda is 2.2 though and TFP requires 2.3 so we can either do the pypi workaround or just wait until TF2.3 makes it into the conda repo, up to you. |
|
@mihaic @mshvartsman Looks good to me too! I am happy to approve! Thank you both for contributing and managing! |
lcnature
left a comment
There was a problem hiding this comment.
Just hit the approve button here
|
@lcnature, thanks a lot for helping with this monumental PR! @mshvartsman, since you are up fixing the Conda build, could you please try TensorFlow from PyPI as well? Please ignore |
|
Tried it, not sure what happened with the build there. Looks like TFP successfully installed without complaining about missing TF2.3 but then it couldn't find all the TF libs and froze. Any ideas? |
| # Install pymanopt and tensorflow_probability via pip because there isn't a conda | ||
| # package, and install tensorflow 2.3 from pip because tensorflow_probability | ||
| # requires it and latest in conda is 2.2. | ||
| PIP_NO_INDEX=False $PYTHON -m pip install tensorflow>=2.3 |
There was a problem hiding this comment.
You need to quote or escape the >, otherwise Bash interprets it as a redirect, e.g., tensorflow\>=2.3. We cannot see in the Travis logs what happened to the installation because of this redirect.
There was a problem hiding this comment.
Ah, thanks. I blame my fancy programming font ligature.
There was a problem hiding this comment.
I don't think that was it though? Still fails.
There was a problem hiding this comment.
Thanks for trying. Not sure what is happening. I'll experiment with building the Conda package manually to understand. If I don't figure it out in the next few days, I plan to merge the PR nevertheless and solve the build issue later.
There was a problem hiding this comment.
Sounds good! I'll get rolling on the next piece (MN-SRM) and PR that when it's ready.
Thanks to @bdsinger for finding the proper TensorFlow Conda package.
|
The good news is that there is a TensorFlow 2.3 package in Conda (tensorflow-base). The bad news is that it is not compiled for macOS, only Linux. |
|
Does that change our plans for merging? |
|
My comment was a sort of explanation for the failure of commit 5e472a1. Still planning to merge for the upcoming release and still looking for the best way to build the Conda package. |
|
@mshvartsman, I have a new proposal in light of the difficulty in packaging TensorFlow 2.3 for macOS with Conda. What if I make a new I also thought about using Setuptools |
|
@mshvartsman, another solution I see is to use No TensorFlow,
TensorFlow installed,
What do you think? |
|
@mshvartsman, to make some progress, I will implement the |
|
@mshvartsman, thank you very much for your patience! I hope the optional dependencies approach will work well. Thank you for your help, @narayanan2004, @lcnature, and @szorowi1. |
Massive squashed commit of matrix-normal functionality. Includes the base API, matrix-normal RSA, matrix-normal regression, and an example. Have a separate commit ready to go for matrix-normal SRM but this is already huge so let's do this first.
Paging @narayanan2004 for double checking I didn't mess up with what I picked out of the private repo, @lcnature for reviewing RSA.