-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow the usage of lambdas for
InputPort
default values (#3465)
This is made possible by upgrading `plumpy` to version `0.14.3`. This functionality is useful to define defaults that should change at each invocation, for example the generation of a seed. However, it also provides a way to avoid the issues that arise when defining a default to be an instance of a `Node`. Since a node instance is always regarded as a mutable type by python, regardless whether it is stored or not, it can cause unexpected behavior. For example when the node appointed to the default value of a port is deleted in the database, the memory instance remains and points to a no longer existing database row. The next time it is accessed an exception will be thrown. Using a lambda avoids this problem.
- Loading branch information
Showing
5 changed files
with
44 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters