XuhanLiu / DrugEx

Deep learning toolkit for Drug Design with Pareto-based Multi-Objective optimization in Polypharmacology
MIT License
189 stars 66 forks source link

NameError: name 'Dataset' is not defined #21

Open SaraiQX opened 1 year ago

SaraiQX commented 1 year ago

Hi Dr Liu, Great thanks for the amazing work. I also had to your lecture from Bilili. So I tried to redo your work, and found an error occurred several times (as below). Could you pls kindly enlighten me a bit about the possible solution? Thank you and happy new year!


# 试运行 python autodl-nas/DrugEx-master/dataset.py

(drugex) root@autodl-container-a64e118552-fa88b88c:~# python autodl-nas/DrugEx-master/dataset.py
Traceback (most recent call last):
  File "autodl-nas/DrugEx-master/dataset.py", line 7, in <module>
    from utils import VocSmiles as Voc
  File "/root/autodl-nas/DrugEx-master/utils/__init__.py", line 5, in <module>
    from .vocab import *
  File "/root/autodl-nas/DrugEx-master/utils/vocab.py", line 303, in <module>
    class TgtData(Dataset):
NameError: name 'Dataset' is not defined
(drugex) root@autodl-container-a64e118552-fa88b88c:~#

# 问题 utils/vocab.py文件中的class TgtData(Dataset):

Best,
Sarai
martin-sicho commented 1 year ago

Hi @SaraiQX, maybe a little late, but you can also try the revamped version of DrugEx we are working on here: https://github.com/CDDLeiden/DrugEx. It should be a bit easier to use and also has some comprehensive tutorials. Let us know if you have any more questions.

XuhanLiu commented 1 year ago

Hi @SaraiQX,

Thanks for having interest with my works. I noticed that TgtData is useless. Therefore I have removed this class. If you want to try the latest version. I strongly recommend you to you intalled version in https://github.com/CDDLeiden/DrugEx as @martin-sicho mentioned.

Cheers,

Xuhan