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
It would be preferred if we had a mechanism to save/load models in a way that is safe with respect to pickling - that is, can reliably be expected not to contain arbitrary python objects.
A simple thing we can do, which I have done on a script-based level, is record model creation function in a python file, and other data in json. It may be difficult to serialize the full model construction to a non-python format because of the graph-based model creation system, which allows arguments for different nodes, and even allows nodes to use different modules behind the scenes. However, in the typical case building a model can be reduced to a user task requiring only a handful of lines of code. While such an artefact does techncially contain the possibility of arbitrary code, it can be readily and quickly inspected by a user. The network hyperparameters went to a json file, and the weights to another json. Various related format options are possible. The main point would be to get these into a re-usable set of functions in the library.
The text was updated successfully, but these errors were encountered:
lubbersnick
changed the title
Add mechanism for creating networks from plaintext of similar
Add mechanism for creating networks from plaintext or similar
Sep 4, 2024
See related #94 .
It would be preferred if we had a mechanism to save/load models in a way that is safe with respect to pickling - that is, can reliably be expected not to contain arbitrary python objects.
A simple thing we can do, which I have done on a script-based level, is record model creation function in a python file, and other data in json. It may be difficult to serialize the full model construction to a non-python format because of the graph-based model creation system, which allows arguments for different nodes, and even allows nodes to use different modules behind the scenes. However, in the typical case building a model can be reduced to a user task requiring only a handful of lines of code. While such an artefact does techncially contain the possibility of arbitrary code, it can be readily and quickly inspected by a user. The network hyperparameters went to a json file, and the weights to another json. Various related format options are possible. The main point would be to get these into a re-usable set of functions in the library.
The text was updated successfully, but these errors were encountered: