mirror of
https://github.com/finegrain-ai/refiners.git
synced 2024-11-21 21:58:47 +00:00
display weighted module dtype and device (#173)
Co-authored-by: Benjamin Trom <benjamintrom@gmail.com>
This commit is contained in:
parent
14ce2f50f9
commit
457c3f5cbd
|
@ -164,6 +164,9 @@ class WeightedModule(Module):
|
|||
def dtype(self) -> DType:
|
||||
return self.weight.dtype
|
||||
|
||||
def __str__(self) -> str:
|
||||
return f"{super().__str__().removesuffix(')')}, device={self.device}, dtype={str(self.dtype).removeprefix('torch.')})"
|
||||
|
||||
|
||||
class TreeNode(TypedDict):
|
||||
value: str
|
||||
|
|
Loading…
Reference in a new issue