Modularization fixes for fast_callable interpreters#35774
Modularization fixes for fast_callable interpreters#35774vbraun merged 11 commits intosagemath:developfrom
fast_callable interpreters#35774Conversation
…ubset of interpreters
|
|
||
|
|
||
| def rebuild(dirname, force=False): | ||
| def rebuild(dirname, force=False, interpreters=None, distribution=None): |
There was a problem hiding this comment.
If you're adding arguments, can you add the missing INPUT block that explains what they do?
| return builder(str.get_current()) | ||
|
|
||
|
|
||
| def _builder_and_stream(vars, domain): |
There was a problem hiding this comment.
I can see what's going on from the diff, but if someone comes along a year from now, this docstring isn't really going to explain what the function is doing and why. Can you expand it a little?
Also, if possible, can you test the import-failure code path?
There was a problem hiding this comment.
This was just mechanical refactoring of code that was nested a bit too deep. Let me see if I remember what it is doing, after a mere 4 days, not a year...
There was a problem hiding this comment.
can you test the import-failure code path?
done in afd3be6
| Make sure that pow behaves reasonably:: | ||
|
|
||
| sage: var('x,y') | ||
| sage: var('x,y') # optional - sage.symbolic |
There was a problem hiding this comment.
This should avoid the optional tag:
from sage.ext.fast_callable import ExpressionTreeBuilder
etb = ExpressionTreeBuilder(vars=('x','y'))
x = etb.var('x')
y = etb.var('y')
ff = fast_callable(x^y, domain=RDF)
…e of symbolics in doctest
|
Documentation preview for this PR (built with commit 97135ad) is ready! 🎉 |
orlitzky
left a comment
There was a problem hiding this comment.
Ok, presumably you know what's going on with all_py, and the rest LGTM.
|
Thank you! May I set to "positive review" then? |
|
Yes, it'll take me a few years to remember to do it. |
📚 Description
The code generator in
sage_setup.autogen.interpreterscan now build a subset of interpreters. This is used in #35095 to only build the interpreters forElementandobjectin the sagemath-categories distribution.At runtime,
sage.ext.fast_callableno longer fails when an interpreter cannot be imported but falls back to theElementinterpreter if necessary.📝 Checklist
⌛ Dependencies