Nov-30-2020, 07:33 PM
The following code generates a error:
[/code]
from pathlib import Path
import sys
sys.path.append('..')
import argparse
import shutil
import os
import logging
from textblob import TextBlob
from pytorch_pretrained_bert.file_utils import PYTORCH_PRETRAINED_BERT_CACHE
from pytorch_pretrained_bert.modeling import BertForSequenceClassification
from pytorch_pretrained_bert.tokenization import BertTokenizer
from pytorch_pretrained_bert.optimization import *
from finbert.finbert import *
import finbert.utils as tools
from pprint import pprint
from sklearn.metrics import classification_report
%load_ext autoreload
%autoreload 2
project_dir = Path.cwd().parent
pd.set_option('max_colwidth', -1)
[code]
[/error]
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-5-6e2ffec00ab6> in <module>
13 from pytorch_pretrained_bert.optimization import *
14
---> 15 from finbert.finbert import *
16 import finbert.utils as tools
17 from pprint import pprint
ModuleNotFoundError: No module named 'finbert'
[error]
I tried to install finbert embedding it installed, but no luck. I even tried to install a finbert module.
I have been googling all options, as outlined above, but one seem to work.
How do I fix this error? I created an environment with
conda env create -f environment.yml
I have not used this command much. I generally use a reqiirements.txt file.
I am not sure of the difference.
Any help appreciated. I am using a docker jupyter notebook tensorflow image, I thought was the easiest way.
My os in Windows 10 pro.
But it keeps throwing this error.
Any help appreciated.
Respectfully,
ErnestTBass
[/code]
from pathlib import Path
import sys
sys.path.append('..')
import argparse
import shutil
import os
import logging
from textblob import TextBlob
from pytorch_pretrained_bert.file_utils import PYTORCH_PRETRAINED_BERT_CACHE
from pytorch_pretrained_bert.modeling import BertForSequenceClassification
from pytorch_pretrained_bert.tokenization import BertTokenizer
from pytorch_pretrained_bert.optimization import *
from finbert.finbert import *
import finbert.utils as tools
from pprint import pprint
from sklearn.metrics import classification_report
%load_ext autoreload
%autoreload 2
project_dir = Path.cwd().parent
pd.set_option('max_colwidth', -1)
[code]
[/error]
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-5-6e2ffec00ab6> in <module>
13 from pytorch_pretrained_bert.optimization import *
14
---> 15 from finbert.finbert import *
16 import finbert.utils as tools
17 from pprint import pprint
ModuleNotFoundError: No module named 'finbert'
[error]
I tried to install finbert embedding it installed, but no luck. I even tried to install a finbert module.
I have been googling all options, as outlined above, but one seem to work.
How do I fix this error? I created an environment with
conda env create -f environment.yml
I have not used this command much. I generally use a reqiirements.txt file.
I am not sure of the difference.
Any help appreciated. I am using a docker jupyter notebook tensorflow image, I thought was the easiest way.
My os in Windows 10 pro.
But it keeps throwing this error.
Any help appreciated.
Respectfully,
ErnestTBass