Hi @user106225
For future reference pasting the graph error:
####################################
could not unroll graph!
This is probably because you are asking to compute a value that is not an output of any node
####################################
invar: [x, y, normal_x, normal_y, area]
requested var: [dummy_eq]
computable var: [x, y, normal_x, normal_y, area, continuity, u, v, p, temp, momentum_x, momentum_y]
####################################
Nodes in graph:
node: Sympy Node: continuity
evaluate: SympyToTorch
inputs: []
derivatives: [u__x, v__y]
outputs: [continuity]
optimize: False
node: Sympy Node: momentum_x
evaluate: SympyToTorch
inputs: [u, v]
derivatives: [p__x, u__x, u__x__x, u__y, u__y__y]
outputs: [momentum_x]
optimize: False
node: Sympy Node: momentum_y
evaluate: SympyToTorch
inputs: [u, v]
derivatives: [p__y, v__x, v__x__x, v__y, v__y__y]
outputs: [momentum_y]
optimize: False
node: Sympy Node: dummy_eq
evaluate: SympyToTorch
inputs: [dummy]
derivatives: []
outputs: [dummy_eq]
optimize: False
node: Arch Node: flow_network
evaluate: FullyConnectedArch
inputs: [x, y]
derivatives: []
outputs: [u, v, p]
optimize: True
node: Arch Node: dummy_network
evaluate: FullyConnectedArch
inputs: [dummy_input_scaled]
derivatives: []
outputs: [dummy_output_scaled]
optimize: True
node: Sympy Node: temp
evaluate: SympyToTorch
inputs: [u, v]
derivatives: []
outputs: [temp]
optimize: False
node: Sympy Node: dummy_input_scaled
evaluate: SympyToTorch
inputs: [temp_scaled]
derivatives: []
outputs: [dummy_input_scaled]
optimize: False
node: Node
evaluate: _Scale
inputs: [u, v, p, temp, dummy_output_scaled]
derivatives: []
outputs: [u_scaled, v_scaled, p_scaled, temp_scaled, dummy]
optimize: False
####################################
Is very insightful, but thanks for posting your script with a minimal working example. From looking at your code I think the problem is you have a cyclic dependency in your graph when using you use the non-dim node (swapping out for line 81 removed the non-dim node from your graph). This type of error is a little more tricky to spot than other graph issues.
I think the issue is with these three nodes:
+ [dummy_net.make_node(name="dummy_network")]
+ [Node.from_sympy(log(Symbol('temp_scaled')), 'dummy_input_scaled')]
+ Scaler(
['u', 'v', 'p', 'temp', 'dummy_output_scaled'],
['u_scaled', 'v_scaled', 'p_scaled', 'temp_scaled', 'dummy'],
['m/s', 'm/s', 'm^2/s^2', 'm/s', 's/m'],
nd,
).make_node()
In short:
- Your dummy network needs
dummy_input_scaled
- Your SymPy node needs
temp_scaled
to get dummy_input_scaled
- Your Scaler node needs
dummy_output_scaled
to get temp_scaled
which is the output of dummy network
The result is a cyclic graph which cannot be executed. Removing dummy_output_scaled
from the input of the Scaler node allows the script to build the graph since this makes the symbolic graph a DAG. (Granted this now means dummy
variable is now not produced so I would create a separate Scalar node to go from dummy_output_scaled
to dummy
).