Real World Numba: Taking the Path of Least Resistance

Ankit Mahato (~ankit60)


Description:

“Use a screwdriver instead of a hammer. Try to untighten the nut with your hand. Utilize the path of least resistance first.” - Tim Allen

The prominent reasons for the wide adoption of Python is the ease of learning, usability and readability coupled with the powerful ecosystem of Python packages. This often makes Python an attractive language for researchers & scholars to undertake computational projects and thesis. The ease of prototyping and tinkering also allows for higher number of iterations and customization in the project, leading to increase in research output. But, one of the pain points of Python is its speed when compared to languages like C++ or FORTRAN which are still widely used in research.

Scholars, when hit by the performance bottleneck of pure python code, often come across some methods to increase their code performance like using PyMPI, Numpy or CPython. But, the learning curve is steep as things get less familiar. If learning Python is so easy, why should increasing the performance of Python code be so difficult?

This talk will address this question and introduce Numba, an open source JIT compiler that translates Python and NumPy code into fast machine code. 3 real world computational problems and their Numba counter-parts will be presented to the audience to demonstrate the ease and effectiveness of using Numba. Thereby showcasing how it can be useful in lowering the barrier to achieve code performance for scientific computing using Python.

The talk will cover the following sections:

  1. Why Numba is the path of least resistance - 4 mins
  2. Use Case #1: Mandelbrot Set - 7 mins
  3. Use Case #2: Diffusion (Heat Transfer) - 7 mins
  4. Use Case #3: Neural Network - 7 mins
  5. Closing Remarks and Q&A - 5 mins

The code review of the 3 Numba use cases will be done using Jupyter Notebooks.

Prerequisites:

Technical:

Basic Python Programming

Software:

Anaconda Suite for Python 3 with pre-installed python packages: numba, numpy

https://www.anaconda.com/distribution/

Content URLs:

Preview Video of Talk (2 mins) - https://youtu.be/HxBdjjKufTg

Talk Slides - https://www.slideshare.net/secret/4dGf1giJtNETS4

The slides will be accompanied by Numba codes for the discussed use cases during the talk.

Speaker Info:

A die hard Pythonista, Ankit is an open source contributor and a former Google Summer of Code scholar under Python Software Foundation. Currently, he is working in the domain of scientific computing and developing the open source Portable Format for Analytics (PFA) implementation - Titus on Python 3 and volunteering for the Raspberry Pi Foundation.

Ankit has 5+ years of industrial experience (Associate - JP Morgan, Data Scientist & Product Manager - Fuzzy Logix, USA) in machine learning, quantitative modelling, data analytics and visualization. Over the years, he has developed an expertise in handling the entire data analytics pipeline comprising – ingestion, exploration, transformation, modeling and deployment. He is a polyglot programmer with an extensive knowledge of algorithms, statistics and parallel programming. He has shipped multiple releases of DB Lytix, a comprehensive library of over 800 mathematical and statistical functions used widely in data mining, machine learning and analytics applications, including “big data analytics”.

An IIT Kanpur alumnus, Ankit is also an active researcher with publications on scientific computing (Paper Link 1, Research Gate Profile) in international journal and conferences. He is actively working in the domain of Analytics and has presented his work in the Data Science Congress 2018, 5th IIMA International Conference on Advanced Data Analysis, Business Analytics and Intelligence 2017 and SciPy India 2017. He is also an active contributor to the Indian Python Community and has conducted workshops in PyCon India 2017 and Scipy India 2017 & 2018.

Section: Scientific Computing
Type: Talks
Target Audience: Beginner
Last Updated: