ExplainaBoard
ExplainaBoard copied to clipboard
Avoid serializing functions
Current serialization attempt to serialize functions via inspect.getsource
:
https://github.com/neulab/ExplainaBoard/blob/df48ff1792bd912087ba644cae695181e6f26e67/explainaboard/serialization/legacy.py#L26-L27
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
I think that's fine. This serialization was more for reference, and I never intended the code to be deserialized and used.
Is there no utilization of this feature? If so we can just remove this.
Yeah, I think it can be removed for now.