Skip to content

Test using pyFFTW's NumPy interface - #2105

Closed
jakirkham wants to merge 1 commit into
dask:masterfrom
jakirkham:pyfftw_test_abstract_fft_interface
Closed

jakirkham wants to merge 1 commit into
dask:masterfrom
jakirkham:pyfftw_test_abstract_fft_interface

Conversation

@jakirkham

@jakirkham jakirkham commented Mar 21, 2017 •

Copy link
Copy Markdown
Member

Disclaimer: FFTW is GPL2 (or proprietary license). So this would imply that pyFFTW is also GPL'd (though it has a BSD 3-Clause license which can work if the proprietary license of FFTW is purchased) as they are linked. Not sure what the impact would be on Dask licensing. So this might be an argument for rejection. That said, IANAL.

Make sure that we test compatibility against pyFFTW's NumPy interface. This is done to make sure that we can trivially wrap these functions.

Edit: Expanded upon the disclaimer.

Make sure that we test compatibility against pyFFTW's NumPy interface.
This is done to make sure that we can trivially wrap these functions.
@jakirkham

jakirkham commented Mar 21, 2017 •

Copy link
Copy Markdown
Member Author

Would add that I have seen some precision issues with the float32 tests of irfft and hfft on my Mac. Not sure what is going on there ATM.

@pzwang

pzwang commented Mar 21, 2017

Copy link
Copy Markdown

Here is my perspective, which I am happy to be corrected on if I've missed something.

We should not include GPL licensed code or give any suspicion that even a code-read of GPL code was used in the implementation of anything in Dask itself.

However, the "virality" of the GPL is triggered by creating a "derivative work". Thus, an optional dependency on a piece of GPL software, that is installed by the user at runtime and not distributed by the Dask project, should be OK. It should be noted that any bundling of that GPLed code along with Dask is a derivative work, and therefore must be licensed in accord with the GPL. Thus, a docker image or something like that would be considered distribution of a derivative work.

@mrocklin

Copy link
Copy Markdown
Member

At the end of the day I think we can draw the line here regardless. I think that tests that require installing software to check that Dask works with that software should probably only be included if a significant community depends on that software. For example we decided to include tests with NetCDF because of the XArray community. I think I'd prefer to avoid explicitly including and testing against PyFFTW within the Dask core codebase. I think that this opens doors to lots of other software.

I think that the way to reverse this decision would be to show that lots of people use or want to use pyfftw with Dask on a regular basis.

Thoughts @jakirkham ?

Navel-gazing for a moment, it would be nice if there was some place where you could register cross-project tests.

@DavidMertz

Copy link
Copy Markdown

Dask should not distribute FFTW or pyFFTW, of course. As Peter notes, Dask authors should also avoid "infecting their brains" with knowledge of the source code in the GPL products. However, if compatibility is only defined by the documented public interfaces, and not by examination of the underlying source code, no derivative work has been created.

@jakirkham

Copy link
Copy Markdown
Member Author

So it sounds like the general feeling is this could be ok, but we don't want them in Dask. Again, as noted above, this is fine and I'm not worried about it.

On the point of test extensions, I really have no interest in maintaining a set of tests alone for this purpose. However if we included the wrappers too, then this becomes more interesting. Namely this becomes a collection of functions to use pyFFTW with Dask and tests to verify that works. I can see this coming to fruition in a few ways.

  1. Create a Dask extension package just for these FFTW wrappers.
  2. Create a Dask extension package with various FFT wrappers.
  3. Add Dask wrapped pyFFTW functions to pyFFTW directly.

There could also be a 4th with adding these to Dask, but we ruled that out already. Now we can dive deep into these options. That said, just generally thinking about it 3 is pretty nice. This puts the wrappers in the library one wants to use and ensures they can be tested properly there.

Thoughts on this?

@mrocklin

mrocklin commented Mar 24, 2017 via email

Copy link
Copy Markdown
Member

@jakirkham

Copy link
Copy Markdown
Member Author

Alright well I'll raise an issue with the pyFFTW devs and see if they would be interested in including these wrappers and tests.

@jakirkham

Copy link
Copy Markdown
Member Author

This functionality has been added to pyFFTW along with relevant tests instead. Please see PR ( pyFFTW/pyFFTW#154 ) for details.

@jakirkham jakirkham closed this Apr 4, 2017
@jakirkham
jakirkham deleted the pyfftw_test_abstract_fft_interface branch April 4, 2017 18:32
@mrocklin

mrocklin commented Apr 4, 2017 via email

Copy link
Copy Markdown
Member

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