Summary (English)
Machine learning and data science are increasingly demanding computational resources. High-performance computing resources are concentrated in the ultra-large computing environment and cloud computing. At the same time, more and more people are entering machine learning and data science field. Not only cluster computing resources are increasing, but personal computers computing resources are also advancing rapidly. So, is there a way to use this local environment and perform scientific calculations anywhere easily? If you're still a beginner and don't have to go to distributed processing or large-scale pipelines, even more!
In this talk, you will learn how to use a Python-based scientific computing environment and machine learning environment through a browser engine without server-side computation. The talk describes the history of technological changes surrounding the web environment in recent years, leading to the Iodide project, an experimental project of the Mozilla Foundation to build a scientific computing environment based on WebAssembly. After that, I introduce the Pyodide project and build process that builds a Python environment based on WebAssembly using iodide. Using Pyodide, I share experiences of developing garage open-source desktop apps and web page that provide a browser-only Python environment.
For practical use, I demonstrate the process of performing various small scientific operations based on Python+WebAssembly with the platform described above, performing data analysis using Pandas on a browser, and drawing graphs using Matplotlib libraries. It also demonstrates the process of training a simple machine learning model by directly linking this data with TensorFlow.js. Lastly, based on the performance measurement results and some advantages and disadvantages seen in the demonstration process, we will talk about the fascinating potential of Python to expand into new areas, as well as the technical limitations of the WebAssembly-based python runtime and scientific computing environment.
Summary (Korean)
๋จธ์ ๋ฌ๋ ๋ฐ ๋ฐ์ดํฐ ๊ณผํ ๋ถ์ผ๋ ๊ฐ์๋ก ๋ง์ ์ฐ์ฐ ์์์ ์๊ตฌํฉ๋๋ค. ๊ณ ์ฑ๋ฅ ์ปดํจํ ์์์ ์ด๋๊ท๋ชจ ์ฐ์ฐ ํ๊ฒฝ๊ณผ ํด๋ผ์ฐ๋๋ก ์ง์ค๋๊ณ ์์ต๋๋ค. ๋์์, ๋จธ์ ๋ฌ๋ ๋ฐ ๋ฐ์ดํฐ ๊ณผํ์ ์ ๋ฌธํ๋ ์ฌ๋๋ค ๋ํ ํด๊ฐ ๊ฐ์๋ก ๋์ด๋๊ณ ์์ต๋๋ค. ์๋ฒ ์ฐ์ฐ ์์๋ง ๋์ด๋๋ ๊ฒ์ด ์๋๋ผ ๊ฐ์ธ์ฉ ์ปดํจํฐ์ ์ฐ์ฐ ์์ ๋ํ ๋น ๋ฅด๊ฒ ์ฆ๊ฐํ๊ณ ์์ต๋๋ค. ๊ทธ๋ผ ์ด ํ๊ฒฝ์ ์ข ๋ ์ฝ๊ฒ ์ ์จ์ ์ด๋์๋ ๊ณผํ ์ฐ์ฐ์ ์ฝ๊ฒ ํด ๋ณผ ์ ์๋ ๋ฐฉ๋ฒ์ ์์๊น์? ์์ง ์ ๋ฌธ์๋ผ์ ๋ถ์ฐ ์ฒ๋ฆฌ๋ ๋์ฉ๋ ํ์ดํ๋ผ์ธ๊น์ง ์ ๊ฐ๋ ๋๋ ๊ฒฝ์ฐ๋ผ๋ฉด ๋๋์ฑ!
์ด ์ธ์ ์์๋ Python ๊ธฐ๋ฐ์ ๊ณผํ ์ฐ์ฐ ํ๊ฒฝ ๋ฐ ๋จธ์ ๋ฌ๋ ํ๊ฒฝ์ ์๋ฒ์ธก ์ฐ์ฐ ์์ด ๋ธ๋ผ์ฐ์ ์์ง์ ํตํด ์ฌ์ฉํ๋ ๋ฐฉ๋ฒ์ ๋ํด ์์๋ด ๋๋ค. ์ต๊ทผ ๋ช ๋ ๋์์ ์นํ๊ฒฝ์ ๋๋ฌ์ผ ๊ธฐ์ ์ ์ธ ๋ณํ๊ฐ, WebAssembly ๊ธฐ๋ฐ์ ๊ณผํ ์ฐ์ฐํ๊ฒฝ์ ๊ตฌ์ถํ๋ ค๋ Mozilla ์ฌ๋จ์ ์คํ ํ๋ก์ ํธ์ธ Iodide ํ๋ก์ ํธ๋ก ์ด์ด์ง ๊ณผ์ ์ ์ค๋ช ํฉ๋๋ค. ๊ทธ ํ, iodide๋ฅผ ์ด์ฉํ์ฌ WebAssembly๊ธฐ๋ฐ์ Python ํ๊ฒฝ์ ๊ตฌ์ถํ๋ Pyodide ํ๋ก์ ํธ ๋ฐ ๋น๋ ๊ณผ์ ์ ์๊ฐํฉ๋๋ค. Pyodide๋ฅผ ์ด์ฉํ์ฌ, ๋ธ๋ผ์ฐ์ ๋จ๋ ์ผ๋ก ์คํ ๊ฐ๋ฅํ Python ํ๊ฒฝ์ ์ ๊ณตํ๋ ์คํ์์ค ๋ฐ์คํฌํ ์ฑ ๋ฐ ์น์ ๊ฐ์ธ์ ์ผ๋ก ๊ฐ๋ฐํ ๊ฒฝํ์ ๊ณต์ ํฉ๋๋ค.
์ค์ ์ฌ์ฉ์๋ฅผ ์ํด, ์์์ ์ค๋ช ํ ํ๋ซํผ์ผ๋ก Python+WebAssembly ๊ธฐ๋ฐ์ ์ฌ๋ฌ๊ฐ์ง ์์ ๊ณผํ ์ฐ์ฐ์ ์ํํ๋ ๊ณผ์ ์ ๋ธ๋ผ์ฐ์ ์์์ Pandas๋ฅผ ์ด์ฉํด ๋ฐ์ดํฐ ๋ถ์์ ์ํํ๊ณ Matplotlib ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ด์ฉํด ๊ทธ๋ํ๋ฅผ ๊ทธ๋ฆฌ๋ ๊ณผ์ ์ ์์ฐํฉ๋๋ค. ๋ํ ์ด๋ ๊ฒ ๋์จ ๋ฐ์ดํฐ๋ฅผ TensorFlow.js์ ๋ฐ๋ก ์ฐ๋ํ์ฌ ๊ฐ๋จํ ๋จธ์ ๋ฌ๋ ๋ชจ๋ธ์ ํ๋ จํ๋ ๊ณผ์ ์ ๋ฐ๋ชจํฉ๋๋ค. ๋ง์ง๋ง์ผ๋ก๋ ์์์ ๋ค๋ฃฌ ์ฑ๋ฅ ์ธก์ ๊ฒฐ๊ณผ ๋ฐ ์์ฐ ๊ณผ์ ์์ ๋ณด์ด๋ ๋ช๊ฐ์ง ์ฅ๋จ์ ์ ๋ฐํ์ผ๋ก, WebAssembly ๊ธฐ๋ฐ์ python ๋ฐํ์ ๋ฐ ๊ณผํ ์ฐ์ฐ ํ๊ฒฝ์ ๊ธฐ์ ์ ์ธ ํ๊ณ๋ฅผ ์ด์ผ๊ธฐํ๊ณ , ๊ทธ๋ผ์๋ ๋ถ๊ตฌํ๊ณ ๋งค๋ ฅ์ ์ธ Python์ ์๋ก์ด ์์ญ์ผ๋ก์ ํ์ฅ ๊ฐ๋ฅ์ฑ์ ๋ํด์๋ ๋ค๋ฃจ์ด ๋ณด๊ฒ ์ต๋๋ค.