← optimization package
Apply a library-based transformation to a graph and invoke the resulting graph with some arguments.
This node should not be used directly by the user; the node is a helper to implement other nodes that apply Python function transformations to NeuroPype graphs, for example the jax operations grad or jit. Note: for any tuples that the library-transformed function would normally emit, this will instead emit lists.
Version 0.5.0
Ports/Properties
graph
Graph to invoke.
- verbose name
- Graph
- default value
- None
- port type
- GraphPort
- value type
- Graph
graph__signature
Signature for the "graph" input. This represents the signature for the subgraph that is wired into the "graph" port. This is formatted as in (a,b,c) where a,b,c are names of placeholders that are expected in the subgraph that goes into the "graph" port. Alternatively, it can also be provided in data structure form as a list of lists, as in: [['a','b','c']].
- verbose name
- Graph [Signature]
- default value
- (params)
- port type
- Port
- value type
- object (can be None)
result
Result of the transformed graph invoked with the given arguments.
- verbose name
- Result
- default value
- None
- port type
- DataPort
- value type
- object (can be None)
- data direction
- OUT
operator
Transform to apply to the graph.
- verbose name
- Operator
- default value
- jax.grad
- port type
- EnumPort
- value type
- str (can be None)
config
Optional configuration (keyword arguments) for the transform operator.
- verbose name
- Config
- default value
- {}
- port type
- DictPort
- value type
- dict (can be None)
detect_changes
How often to check for changes in the graph. The eager mode checks for changes before every run, which is safest during interactive editing of the graph being compiled, but this adds considerable overhead. The lax mode checks for changes only occasionally (every few calls), and logs a warning when a change is detected, and recompiles the graph then. It will run with the old graph until the change is detected. The never mode never checks for changes, and only compiles the graph at the beginning; this is useful for production runs where the graph being compiled is no longer modified. Note that downstream graph edits can be made freely in any mode as they do not affect the compiled portion of the graph.
- verbose name
- Detect Changes
- default value
- eager
- port type
- EnumPort
- value type
- str (can be None)
arg1
Argument 1.
- verbose name
- Arg1
- default value
- None
- port type
- DataPort
- value type
- object (can be None)
- data direction
- IN
arg2
Argument 2.
- verbose name
- Arg2
- default value
- None
- port type
- DataPort
- value type
- object (can be None)
- data direction
- IN
arg3
Argument 3.
- verbose name
- Arg3
- default value
- None
- port type
- DataPort
- value type
- object (can be None)
- data direction
- IN
arg4
Argument 4.
- verbose name
- Arg4
- default value
- None
- port type
- DataPort
- value type
- object (can be None)
- data direction
- IN
arg5
Argument 5.
- verbose name
- Arg5
- default value
- None
- port type
- DataPort
- value type
- object (can be None)
- data direction
- IN
arg6
Argument 6.
- verbose name
- Arg6
- default value
- None
- port type
- DataPort
- value type
- object (can be None)
- data direction
- IN
arg7
Argument 7.
- verbose name
- Arg7
- default value
- None
- port type
- DataPort
- value type
- object (can be None)
- data direction
- IN
arg8
Argument 8.
- verbose name
- Arg8
- default value
- None
- port type
- DataPort
- value type
- object (can be None)
- data direction
- IN
arg9
Argument 9.
- verbose name
- Arg9
- default value
- None
- port type
- DataPort
- value type
- object (can be None)
- data direction
- IN
argN
Additional arguments.. .
- verbose name
- Argn
- default value
- None
- port type
- DataPort
- value type
- list (can be None)
- data direction
- IN
name1
Name 1.
- verbose name
- Name1
- default value
- None
- port type
- StringPort
- value type
- str (can be None)
val1
Value 1.
- verbose name
- Val1
- default value
- None
- port type
- DataPort
- value type
- object (can be None)
- data direction
- IN
name2
Name 2.
- verbose name
- Name2
- default value
- None
- port type
- StringPort
- value type
- str (can be None)
val2
Value 2.
- verbose name
- Val2
- default value
- None
- port type
- DataPort
- value type
- object (can be None)
- data direction
- IN
name3
Name 3.
- verbose name
- Name3
- default value
- None
- port type
- StringPort
- value type
- str (can be None)
val3
Value 3.
- verbose name
- Val3
- default value
- None
- port type
- DataPort
- value type
- object (can be None)
- data direction
- IN
name4
Name 4.
- verbose name
- Name4
- default value
- None
- port type
- StringPort
- value type
- str (can be None)
val4
Value 4.
- verbose name
- Val4
- default value
- None
- port type
- DataPort
- value type
- object (can be None)
- data direction
- IN
name5
Name 5.
- verbose name
- Name5
- default value
- None
- port type
- StringPort
- value type
- str (can be None)
val5
Value 5.
- verbose name
- Val5
- default value
- None
- port type
- DataPort
- value type
- object (can be None)
- data direction
- IN
name6
Name 6.
- verbose name
- Name6
- default value
- None
- port type
- StringPort
- value type
- str (can be None)
val6
Value 6.
- verbose name
- Val6
- default value
- None
- port type
- DataPort
- value type
- object (can be None)
- data direction
- IN
name7
Name 7.
- verbose name
- Name7
- default value
- None
- port type
- StringPort
- value type
- str (can be None)
val7
Value 7.
- verbose name
- Val7
- default value
- None
- port type
- DataPort
- value type
- object (can be None)
- data direction
- IN
name8
Name 8.
- verbose name
- Name8
- default value
- None
- port type
- StringPort
- value type
- str (can be None)
val8
Value 8.
- verbose name
- Val8
- default value
- None
- port type
- DataPort
- value type
- object (can be None)
- data direction
- IN
name9
Name 9.
- verbose name
- Name9
- default value
- None
- port type
- StringPort
- value type
- str (can be None)
val9
Value 9.
- verbose name
- Val9
- default value
- None
- port type
- DataPort
- value type
- object (can be None)
- data direction
- IN
nameN
Additional argument names.. .
- verbose name
- Namen
- default value
- None
- port type
- ListPort
- value type
- list (can be None)
valN
Additional named argument values.. .
- verbose name
- Valn
- default value
- None
- port type
- DataPort
- value type
- list (can be None)
- data direction
- IN
arg0
Argument 0.
- verbose name
- Arg0
- default value
- None
- port type
- DataPort
- value type
- object (can be None)
- data direction
- IN
name0
Name 0.
- verbose name
- Name0
- default value
- None
- port type
- StringPort
- value type
- str (can be None)
val0
Value 0.
- verbose name
- Val0
- default value
- None
- port type
- DataPort
- value type
- object (can be None)
- data direction
- IN
set_breakpoint
Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.
- verbose name
- Set Breakpoint (Debug Only)
- default value
- False
- port type
- BoolPort
- value type
- bool (can be None)
User-definable meta-data associated with the node. Usually reserved for technical purposes.
- verbose name
- Metadata
- default value
- {}
- port type
- DictPort
- value type
- dict (can be None)