correctly initialize context in structural_copy

fixes a regression introduced in 1cb798e8ae
This commit is contained in:
Pierre Chapuis 2023-09-21 11:14:28 +02:00
parent cd1fdb5585
commit fad4f371ea

View file

@ -376,7 +376,7 @@ class Chain(ContextModule):
modules = [structural_copy(m) for m in self]
clone = super().structural_copy()
clone._provider = ContextProvider()
clone._provider = ContextProvider.create(clone.init_context())
for module in modules:
clone.append(module=module)