AdaSeq icon indicating copy to clipboard operation
AdaSeq copied to clipboard

[Question] 安装验证时报错 AttributeError: 'Dataset' object has no attribute '_hf_ds'

Open shewenkan opened this issue 8 months ago • 3 comments

执行adaseq train -c demo.yaml 报错:Traceback (most recent call last): File "/home/ibest/anaconda3/envs/Ada/bin/adaseq", line 8, in sys.exit(run()) File "/home/ibest/anaconda3/envs/Ada/lib/python3.10/site-packages/adaseq/main.py", line 13, in run main(prog='adaseq') File "/home/ibest/anaconda3/envs/Ada/lib/python3.10/site-packages/adaseq/commands/init.py", line 29, in main args.func(args) File "/home/ibest/anaconda3/envs/Ada/lib/python3.10/site-packages/adaseq/commands/train.py", line 84, in train_model_from_args train_model( File "/home/ibest/anaconda3/envs/Ada/lib/python3.10/site-packages/adaseq/commands/train.py", line 156, in train_model trainer = build_trainer_from_partial_objects( File "/home/ibest/anaconda3/envs/Ada/lib/python3.10/site-packages/adaseq/commands/train.py", line 185, in build_trainer_from_partial_objects dm = DatasetManager.from_config(task=config.task, **config.dataset) File "/home/ibest/anaconda3/envs/Ada/lib/python3.10/site-packages/adaseq/data/dataset_manager.py", line 193, in from_config datasets = {k: v._hf_ds for k, v in msdataset.items()} File "/home/ibest/anaconda3/envs/Ada/lib/python3.10/site-packages/adaseq/data/dataset_manager.py", line 193, in datasets = {k: v._hf_ds for k, v in msdataset.items()} AttributeError: 'Dataset' object has no attribute '_hf_ds' 并没有返回MSdataset对象

What have you tried?

No response

Code (if necessary)

No response

What's your environment?

  • AdaSeq Version (e.g., 1.0 or master):
  • ModelScope Version (e.g., 1.0 or master):
  • PyTorch Version (e.g., 1.12.1):
  • OS (e.g., Ubuntu 20.04):
  • Python version:
  • CUDA/cuDNN version:
  • GPU models and configuration:
  • Any other relevant information:

Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

shewenkan avatar May 19 '25 07:05 shewenkan

adaseq 0.6.6 modelscope 1.26.0 datasets 3.2.0

shewenkan avatar May 19 '25 07:05 shewenkan

i have the same question too. wait for response. thanks full.

Snow-City avatar May 27 '25 12:05 Snow-City

1. Install datasets==2.16.0

2. Environment Code Changes

Reference Path: /anaconda3/envs/adaseq/lib/python3.10/site-packages/modelscope/utils/checkpoint.py

checkpoint.py, line 124, after modification:

checkpoint = torch.load(filename, map_location='cpu', weights_only=False)

Reference Path: /anaconda3/envs/adaseq/lib/python3.10/site-packages/adaseq/data/dataset_manager.py

dataset_manager.py, line 193, after modification:

datasets = {k: getattr(v, '_hf_ds', v) for k, v in msdataset.items()}
Image

hello-zahn avatar Aug 26 '25 02:08 hello-zahn