Skip to content

NameError: name 'Dataset' is not defined #21

@SaraiQX

Description

@SaraiQX

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions