8000 Update on "[pytree] support PyStructSequence types for Python pytree" · pytorch/pytorch@e52b263 · GitHub
[go: up one dir, main page]

Skip to content

Commit e52b263

Browse files
committed
Update on "[pytree] support PyStructSequence types for Python pytree"
Resolves #75982 - #75982 cc zou3519 [ghstack-poisoned]
2 parents 10d047e + c1d0b9e commit e52b263

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/test_pytree.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ def run_test(ddct):
237237

238238
unflattened = pytree_impl.tree_unflatten(values, treespec)
239239
self.assertEqual(unflattened, ddct)
240+
self.assertEqual(unflattened.default_factory, ddct.default_factory)
240241
self.assertTrue(isinstance(unflattened, defaultdict))
241242

242243
run_test(defaultdict(list, {}))

0 commit comments

Comments
 (0)
0