GSoC Theano/SymPy/PyDy

89 views
Skip to first unread message

Frédéric Bastien

unread,
Feb 27, 2014, 9:13:38 PM2/27/14
to sympy, py...@googlegroups.com
py...@googlegroups.com sympy <sy...@googlegroups.com>


Hi,


Theano is participating to GSoC via the PSF this year. In our ideas
list, some of them would be very useful to PyDy/SymPy users. So I
would like to bring discuss them with you.

Matthew R. did a converter from SymPy graph to Theano. This allow to
reuse Theano code generator. The bridge work well. Here is the 2
projects ideas that come from SymPy, PyDy users that contacted us.

1) Theano wasn't very optimized for scalar computation. But SymPy/PyDy
users use very frequently scalar in computation. One of the projects
idea is to lower Theano overhead. Their is a PyDy example that show
well current the current overhead. I already did some optimization of
that example, but their is more to do. Enough for a GSoC.

2) Generate a shared library. Many people would like to generate a
shared library from a function to reuse it in other system.


What do you think of that? Interested in participating in their development?

Thanks.

Frédéric Bastien

Jason Moore

unread,
Feb 27, 2014, 10:50:16 PM2/27/14
to py...@googlegroups.com, sympy
They both sound like great ideas. We can certainly provide large scalar functions for testing #1. I'd also like to dispatch our `solve()` methods to Theano in the pydy-code-gen source. #2 is interesting, we could use something like that to generate fast ODE evals that can then be wrapped under a variety of high level languages (Python, Octave, R, etc).


Frédéric Bastien

--
You received this message because you are subscribed to the Google Groups "PyDy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pydy+uns...@googlegroups.com.
To post to this group, send email to py...@googlegroups.com.
Visit this group at http://groups.google.com/group/pydy.
For more options, visit https://groups.google.com/groups/opt_out.

Matthew Rocklin

unread,
Feb 27, 2014, 11:42:50 PM2/27/14
to sy...@googlegroups.com, py...@googlegroups.com
I obviously think that SymPy->Theano interactions are interesting.  My series of blogposts on that topic continue to get decent web traffic today.

For what it's worth I'm also happy to vouch for Frederic and the Theano crew.  They're a good group with which to collaborate.

What sorts of interactions are you considering Fred?  Are you looking for a co-mentor within PyDy or SymPy?  Or are you just looking for commitment to generate problems and provide feedback?


--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
To post to this group, send email to sy...@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAP7f1Ahr2crc5-qOWAg5HYr6Nyxmsb_AHu5i%3D-9%3DArU9Sx0D_g%40mail.gmail.com.

Frédéric Bastien

unread,
Feb 28, 2014, 5:17:08 PM2/28/14
to sympy, py...@googlegroups.com
Hi,

The current problem that we have in implementing those 2 ideas is the
time to do it. The time investment is a bit hard to justify for the people
currently developing Theano because of the high likelihood that we will
not really use those additional features for our research.

I find those 2 ideas great and would love to see them in Theano.
I'm looking for people that could implement those features.
Our proposal to GSoC was rejected, but we got
accepted via the PSF. I don't know what will happen from this,
who will postulate, and on what they would like to work.

Given your status as a registered GSoC organisation and the
fact that many people here would use those features, I thought
I would ask you if you were interested in helping this
get implemented.

We can mentor/guide/plan/review all the work on those projects.


On a related topic, I would mention
a recent benchmark from PyDy as an example of collaboration
that we would like to encourage. That benchmark highlighted
a certain weakness in Theano that we were then able to fix
relatively quickly.

We felt that this was very valuable and would like to see
any other such comparisions/tests performed with Theano.
This benchmark will also help with the scalar speedup project
it would serve as measurement for it.

Thanks,

Frédéric

p.s. I'll be unavailable next week, so don't expect a fast answer, but
I'll be back online before the students can start with the registration process.
> https://groups.google.com/d/msgid/sympy/CAJ8oX-HZvOZRKoLh0iCCmKYOqga7RKjDKe9nDx_xBywd%3Daa3nw%40mail.gmail.com.

Aaron Meurer

unread,
Feb 28, 2014, 5:27:19 PM2/28/14
to py...@googlegroups.com, sympy
SymPy is not likely to accept a project under its umbrella unless it
results in a lot of code for SymPy itself. I'm not saying that it's a
specific rule that we have or anything, just that we tend to get a lot
more students than slots, and so we have to prioritize things. Plus
the PSF tends to have a ton of slots. Even so, you are welcome to
direct students to submit their applications to SymPy. They will need
to satisfy our application requirements same as everyone else (a
merged pull request to SymPy).

If you have any interested students, go ahead and send them this way,
and we can continue the discussion from there.

We should probably add some addendum to our ideas page pointing to
related projects' ideas pages like Theano or PyDy (feel free to go
ahead and do this; it's on the wiki for a reason).

Aaron Meurer

Ondřej Čertík

unread,
Feb 28, 2014, 6:32:23 PM2/28/14
to py...@googlegroups.com, sympy
On Fri, Feb 28, 2014 at 3:27 PM, Aaron Meurer <asme...@gmail.com> wrote:
> SymPy is not likely to accept a project under its umbrella unless it
> results in a lot of code for SymPy itself. I'm not saying that it's a
> specific rule that we have or anything, just that we tend to get a lot
> more students than slots, and so we have to prioritize things. Plus
> the PSF tends to have a ton of slots. Even so, you are welcome to
> direct students to submit their applications to SymPy. They will need
> to satisfy our application requirements same as everyone else (a
> merged pull request to SymPy).
>
> If you have any interested students, go ahead and send them this way,
> and we can continue the discussion from there.
>
> We should probably add some addendum to our ideas page pointing to
> related projects' ideas pages like Theano or PyDy (feel free to go
> ahead and do this; it's on the wiki for a reason).

Just go to sympy.org and following the link to GSoC Ideas:

https://github.com/sympy/sympy/wiki/gsoc-2014-ideas

Frédéric, feel free to link to Theano ideas page there.

Ondrej

Jason Moore

unread,
Feb 28, 2014, 8:01:09 PM2/28/14
to py...@googlegroups.com, sympy
Frédéric, we can also add these ideas to the GSoC page on pydy.org. We've asked for some slots from the PSF also, so if we get a good proposal for that it could be a nice collabortive project between SymPy, PyDy, and Theano. I'd really like to see a nice ODE code generator as part of SymPy's code base, which could also make use of the theano_function optimally.

Tim Lahey

unread,
Feb 28, 2014, 8:15:25 PM2/28/14
to sympy, py...@googlegroups.com
For ODE Code Generation, I recommend looking at Allan Wittkopf's paper,
"Automatic Code Generation and Optimization in Maple".

http://jnaiam.org/index.php?/archives/65-Automatic-Code-Generation-and-Optimization-in-Maple.html

He did a lot of work on specifically generating C code for systems of
ODEs. I used his work before it was officially included in Maple.

Cheers,

Tim.
>> https://groups.google.com/d/msgid/sympy/CAJ8oX-HZvOZRKoLh0iCCmKYOqga7RKjDKe9nDx_xBywd%3Daa3nw%40mail.gmail.com
>> .
> --
> You received this message because you are subscribed to the Google
> Groups "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to sympy+un...@googlegroups.com.
> To post to this group, send email to sy...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/CAP7f1AiGatVQ59Nh0FfSOhbF-3k95DKHgGRpe9gHE-WEWeTL%3Dg%40mail.gmail.com.

Matthew Rocklin

unread,
Feb 28, 2014, 8:42:34 PM2/28/14
to sy...@googlegroups.com, py...@googlegroups.com
David Ketcheson has an interesting project related to ODEs named nodepy.  The introductory sentence follows

NodePy (Numerical ODEs in Python) is a Python package for designing, analyzing, and testing numerical methods for initial value ODEs. Its development was motivated by my own research in time integration methods for PDEs. I found that I was frequently repeating tasks that could be automated and integrated

Note that this doesn't generate code, it is a tool for analysis.  Coupling nodepy with a code generation tool (Theano) and a set of interesting problems (PyDy) might be fruitful.  I haven't thought much about this though.





To post to this group, send email to py...@googlegroups.com.
Visit this group at http://groups.google.com/group/pydy.

For more options, visit https://groups.google.com/groups/opt_out.


--
You received this message because you are subscribed to the Google
Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it,
send an

To post to this group, send email to sy...@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit

https://groups.google.com/d/msgid/sympy/CAP7f1Ahr2crc5-qOWAg5HYr6Nyxmsb_AHu5i%3D-9%3DArU9Sx0D_g%40mail.gmail.com
.

For more options, visit https://groups.google.com/groups/opt_out.


--
You received this message because you are subscribed to the Google
Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send
an

To post to this group, send email to sy...@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit


.

For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google
Groups "PyDy" group.
To unsubscribe from this group and stop receiving emails from it, send
To post to this group, send email to py...@googlegroups.com.
Visit this group at http://groups.google.com/group/pydy.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google
Groups "PyDy" group.
To unsubscribe from this group and stop receiving emails from it, send
To post to this group, send email to py...@googlegroups.com.
Visit this group at http://groups.google.com/group/pydy.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups
"PyDy" group.
To unsubscribe from this group and stop receiving emails from it, send an

To post to this group, send email to py...@googlegroups.com.
Visit this group at http://groups.google.com/group/pydy.
For more options, visit https://groups.google.com/groups/opt_out.


--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscribe@googlegroups.com.

To post to this group, send email to sy...@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.

Jason Moore

unread,
Mar 2, 2014, 1:16:55 PM3/2/14
to sy...@googlegroups.com
Hadn't seen nodepy yet. Looks cool, but I'm guessing it is slow. So connecting something like that to theano or any other low level code generator, JIT would be awesome. The ideal case is that we have a super sweet high level interface for solving ODEs that runs as fast as it can.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.

To post to this group, send email to sy...@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.

Matthew Rocklin

unread,
Mar 2, 2014, 1:20:47 PM3/2/14
to sy...@googlegroups.com
Nodepy doesn't actually solve ODEs :)  It's more of a catalog of ODE algorithms.


Frédéric Bastien

unread,
Mar 5, 2014, 9:41:08 PM3/5/14
to sympy, Arnaud Bergeron, James Bergstra
Hi,

I added a "Other Related Projects" section to SymPy ideas list. Adding
something similar would be great. Here is the text that I added. If
you have improvement, don't hesitate to edit it. I won't have access
to my email before Monday:

## Other Related Projets

Their is 2 ideas in the
[Theano GSoC
ideas list](https://github.com/nouiz/Theano/wiki/Gsoc2014) that are of
interest to SymPy user's. 1) Lower Theano
overhead (significant for scalars) and 2) generate dynamic
libraries. They are interesting to SymPy user's via the SymPy ->
Theano bridge that allow to compile a SymPy graph for faster
execution. If you are interested in them, contact them.



Adding something similar to pydy ideas list would be great. I don't
have access, so I can't do it myself.

I don't know enough ODE to talk about them, but if I have a benchmark,
I can see how to speed it up. I'll read next week the sympy mailing
emails on this subjects.

thanks for your support.

Frédéric
>>>>>>>>>>> email to pydy+uns...@googlegroups.com.
>>>>>>>>>>> To post to this group, send email to py...@googlegroups.com.
>>>>>>>>>>> Visit this group at http://groups.google.com/group/pydy.
>>>>>>>>>>>
>>>>>>>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>
>>>>>> Groups
>>>>>>>>>>
>>>>>>>>>> "sympy" group.
>>>>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>
>>>>>> send an
>>>>>>>>>>
>>>>>>>>>> email to sympy+un...@googlegroups.com.
>>>>>>>>>> To post to this group, send email to sy...@googlegroups.com.
>>>>>>>>>> Visit this group at http://groups.google.com/group/sympy.
>>>>>>>>>> To view this discussion on the web visit
>>>>>>>>>>
>>>>>>
>>>>>> https://groups.google.com/d/msgid/sympy/CAP7f1Ahr2crc5-qOWAg5HYr6Nyxmsb_AHu5i%3D-9%3DArU9Sx0D_g%40mail.gmail.com
>>>>>> .
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>
>>>>>> Groups
>>>>>>>>>
>>>>>>>>> "sympy" group.
>>>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>>>> send
>>>>>>
>>>>>> an
>>>>>>>>>
>>>>>>>>> email to sympy+un...@googlegroups.com.
>>>>>>>>> To post to this group, send email to sy...@googlegroups.com.
>>>>>>>>> Visit this group at http://groups.google.com/group/sympy.
>>>>>>>>> To view this discussion on the web visit
>>>>>>>>>
>>>>>>
>>>>>> https://groups.google.com/d/msgid/sympy/CAJ8oX-HZvOZRKoLh0iCCmKYOqga7RKjDKe9nDx_xBywd%3Daa3nw%40mail.gmail.com
>>>>>>
>>>>>> .
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>
>>>>>> Groups "PyDy" group.
>>>>>>>>
>>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>>> send
>>>>>>
>>>>>> an email to pydy+uns...@googlegroups.com.
>>>>>>>>
>>>>>>>> To post to this group, send email to py...@googlegroups.com.
>>>>>>>> Visit this group at http://groups.google.com/group/pydy.
>>>>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>
>>>>>> Groups "PyDy" group.
>>>>>>>
>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>> send
>>>>>>
>>>>>> an email to pydy+uns...@googlegroups.com.
>>>>>>>
>>>>>>> To post to this group, send email to py...@googlegroups.com.
>>>>>>> Visit this group at http://groups.google.com/group/pydy.
>>>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>>
>>>>>>
>>>>>> --
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups
>>>>>> "PyDy" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>>> an
>>>>>> email to pydy+uns...@googlegroups.com.
>>>>>> To post to this group, send email to py...@googlegroups.com.
>>>>>> Visit this group at http://groups.google.com/group/pydy.
>>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>>
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "sympy" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to sympy+un...@googlegroups.com.
>>>>> To post to this group, send email to sy...@googlegroups.com.
>>>>> Visit this group at http://groups.google.com/group/sympy.
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/sympy/CAP7f1AiGatVQ59Nh0FfSOhbF-3k95DKHgGRpe9gHE-WEWeTL%3Dg%40mail.gmail.com.
>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "sympy" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
> https://groups.google.com/d/msgid/sympy/CAJ8oX-GpXpqFmb94ipyckW0g7bcDoA%2BMYWbWwP1BgBAk8_ihZA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages