You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, this function supports only limited cases: given callables have to be represented as a substantial source, and builtin/synthesized functions can't be supported. Basically we don't have complete way to serialize functions.
In addition, storing runnable code to loadable data is dangerous because it opens a door to attack the system. If we don't have any special demands, it is better to avoid this functionality from the codebase.
Current serialization attempt to serialize functions via
inspect.getsource
:ExplainaBoard/explainaboard/serialization/legacy.py
Lines 26 to 27 in df48ff1
However, this function supports only limited cases: given callables have to be represented as a substantial source, and builtin/synthesized functions can't be supported. Basically we don't have complete way to serialize functions.
In addition, storing runnable code to loadable data is dangerous because it opens a door to attack the system. If we don't have any special demands, it is better to avoid this functionality from the codebase.
RFC: @neubig
The text was updated successfully, but these errors were encountered: