-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid serializing functions #467
Comments
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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: