mirror of
https://github.com/finegrain-ai/refiners.git
synced 2024-11-22 06:08:46 +00:00
remove Chain.__add__
This commit is contained in:
parent
07954a55ab
commit
be961af4d9
|
@ -285,13 +285,6 @@ class Chain(ContextModule):
|
|||
def _regenerate_keys(self, modules: Iterable[Module]) -> None:
|
||||
self._modules = generate_unique_names(tuple(modules)) # type: ignore
|
||||
|
||||
def __add__(self, other: "Chain | Module | list[Module]") -> "Chain":
|
||||
if isinstance(other, Module):
|
||||
other = Chain(other)
|
||||
if isinstance(other, list):
|
||||
other = Chain(*other)
|
||||
return Chain(*self, *other)
|
||||
|
||||
@overload
|
||||
def __getitem__(self, key: int) -> Module:
|
||||
...
|
||||
|
|
Loading…
Reference in a new issue