IndicoDataSolutions / finetune

Scikit-learn style model finetuning for NLP
https://finetune.indico.io
Mozilla Public License 2.0
703 stars 80 forks source link

ImportError: No module named 'tensorflow.distribute.experimental' #391

Closed emtropyml closed 5 years ago

emtropyml commented 5 years ago

ImportError Traceback (most recent call last)

in 6 from sklearn.preprocessing import MultiLabelBinarizer 7 from sklearn.metrics import roc_auc_score ----> 8 from finetune import MultiLabelClassifier 9 from finetune.base_models import BERT, BERTLarge, GPT2, GPT2Medium, GPT2Large, TextCNN, TCN, RoBERTa, DistilBERT 10 from finetune.config import Settings ~/.local/lib/python3.5/site-packages/finetune/__init__.py in 9 from tensorflow.compat.v1 import logging as tf_logging 10 ---> 11 from finetune.target_models.multifield import MultiFieldClassifier, MultiFieldRegressor 12 from finetune.target_models.classifier import Classifier 13 from finetune.target_models.regressor import Regressor ~/.local/lib/python3.5/site-packages/finetune/target_models/multifield.py in 2 3 from finetune.errors import FinetuneError ----> 4 from finetune.target_models.classifier import Classifier, ClassificationPipeline 5 from finetune.target_models.regressor import Regressor, RegressionPipeline 6 from finetune.base import BaseModel ~/.local/lib/python3.5/site-packages/finetune/target_models/classifier.py in 6 from sklearn.utils import shuffle 7 ----> 8 from finetune.base import BaseModel 9 from finetune.encoding.target_encoders import OneHotLabelEncoder 10 from finetune.nn.target_blocks import classifier ~/.local/lib/python3.5/site-packages/finetune/base.py in 22 from tensorflow.data import Dataset 23 from tensorflow.contrib.distribute import OneDeviceStrategy ---> 24 from tensorflow.distribute.experimental import CentralStorageStrategy 25 from tensorflow.compat.v1 import logging as tf_logging 26 from sklearn.model_selection import train_test_split ImportError: No module named 'tensorflow.distribute.experimental'
madisonmay commented 5 years ago

The newest version of finetune requires tensorflow 1.14 -- updating your tensorflow-gpu install version should resolve the issue!