QuantEcon / meta

For issues and discussion covering more than one repository
0 stars 0 forks source link

[Plan/Idea] Supporting WASM based introductory series #143

Open kp992 opened 4 weeks ago

kp992 commented 4 weeks ago

The plan of the project is to enable WASM/JupyterLite support for each of the lectures in https://github.com/QuantEcon/lecture-python-intro.

Success metric

Our main aim and success metric of this project is to maximize the number of WASM backed lectures from lecture-python-intro.

Support

In order to ease the development and track the lectures, I have the following idea.

  1. A python script that can sync and find out lectures from lecture-python-intro which are not compatible with WASM.
  2. A test script will be written for lecture-python-intro CI which will help us when a lecture is successfully made WASM compatible in lecture-python-intro, we mark that lecture has completed in lecture-python-intro and will be included in the testing script. So whenever a new change is introduced in lecture-python-intro series, we ensure that we don't break the WASM compatibility.
  3. A batch update python script which will fetch the lectures from lecture-python-intro series and convert all possible lectures to WASM and update the repository project.lecture-wasm. This script can be ran on weekly basis to pick up changes from the last week and make them live on project.lecture-wasm.

Execution

  1. We will run the first script and pull out the list of lectures and assign it to the RAs. Once the RA has completed the task we mark the lecture as completed, and we include it into the testing scope (script 2).
  2. We will run the third script on weekly basis to make the project changes live on WASM website.

Probable blockers and tackling strategy

There may be a few lectures where we use quantecon or numba. In such lectures, we need to investigate three possibilities:

  1. If there are small changes that doesn't affect the performance by a great margin then modify the existing lecture.
  2. If there are changes that affect the performance by considerable margin then copy and re-write the lecture for wasm series only and keep the existing lecture unchanged. This way we cover the content but compromise performance just for WASM.
  3. If there is no way we can support the WASM backend, mark the lecture as blocked - with documentation of why it is blocked. This will help us find lectures in future to recall and re-visit them if the blocker is fixed. For example, some lecture is using JAX and there is method which is not available in pure python, we are blocked.

@mmcky, @jstac - Please review the plan and please feel free to suggest any changes.

Thank you.

mmcky commented 3 weeks ago

thanks so much @kp992 this is looking great. I will review it in detail tomorrow. Thanks for putting this together, it is a big help.