Google Summer of Code 2020 - Proposal

Improving SymEngine - Sympy Integration by working on SymPy Modules

Me, the person:

Name : Arpan Chattopadhyay

University : Birla Institute of Technology and Science, Pilani

Email : [email protected]

GitHub : Arpan612 (Arpan Chattopadhyay)

I am happy to be contacted by any of the above means as I believe easy and 
fast communication is the key for success of any open source project.

Time-zone : IST (UTC+5:30)

Age : 19

I am Arpan Chattopadhyay, pursuing B.E.(Hons.) Electrical and Electronics 
(2nd Year) at Birla Institute of Technology and Science, Pilani (BITS 
Pilani). I am highly interested in the fields of Symbolic Mathematics, 
Applied Mathematics, Machine Learning, and Mathematical Modeling. I would 
love to continue working in open source projects and hopefully, one day, 
create my team of programmers for building an open-source project as big as 
that of SymPy. I am very well versed in English and love interacting with 
people. Apart from coding, I love watching films, particularly mystery 
ones. I play and follow football as well. I believe I have been a good fit 
in the community culture and I hope to contribute even after the GSoC 
program gets over.

Me, the programmer:

I have been introduced to programming in Class 11 where we were taught C++ 
programming language as a part of our course curriculum. I started Python a 
month after joining college. At that time, I was introduced to the world of 
open source and the limitless possibilities it held for me. I was fortunate 
enough to take part in a Study Oriented Project which involved Symbolic 
Mathematics and the use of SymPy in Python. I found out about the various 
tasks which can be done by SymPy and was very impressed. Thus, I decided to 
finally give wings to my dream of working and collaborating in a large 
open-source project and SymPy was a natural choice, given the interest, it 
sparked in me. OS : Ubuntu 16.04 IDE Hardware Configuration : Intel i7 8th 
generation Python : Version 3.7.4 Editor : Atom and Anaconda (Version 
4.7.12)

Python Projects Created:

Gateway Interface with Google Accounts Blogging Application Polling 
Application Implementable Google O-Auth Gateway Biometric Verification 
Application Algorithmic Trading Application Algorithms for Stock Market 
Trading with Python Automated Trading Platform with Python and C++ Retina 
Sensor Detection Algorithms

Internship and Research Experience with Python:

Winter Intern as a Quantitative Research Analyst in Veda Capital, Opera 
House, Mumbai Responsible for making Algorithms for Trading in the Indian 
Equity and Commodity Market, managing and mining F&O data using MySQL, 
coding the algorithms and alphas in Python programming language with Pandas 
and NumPy for back testing and live testing.

Laboratory and Study Project on Application of Machine and Deep Learning in 
Communication System and Spectrum Sensing

This is a Laboratory and Study Project on Application of Machine and Deep 
Learning in Communication System and Spectrum Sensing under Shishir 
Maheshwari, Department of Electrical and Electronics, BITS Pilani. Here we 
apply Machine Learning techniques in Python for Spectrum Sensing when the 
primary user has Multiple Transmit Powers. We also investigate and build a 
machine learning model for spectrum sensing in cognitive radio networks.

The simplicity and ease of handling complex mathematics is an awesome 
feature I feel SymPy has.

My Project:

In this competitive world and rapid expansion in technology, speed of 
executing tasks is very important. SymEngine can be used to achieve that 
speed in SymPy.

Though SymEngine was initially developed to be a part of core for the SymPy 
CAS in the recent past, it has matured enough to be used as a symbolic 
backend. Using SymEngine can significantly increase speeds of various 
symbolic operations, and would increase the value and importance of SymPy 
requiring brisk computation as it gives users the option to tap into 
SymEngine’s routine. Also using SymEngine in SymPy is very fast and easy 
and hence will attract more people to it.

Aim and Objective:

The ultimate objective is to speed SymPy. An effective way to do it is to 
use SymEngine. SymEngine provides a very fast implementation of core 
symbolic algorithms, and SymPy should use it to gain speed. The theme of 
this project is to expand it to the modules in SymPy and also implement 
missing features from SymPy core in SymEngine. The project also explores 
the various changes SymEngine needs to become more efficient. This project 
builds on the commendable work done by @ShikharJ in GSoC 2017 and also 
solves the various problems SymEngine faces.

Motivation:

I believe that the most important problems of this world are solved by 
Mathematics. In particular, calculus was a revolutionary discovery which 
accelerated study in Mathematics and development in the world with 
astonishing pace. The vast application in particular, Calculus I like most 
about is the vast application it has and how it is used in almost all 
practical tasks we do.

Past Work Academic work in Mathematics:

Seven Mathematics Courses done in College.

Studied Advanced Calculus, a Textbook by Lynn Harold Loomis and Shlomo 
Sternberg. Used by Harvard Mathematics Department.

Studied Calculus: An Intuitive and Physical Approach (Second Edition), by 
Morris Kline. Used by Harvard Mathematics Department.

Used Algorithmic Calculus for the “Retina Sensor Detection Algorithms” 
project mentioned before. Studied Introduction to Vector Analysis, a 
Textbook by Harry Davis.

Studied Advanced Number Theory, a Textbook by Mollin Richard.

Time Available and Other Commitments:

I have my end-semester examinations from May 1st to 15th. This lies 
completely inside the community bonding period therefore I will complete 
the tasks I was going to do in the community bonding period in 
pre-community bonding period. Other than that, I will be devoting 45-55 hrs 
a week as I have no other commitment during the GSoC period and have great 
interest in the project I want to do with SymPy.

Documentation:

Good documentation is an integral part of any successful project. It also 
helps in receiving a wider acceptance from the developer community. After 
working on the project for some time, I would write a documentation on the 
various aspects of the project.

Communication:

I will be in regular contact with mentors using email. In case I am stuck 
somewhere, I would reach out to them via Gitter Chat and Mailing List. If 
selected, I also plan to make a blog where I will be giving regular updates 
about the work completed. I believe that the problems faced by me and their 
solutions would certainly help other fellow developers later just like I 
have received great help from various blogs on the internet.

Project Details:

Phase 0: (Community Bonding)

In this phase, we explore the existing work done in integration of 
SymEngine with SymPy. We look at the various changes made in the existing 
modules which already have integration of SymEngine with SymPy. We renovate 
and improve documentation of the necessity of the various changes done so 
far. We also keep a track of the difference in speed these changes have 
brought about and also include it in documentation. I have already started 
exploring SymEngine and I believe there is scope for some amount of testing 
and benchmarking. As I will mention in the timeline, this phase is almost 
completely inside the community bonding phase. Hence, I will continue my 
conversation with the mentors at SymEngine and get some information on the 
additional issues SymEngine faces and can work on it.

Phase 1:

We are inside the coding period now. We start off by working on the various 
issues discussed with the mentors and already existing issues in the 
SymEngine repository. Some of the existing issues are below: 
https://github.com/symengine/symengine/issues/1600 
https://github.com/symengine/symengine/issues/1595 
https://github.com/symengine/symengine/issues/912 
https://github.com/symengine/symengine/issues/1324 As Aaron Meurer Sir has 
said before, in a large organization, it happens that issues get neglected. 
I have taken this task before implementing something new because I feel it 
is better to perfect the work already done before working on other modules. 
Shikhar had said as feedback after the GSoC 17 got over that the final work 
he did had some parts different as compared to the ones he proposed. That 
is why I have given some extra time to this phase. If my mentors feel that 
nothing else is required apart from the issues solved. I will move to the 
next phase.

Phase 2:

An interesting thing I have observed with SymPy is that people often 
compare the speed which libraries bring as against the other. The following 
issue highlights it:

https://github.com/symengine/symengine/issues/1589

I want to spend four days exploring how other libraries tackle the issue of 
speed and by exploring their open source github channels to find out what 
different they do for us. I believe this activity can bring great value as 
we might find something which we were unaware of.

After this I will start working with the “Calculus”, “Integrals”, “Stats” 
and “Vectors” modules. I will be working on the ASV benchmark and the 
corresponding code for integration of this module in SymPy with SymEngine. 
The main focus here will be to implement functionalities unavailable right 
now. This task is expected to be heavy and time consuming. We will need to 
implement routines in SymEngine as well as update the python wrapper with 
the latest development.

Phase 3:

I would like to keep a four day buffer as the work in Phase 2 is time 
consuming. These days can also be utilised in debugging and better 
documentation for the work done in the previous modules. I am expecting my 
mentor as well to suggest some extra work which we can do to make this 
implementation innovative so the days may be used there as well.

After this, I would like to give a day on ASV Benchmarking all the modules 
in which SymEngine has been implemented thus far as the main objective of 
this project is for our code to be fast.

After giving the finishing touches to the previous module, we shift our 
focus on the “Number Theory”, “Geometry”, “Series” and “Sets” modules. Like 
before, I will be working on the code for integration of this module in 
SymPy with SymEngine with reference to implementation of unavailable 
functionalities. Since we have worked in a similar manner in Phase 2, I 
believe I will be able to complete the work at least five days before the 
deadline. I would like to implement some additional functionalities in some 
of the previous modules. The last five days will be used for removing bugs, 
solving issues and improving documentation of the work done in GSoC.

Modules I intend to work with:

Phase 2 Modules:

Calculus Integrals Vectors Stats

Phase 3 Modules:

Number Theory Geometry Series Stats

Timeline:

Community Bonding Period: (Present - May 14)

Detailed discussion with mentors about the work I intend to do. Figuring 
out additional work which we can do during with the mentors and deciding 
the timeline for it as well Renovate and improve documentation of existing 
SymEngine integrated modules of SymPy. Starting fixing issues in SymEngine 
(May 14 onwards)

Phase 1:

May 14 to May 21: (Week 1)

Complete working on issues: 
https://github.com/symengine/symengine/issues/1600 
https://github.com/symengine/symengine/issues/1595 PR for both the issues 
by May 22 latest. May 21 to May 28: (Week 2)

Complete working on issues: 
https://github.com/symengine/symengine/issues/912 
https://github.com/symengine/symengine/issues/1324 
https://github.com/symengine/symengine/issues/1601 PR for all three issues 
by May 30 latest. Start Importing changes for pre-implemented 
functions/classes in the “Calculus”, “Integrals”, “Vectors” and “Stats” 
modules.

May 29 to June 4: (Week 3) Finish Importing changes for pre-implemented 
functions/classes in the previous modules. Start working on the additional 
goals decided by me and the mentors.

June 4 to June 11: (Week 4) Continue working on the additional goals 
decided by me and the mentors. PR for the additional tasks by June 12 
latest. Start working on Phase 2 tasks if I finish the tasks decided as 
additional goals.

June 11 to June 15: (Week 5) Exploring how other libraries tackle the issue 
of speed and by exploring their open source github channels.

June 15 to June 18: (Week 5)

Phase 1 evaluation

Benchmarking the work done in phase 1 as per requirements. Start working on 
the Phase 2 Modules.

Phase 2: June 18 to July 1: (Week 6 and 7) Continue working on the Modules 
and its corresponding classes like Euler Equations, Singularities, Finite 
Difference Weights for “Calculus”. Special attention should be given to 
some classes like “Singularities” as the scope of SymEngine implementation 
for them is maximum. First PR for the work done on the Phase 2 modules by 
June 26 latest. First few functionalities will be wrapped up in 
SymEngine.py. Testing to be done as required. Second PR for the work done 
on the Calculus module by July 2 latest.

July 1 to July 15: (Week 8 and 9) Some issues in the SymEngine Github 
repository to be fixed. PR for the work done on the issues by July 8 latest 
Finish all the work in Phase 2 modules Final PR for the work done on the 
Phase 2 modules by July 15 latest All the remaining functionalities will be 
wrapped up in SymEngine.py. Testing to be done as per requirement.

Phase 2 evaluation

Phase 3:

July 15 to July 29: (Week 10 and 11) Debugging and Documentation for Phase 
2 modules. Benchmarking all previous modules where SymEngine is used. The 
above tasks to be completed by July 19 latest. Start working on the Phase 3 
Modules and its corresponding classes. Special attention should be given to 
some classes where scope of SymEngine implementation is maximum. First PR 
for the work done on the Phase 3 module by July 27 latest.

July 29 to August 12: (Week 12 and 13) Continue my work on the Phase 3 
Modules. Most of the work will be completed by August 5 Second PR for the 
work done on the Phase 3 modules by August 5 latest.

Make sure that all routines are implemented in SymEngine Implement some 
additional functionalities in Phase 2 and 3 modules. Additional work 
depending on the discussion with mentors.

August 12 to August 17: (Week 14) Complete my work on the Phase 3 modules. 
Final PR for the work done on the Phase 3 modules by August 12 latest. 
Finishing up documentation and blogs Checking for any issues or conflicts 
unattended Final Benchmarking and updating it to SymPy wiki Submission for 
Final Evaluation by August 14 latest.

I plan on implementing SymEngine in some modules of SymPy across all 
functions and classes in it which are compatible with SymEngine. I expect 
to finish the tasks about 7 days earlier than the timeline above. If I 
don’t, I will request the Mentors to allow me to work for a few days more 
on my additional goals. If I am allowed to do so, I would love to work on 
the additional goals below. Some of them were proposed by Shikhar, but he 
could not work on it due to time constraint.

Additional Goals: Explore the modules “Logic” and “ODE” and find out 
Functions where SymEngine can be implemented and work on the same. Adding 
Documentation for SymEngine. Exploring and suggesting steps for Thread 
safety in SymEngine.

References:

https://github.com/ShikharJ/GSoC-2017-Work-Report 
https://github.com/sympy/sympy/wiki/GSoC-2017-Application-Shikhar-Jaiswal:-Improving-SymEngine's-Python-Wrappers-and-SymPy-SymEngine-Integration
 
https://github.com/sympy/sympy/wiki/GSoC-2020-Ideas#improve-sympy-integration
 https://github.com/symengine/symengine/wiki/SymPy-core-upgrade-to-SymEngine
 
https://github.com/symengine/symengine/wiki/Beginner-Contributor-Guide-Design-of-SymEngine
 https://github.com/symengine/symengine/wiki/Building-SymEngine

Proposals on Wiki

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/9a3b8ba9-830c-4ee1-804e-163cdd003511%40googlegroups.com.

Reply via email to