Closed damin604 closed 1 year ago
Version: 1.2.0
from wtpsplit import WtP wtp = WtP("wtp-canine-s-12l-no-adapters") wtp.to("cuda")
throws,
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) test.ipynb Cell 6 in 4 [1] from wtpsplit import WtP [3] wtp = WtP("wtp-canine-s-12l-no-adapters") ----> [4] wtp.to("cuda") File (site-packages/wtpsplit/__init__.py:115), in WtP.__getattr__(self, name) 114 def __getattr__(self, name): --> 115 return getattr(self.model, name) AttributeError: 'PyTorchWrapper' object has no attribute 'to'
The issue is due to the nested wtp.model.model not being handled by the __getattr__ method. Calling wtp.model.model.to("cuda") works.
wtp.model.model
__getattr__
wtp.model.model.to("cuda")
Thanks for the issue, was a regression from 1.2.0. It's fixed in 1.2.1!
Version: 1.2.0
throws,
The issue is due to the nested
wtp.model.model
not being handled by the__getattr__
method. Callingwtp.model.model.to("cuda")
works.