We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b6a683e commit 11ca8f1Copy full SHA for 11ca8f1
tests/nnx/graph_utils_test.py
@@ -1464,11 +1464,11 @@ def test_iter_graph(self, graph):
1464
root.x = child
1465
root.y = jnp.ones(2)
1466
1467
- nodes = [node for _, node in nnx.graph.iter_graph(root, graph=graph)]
1468
- self.assertIn(var0, nodes)
1469
- self.assertIn(var1, nodes)
1470
- self.assertIn(child, nodes)
1471
- self.assertIn(root, nodes)
+ node_ids = [id(node) for _, node in nnx.graph.iter_graph(root, graph=graph)]
+ self.assertIn(id(var0), node_ids)
+ self.assertIn(id(var1), node_ids)
+ self.assertIn(id(child), node_ids)
+ self.assertIn(id(root), node_ids)
1472
1473
def test_iter_graph_tree_mode_shared_variable_raises(self):
1474
var = nnx.Variable(jnp.zeros(1))
0 commit comments