mirror of
https://github.com/finegrain-ai/refiners.git
synced 2024-11-09 23:12:02 +00:00
remove unused dunder methods on ContextProvider
This commit is contained in:
parent
aa87c303be
commit
849c0058df
|
@ -29,17 +29,6 @@ class ContextProvider:
|
||||||
provider.update_contexts(contexts)
|
provider.update_contexts(contexts)
|
||||||
return provider
|
return provider
|
||||||
|
|
||||||
def __add__(self, other: "ContextProvider") -> "ContextProvider":
|
|
||||||
self.contexts.update(other.contexts)
|
|
||||||
return self
|
|
||||||
|
|
||||||
def __lshift__(self, other: "ContextProvider") -> "ContextProvider":
|
|
||||||
other.contexts.update(self.contexts)
|
|
||||||
return other
|
|
||||||
|
|
||||||
def __bool__(self) -> bool:
|
|
||||||
return bool(self.contexts)
|
|
||||||
|
|
||||||
def _get_repr_for_value(self, value: Any) -> str:
|
def _get_repr_for_value(self, value: Any) -> str:
|
||||||
if isinstance(value, Tensor):
|
if isinstance(value, Tensor):
|
||||||
return f"Tensor(shape={value.shape}, dtype={value.dtype}, device={value.device})"
|
return f"Tensor(shape={value.shape}, dtype={value.dtype}, device={value.device})"
|
||||||
|
|
Loading…
Reference in a new issue