Skip to content

Commit dddda05

Browse files
Merge pull request #160 from AJ0070/jash/small_grant
Completed 'Create Wrapper Functions to SymPy for Symbolics.jl'
2 parents 51509ef + 9857aa5 commit dddda05

File tree

1 file changed

+52
-56
lines changed

1 file changed

+52
-56
lines changed

small_grants.md

Lines changed: 52 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ by SciML in a manner that is designed to give better outcomes to both
1414
contributors and maintainers of the project. In order to remove a hostile
1515
competitive atmosphere, **candidates must declare to the committee interest
1616
before solving the chosen issue** and, upon approval by the selection committee,
17-
are given an exclusive time interval (defaulting to one month) to solve the issue.
17+
are given an exclusive time interval (defaulting to one month) to solve the issue.
1818
Payout is done upon completion of the chosen project and acceptance by the steering
1919
council.
2020

@@ -59,8 +59,8 @@ The difference between the small grants program and a standard bounty program is
5959
to discourage "sniping" bounties from others, i.e. someone working for a few weeks on a project
6060
before suddenly someone else appears with a complete solution and takes the payout. While this
6161
is not impossible to prevent, as an open source community there may be others who happen to
62-
be working the same project independently, to reduce the occurrences of this phonomena we have
63-
a policy that payouts will only occur for declared projects. This policy can be overriden on
62+
be working the same project independently, to reduce the occurrences of this phenomena we have
63+
a policy that payouts will only occur for declared projects. This policy can be overridden on
6464
special circumstances by a majority vote of the steering council.
6565

6666
In order to discourage "spotting", i.e. claiming projects to sit on them indefinitely and thus
@@ -77,7 +77,7 @@ further requests are accepted.
7777

7878
## Getting Paid Out
7979

80-
After a succesful project, a pull request to [https://github.com/SciML/sciml.ai](https://github.com/SciML/sciml.ai)
80+
After a successful project, a pull request to [https://github.com/SciML/sciml.ai](https://github.com/SciML/sciml.ai)
8181
must be made that updates the Small Grants project page declaring the project as completed
8282
by moving it to the completed section. This pull request then must be merged by the designated
8383
reviewer. Once this is merged, the project is declared to be successfully completed unless
@@ -121,7 +121,7 @@ project to become a part of the SciML Small Grants program it must be
121121
approved by the SciML Steering Council. The reason why all chosen projects must be
122122
vetted by the Steering Council is that we want to be fair to the potential contributors,
123123
and this means we must ensure that the suggested projects will have a prompt review
124-
process and proper maintanance beyond the timeframe of the project. For this reason,
124+
process and proper maintenance beyond the timeframe of the project. For this reason,
125125
we suggest discussing with maintainers in the official Slack/Zulip before making
126126
an earmarked donation.
127127

@@ -162,42 +162,6 @@ will "go the extra mile" to teach the contributor how the package or mathematics
162162

163163
# List of Current Projects
164164

165-
## Create Wrapper Functions to SymPy for Symbolics.jl (\$300)
166-
167-
***In progress:** being worked on by Rick de Wolf starting June 1st and ending July 1st*
168-
169-
The Symbolics.jl solver handles a lot of cases, but can always be better.
170-
The lowest hanging fruit is to set it up with SymPy.jl as an alternative backend,
171-
where automatic translation is used to do the solving, i.e. transform a Symbolics.jl
172-
expression to SymPy, run the SymPy symbolic solver to get a solution, and convert back
173-
to Symbolics.jl.
174-
175-
The goals of this project are thus as follows:
176-
177-
* Document the Symbolics <-> Sympy round trip conversion process and functions. Add tests that it works.
178-
* Create wrapper functions for the specific Sympy solvers, i.e.
179-
* linear solve
180-
* algebraic solve
181-
* integrate
182-
* limit
183-
* simplify
184-
185-
**Information to Get Started**: There is already a `symbolics_to_sympy` function
186-
https://github.com/JuliaSymbolics/Symbolics.jl/blob/v6.40.0/ext/SymbolicsSymPyExt.jl and
187-
there is an exchange function in SymPy core, so I think all of the tools are there to do
188-
such conversions, see https://github.com/JuliaSymbolics/Symbolics.jl/issues/1223 and
189-
https://github.com/jverzani/SymPyCore.jl/pull/88.
190-
191-
**Related Issues**: https://github.com/JuliaSymbolics/Symbolics.jl/issues/1551
192-
193-
**Success Criteria**: Pull requests which add the 5 requested functions to the
194-
SymbolicsSymPyExt.jl extension of Symbolics.jl,
195-
https://github.com/JuliaSymbolics/Symbolics.jl/blob/master/ext/SymbolicsSymPyExt.jl
196-
197-
**Recommended Skills**: Basic (undergrad-level) knowledge of calculus and Python
198-
199-
**Reviewers**: Chris Rackauckas
200-
201165
## Wrap `scipy.optimize` into the Optimization.jl Interface (\$300)
202166

203167
**In progress:** being worked on by Aditya Pandey*
@@ -296,7 +260,7 @@ interfaces and benchmarking tools so it can make use of the full set of methods
296260
Optimization.jl and drive further developments and recommendations to users.
297261

298262
This would likely turn into either contributions to CUTEst or wrappers to CUTEst (hosted in
299-
SciML) which which transform the NLPModels form into Optimization.jl, and a benchmarking
263+
SciML) which transform the NLPModels form into Optimization.jl, and a benchmarking
300264
script that loops over all optimization problems and applies a set of optimizers to each of
301265
them, computing summary statistics at the bottom.
302266

@@ -332,13 +296,13 @@ generated using the benchmark server. The [transition amplifier benchmark](https
332296
and [slider crank benchmark](https://github.com/SciML/SciMLBenchmarks.jl/pull/373) were old
333297
PRs to add a few of the problems. These could be used as starting points to solve two problems.
334298
One would likely need to modify the structural simplification to turn dummy derivative off
335-
as well, that can be discsused with Chris in the PR review.
299+
as well, that can be discussed with Chris in the PR review.
336300

337301
**Related Issues**: [https://github.com/SciML/OrdinaryDiffEq.jl/issues/2177](https://github.com/SciML/OrdinaryDiffEq.jl/issues/2177)
338302

339303
**Success Criteria**: New benchmarks with the DAE systems.
340304

341-
**Recommended Skills**: Prior knowledge in modeling with differential-algebaic equations
305+
**Recommended Skills**: Prior knowledge in modeling with differential-algebraic equations
342306
would be helpful for debugging.
343307

344308
**Reviewers**: Chris Rackauckas
@@ -360,11 +324,11 @@ be discussed before starting the project.
360324

361325
It is recommended that implicit methods such as Rosenbrock and SDIRK integrators are
362326
done first, as the extra intricacies of their algorithm make this refactor simpler
363-
because the nuances of the implementation are less likely to noticably impact performance.
327+
because the nuances of the implementation are less likely to noticeably impact performance.
364328

365329
**Information to Get Started**: The OrdinaryDiffEq.jl solvers are all found in
366330
[the Github repository](https://github.com/SciML/OrdinaryDiffEq.jl) and
367-
the format of the package is docmented in the
331+
the format of the package is documented in the
368332
[developer documentation](https://docs.sciml.ai/DiffEqDevDocs/stable/). The key to doing
369333
this right is to note that it is just a refactor, so all of the methods are there in
370334
the package already. However, note that some methods can be a bit nuanced, for example,
@@ -390,7 +354,7 @@ development skills and test-driven development of a large code base is required.
390354
[LoopVectorization.jl](https://github.com/JuliaSIMD/LoopVectorization.jl) is a
391355
central package for the performance of many Julia packages. Its internals make
392356
use of many low-level features and manual SIMD that can make it require significant
393-
maintanance to be optimized for new versions of the compiler.
357+
maintenance to be optimized for new versions of the compiler.
394358

395359
**Information to Get Started**:
396360

@@ -408,31 +372,63 @@ which SciML will help administer through the small grants program.
408372

409373
**Success Criteria**: LoopVectorization.jl runs on v1.12's latest release.
410374

411-
**Recommended Skills**: This requires some low-level knoweldge of LLVM IR and familiarity with `llvmcall`. The changes should be routine.
375+
**Recommended Skills**: This requires some low-level knowledge of LLVM IR and familiarity with `llvmcall`. The changes should be routine.
412376

413377
**Reviewers**: Chris Elrod
414378

415379
# Successful Projects Archive
416380

417-
These are the previous SciML small grants projects which have successfully concluded and payed out.
381+
These are the previous SciML small grants projects which have successfully concluded and paid out.
382+
383+
## Add SymPy.jl as an Alternative Backend for Symbolics.jl (\$300)
384+
385+
**Completed by Jash Ambaliya on June 20th, 2025.**
386+
387+
The Symbolics.jl symbolic solver covers a wide range of cases, but adding a fallback to SymPy's solver provides broader coverage with minimal effort. This project implemented a backend integration using SymPy.jl via automatic conversion between Symbolics and SymPy representations. It introduced helper functions for converting expressions, solving them using SymPy, and converting results back.
388+
389+
**Goals Achieved** :
390+
391+
- Documented and tested the Symbolics <-> SymPy roundtrip conversion.
392+
- Implemented wrappers in `SymbolicsSymPyExt.jl` for the following SymPy-based operations:
393+
- `linear_solve`
394+
- `algebraic_solve`
395+
- `integrate`
396+
- `limit`
397+
- `simplify`
398+
399+
This enhancement expands Symbolics.jl’s solving capabilities by leveraging the mature SymPy backend when native solutions are insufficient.
400+
401+
**Information to Get Started** :
402+
403+
The project used the existing `symbolics_to_sympy` function and the SymPy exchange mechanism. Reference discussions included:
404+
405+
- [Symbolics.jl #1223](https://github.com/JuliaSymbolics/Symbolics.jl/issues/1223)
406+
- [SymPyCore.jl #88](https://github.com/jverzani/SymPyCore.jl/pull/88)
407+
- [Symbolics.jl #1551](https://github.com/JuliaSymbolics/Symbolics.jl/issues/1551)
408+
409+
**Success Criteria** : Pull requests adding the five requested functions to the [SymbolicsSymPyExt.jl](https://github.com/JuliaSymbolics/Symbolics.jl/blob/master/ext/SymbolicsSymPyExt.jl).
410+
411+
**Recommended Skills** : Basic (undergrad-level) knowledge of calculus, symbolic computation, and Python interop in Julia.
412+
413+
**Reviewers** : Chris Rackauckas
418414

419415
## Refactor OrdinaryDiffEq.jl to use Sub-Packages of Solvers (\$600)
420416

421417
#### Note: Bounty increase to \$600 from \$300 (7/20/2024)
422418

423-
** Completed by Param Umesh Thakkar for the time period of June 18th, 2024 - August 18th 2024. Extended due to scope and cost extension. **
419+
**Completed by Param Umesh Thakkar for the time period of June 18th, 2024 - August 18th 2024. Extended due to scope and cost extension.**
424420

425421
It's no surprise to anyone to hear that DifferentialEquations.jl, in particular the
426422
OrdinaryDiffEq.jl solver package, is very large and takes a long time to precompile.
427423
However, this is because there are a lot of solvers in the package. The goal would
428424
be to refactor this package so that sets of solvers are instead held in subpackages
429425
that are only loaded on-demand. Since many of the solvers are only used in more
430426
niche applications, this allows for them to be easily maintained in the same repo
431-
while not imposing a loading cost on the more standard appliations.
427+
while not imposing a loading cost on the more standard applications.
432428

433429
**Information to Get Started**: The OrdinaryDiffEq.jl solvers are all found in
434430
[the Github repository](https://github.com/SciML/OrdinaryDiffEq.jl) and
435-
the format of the package is docmented in the
431+
the format of the package is documented in the
436432
[developer documentation](https://docs.sciml.ai/DiffEqDevDocs/stable/)
437433

438434
**Related Issues**: [https://github.com/SciML/OrdinaryDiffEq.jl/issues/2177](https://github.com/SciML/OrdinaryDiffEq.jl/issues/2177)
@@ -454,9 +450,9 @@ development skills and test-driven development of a large code base is required.
454450
The transistor amplifier benchmark was added [https://github.com/SciML/SciMLBenchmarks.jl/pull/1007](https://github.com/SciML/SciMLBenchmarks.jl/pull/1007).
455451
Project is kept open for other benchmarks.
456452

457-
## SciMLBenchmarks Compatability Bump for Benchmark Sets (\$100 each set)
453+
## SciMLBenchmarks Compatibility Bump for Benchmark Sets (\$100 each set)
458454

459-
**Completed by Param Umesh Thakkar for the time period of January 21st - February 21st. Extended from February 21st to March 21st. Extended due to the project's complexity and final refinements. **
455+
**Completed by Param Umesh Thakkar for the time period of January 21st - February 21st. Extended from February 21st to March 21st. Extended due to the project's complexity and final refinements.**
460456

461457
The [SciMLBenchmarks](https://github.com/SciML/SciMLBenchmarks.jl) are a large set of benchmarks maintained
462458
by the SciML organization. As such, keeping these benchmarks up-to-date can be a time-consuming task.
@@ -497,7 +493,7 @@ regressions found through the update process.
497493
**Success Criteria**: The benchmarks should run and give similar results to the pre-updated benchmarks,
498494
and any regressions should be identified with an issue opened in the appropriate repository.
499495

500-
**Recommended Skills**: Willingness to roll up some sleaves and figure out what changed in breaking updates.
496+
**Recommended Skills**: Willingness to roll up some sleeves and figure out what changed in breaking updates.
501497

502498
**Reviewers**: Chris Rackauckas
503499

@@ -518,4 +514,4 @@ should be sufficient.
518514
**Recommended Skills**: Basic (undergrad-level) knowledge of linear operators and multiple dispatch
519515
in Julia.
520516

521-
**Reviewers**: Chris Rackauckas
517+
**Reviewers**: Chris Rackauckas

0 commit comments

Comments
 (0)