mirror of
https://github.com/finegrain-ai/refiners.git
synced 2024-11-24 15:18:46 +00:00
correctly initialize context in structural_copy
fixes a regression introduced in 1cb798e8ae
This commit is contained in:
parent
cd1fdb5585
commit
fad4f371ea
|
@ -376,7 +376,7 @@ class Chain(ContextModule):
|
||||||
|
|
||||||
modules = [structural_copy(m) for m in self]
|
modules = [structural_copy(m) for m in self]
|
||||||
clone = super().structural_copy()
|
clone = super().structural_copy()
|
||||||
clone._provider = ContextProvider()
|
clone._provider = ContextProvider.create(clone.init_context())
|
||||||
|
|
||||||
for module in modules:
|
for module in modules:
|
||||||
clone.append(module=module)
|
clone.append(module=module)
|
||||||
|
|
Loading…
Reference in a new issue