ys7yoo / claf

CLaF: Open-Source Clova Language Framework
https://naver.github.io/claf/
MIT License
0 stars 0 forks source link

Transformer & Pytorch version issues #3

Open ys7yoo opened 3 years ago

ys7yoo commented 3 years ago
Traceback (most recent call last):
  File "train.py", line 3, in <module>
    from claf.config import args
  File "/home/yyoo/src/claf/claf/__init__.py", line 4, in <module>
    from claf.data.reader import *
  File "/home/yyoo/src/claf/claf/data/reader/__init__.py", line 2, in <module>
    from claf.data.reader.seq_cls import SeqClsReader
  File "/home/yyoo/src/claf/claf/data/reader/seq_cls.py", line 9, in <module>
    from claf.data.dataset.seq_cls import SeqClsDataset
  File "/home/yyoo/src/claf/claf/data/dataset/__init__.py", line 6, in <module>
    from claf.data.dataset.bert.multi_task import MultiTaskBertDataset
  File "/home/yyoo/src/claf/claf/data/dataset/bert/multi_task.py", line 7, in <module>
    from claf.factory.data_loader import make_data_loader
  File "/home/yyoo/src/claf/claf/factory/__init__.py", line 4, in <module>
    from claf.factory.model import ModelFactory
  File "/home/yyoo/src/claf/claf/factory/model.py", line 5, in <module>
    from claf.model.base import ModelWithTokenEmbedder, ModelWithoutTokenEmbedder
  File "/home/yyoo/src/claf/claf/model/__init__.py", line 2, in <module>
    from claf.model.multi_task import *
  File "/home/yyoo/src/claf/claf/model/multi_task/__init__.py", line 2, in <module>
    from claf.model.multi_task.bert import BertForMultiTask
  File "/home/yyoo/src/claf/claf/model/multi_task/bert.py", line 4, in <module>
    from transformers import BertModel
  File "/home/yyoo/torch/lib/python3.6/site-packages/transformers/__init__.py", line 626, in <module>
    from .trainer import Trainer
  File "/home/yyoo/torch/lib/python3.6/site-packages/transformers/trainer.py", line 69, in <module>
    from .trainer_pt_utils import (
  File "/home/yyoo/torch/lib/python3.6/site-packages/transformers/trainer_pt_utils.py", line 40, in <module>
    from torch.optim.lr_scheduler import SAVE_STATE_WARNING
ImportError: cannot import name 'SAVE_STATE_WARNING'
ys7yoo commented 3 years ago

Downgrade pytorch? https://github.com/huggingface/transformers/issues/8232 https://github.com/huggingface/transformers/pull/8237

ys7yoo commented 3 years ago
pip install -U transformers==2.11.0