-
Notifications
You must be signed in to change notification settings - Fork 2
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
Node constructor #497
Comments
Almost always -- the one exception is instantiating a
Optional arguments are indeed used to set default values for inputs, but not necessarily all of them -- nodes also come with their own kwargs that can be set at instantiation. When you're making import pyiron_workflow as pwf
@pwf.as_function_node
def my_bad_io(label):
return label
>>> ValueError: Trying to build input preview for my_bad_io, encountered an argument name that conflicts with __init__: label. Please choose a name _not_ among ['self', 'args', 'label', 'parent', 'delete_existing_savefiles', 'autoload', 'autorun', 'checkpoint', 'kwargs'] Both
|
I can use |
Within the scope of its ownership graph, yes. I could have two node objects in memory in a single python session that have the same |
Regardless of the way I write a
node
, it always has a__init__
function that takes no required arguments and all optional arguments are used to set default values for inputs?The text was updated successfully, but these errors were encountered: