Current code executor class is fairly simple. It attempts to clean/filter the code, and based on the specified library (e.g. matplotlib, seaborn, altair etc), we compile the code (eval) and retrieve a chart object.
There are a few areas that could be could be improved:
How
[ ] Module not found detection and resolution. In some cases, the generated code may require modules that are not installed (e.g., maps etc).
It would be good to implement a strategy to explicitly discover and address this (e.g., instal the library if it is on a list of preappreoved libraries) or return an actionable error message.
[ ] Sandboxed code execution: Code is executed on the local machine ❌ 💀 . It would be good to figure out some sort of (lightweight) docker sandboxing setup where we setup a docker env with installed deps for code execution.
What
Current code executor class is fairly simple. It attempts to clean/filter the code, and based on the specified library (e.g. matplotlib, seaborn, altair etc), we compile the code (eval) and retrieve a chart object.
There are a few areas that could be could be improved:
How