152334H / DL-Art-School

TorToiSe fine-tuning with DLAS
GNU Affero General Public License v3.0
214 stars 96 forks source link

DLAS throwing a torch._six error. #58

Closed demonauthor closed 1 year ago

demonauthor commented 1 year ago

I installed the UI using the .setup DLAS.bat script and things were going well...followed along with the video tutorial and created a dataset, but when I click Start Training, it gives me a traceback error:

Traceback (most recent call last): File "C:\Users\oldgu\DL-Art-School\codes\train.py", line 12, in from data.data_sampler import DistIterSampler File "C:\Users\oldgu\DL-Art-School\codes\data__init__.py", line 6, in from utils.util import opt_get File "C:\Users\oldgu\DL-Art-School\codes\utils\util.py", line 25, in from torch._six import inf ModuleNotFoundError: No module named 'torch._six'

A quick look around and it looks like that module is deprecated? Is this a pytorch 2.0 issue or a me issue? Do I need to downgrade pytorch? I'm afraid it would break the whole thing. I'm running Windows 11 with Miniconda 3

demonauthor commented 1 year ago

I "fixed" this by changing the import line in the util.py file to: from torch import inf instead of from torch._six import inf

Not sure if that actually fixes the issue or if it breaks something else, but it gets beyond that error.