FlagAI-Open / FlagAI

FlagAI (Fast LArge-scale General AI models) is a fast, easy-to-use and extensible toolkit for large-scale model.
Apache License 2.0
3.83k stars 416 forks source link

Can't run examples/vit_cifar100/train_deepspeed.py #555

Open twmht opened 1 year ago

twmht commented 1 year ago

System Info

Traceback (most recent call last):
  File "/home/acer/FlagAI/examples/vit_cifar100/train_deepspeed.py", line 69, in <module>
    loader = AutoLoader(task_name="classification",
  File "/home/acer/FlagAI/flagai/auto_model/auto_loader.py", line 333, in __init__
    self.model = getattr(LazyImport(self.model_name[0]),
  File "/home/acer/FlagAI/flagai/model/base_model.py", line 190, in from_pretrain
    return load_local(checkpoint_path, only_download_config=only_download_config)
  File "/home/acer/FlagAI/flagai/model/base_model.py", line 118, in load_local
    model = cls.init_from_json(config_path, device=device, **kwargs)
  File "/home/acer/FlagAI/flagai/model/base_model.py", line 75, in init_from_json
    model = cls(change_json_to_cls(args), **kwargs)
  File "/home/acer/FlagAI/flagai/model/vision/vit.py", line 232, in __init__
    vit_config = VitConfig(**config)
TypeError: flagai.model.vision.vit.VitConfig() argument after ** must be a mapping, not ConfigObj

Information

Tasks

Reproduction

  1. python examples/vit_cifar100/train_deepspeed.py

Expected behavior

tranining success

ftgreat commented 11 months ago

You can manually update flagai sources. https://github.com/FlagAI-Open/FlagAI/commit/0fc0cc2fb70cbc151119929cb440922802b241d5 Later we plan to make a new release.