New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Value Error when importing blurr.modeling.all and blurr.data.all #21
Comments
Same error here. It was working fine last week and now I cannot import. |
I'll take a look ... either something in fastai or huggingface has changed. What versions of each are you both working with? |
I tried both the default version from pypi (0.0.18) or installing from source (0.0.19) with pip install -e ".[dev]". |
Thanks for the quick response! fastai 1.0.61 |
Looks like huggingface pushed a transformers update a week ago: https://github.com/huggingface/transformers/releases |
Rolled back to transformer==3.5.1 and install / imports working fine. |
Thanks for the info.
Btw, fastai needs to be >= 2.15 as well. I'll find some time to fix things
to work against the latest this week.
wg
…On Mon, Dec 7, 2020 at 6:29 PM JeremyOBrien16 ***@***.***> wrote:
Rolled back to transformer==3.5.1 and install / imports working fine.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#21 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAADNMEXAK5YXEEJ5VMXNJ3STWFPNANCNFSM4UPP5H6A>
.
|
It worked here for me. |
How? For me is still failing?... well, installed from pip
Oh yeah, it works with
|
It's actually quite an easy fix I think. Huggingface have just buried their model files in a couple of extra layers of directories since the Unfortunately there are a few more version 4 breaking changes which come up when I try to test the notebooks. I might have some time to take a crack at them this week if it would be helpful? |
Done. The latest fast.ai and transformers libs actually broke a few things ... but all is working now; all tests are passing. Closing this out ... lmk if anything is still broken for you all. |
[Works fine with] and to use BLURR_MODEL_HELPER. instead of BLURR. |
@bappctl : try installing the latest version of blurr ... There were some of the old imports being cached in there that nbdev didn't clear out when I made the initial release. That's been fixed and the namespaces have changed. All the NLP/Text bits will be under Feel free to close this out once things are working (or lmk if you are still having issues). |
You are right , ohmeow-blurr==0.0.24 worked for me. thanks✌️ |
Closing this out as v.1 is out and the code above is obsolete. |
After pip install in Colab, import blurr.modeling.all and blurr.data.all are throwing errors. Did not encounter errors last week, not sure when they began. Has there been a syntax change for setup?
ValueError Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/pandas/core/indexes/range.py in get_loc(self, key, method, tolerance)
354 try:
--> 355 return self._range.index(new_key)
356 except ValueError as err:
ValueError: 1 is not in range
The above exception was the direct cause of the following exception:
KeyError Traceback (most recent call last)
6 frames
in ()
----> 1 from blurr.modeling.all import *
/usr/local/lib/python3.6/dist-packages/blurr/modeling/all.py in ()
----> 1 from ..utils import *
2 from .core import *
3 from .question_answering import *
4 from .token_classification import *
5 from .text2text.core import *
/usr/local/lib/python3.6/dist-packages/blurr/utils.py in ()
182
183 # Cell
--> 184 BLURR_MODEL_HELPER = ModelHelper()
185
186 # Cell
/usr/local/lib/python3.6/dist-packages/blurr/utils.py in call(self, *args, **kwargs)
25
26 def call(self, *args, **kwargs):
---> 27 if self._instance == None: self._instance = self._cls(*args, **kwargs)
28 return self._instance
29
/usr/local/lib/python3.6/dist-packages/blurr/utils.py in init(self)
59 model_type_df = self._df[(self._df.functional_area == 'modeling')].class_name.str.split('For', n=1, expand=True)
60
---> 61 model_type_df[1] = np.where(model_type_df[1].notnull(),
62 'For' + model_type_df[1].astype(str),
63 model_type_df[1])
/usr/local/lib/python3.6/dist-packages/pandas/core/frame.py in getitem(self, key)
2904 if self.columns.nlevels > 1:
2905 return self._getitem_multilevel(key)
-> 2906 indexer = self.columns.get_loc(key)
2907 if is_integer(indexer):
2908 indexer = [indexer]
/usr/local/lib/python3.6/dist-packages/pandas/core/indexes/range.py in get_loc(self, key, method, tolerance)
355 return self._range.index(new_key)
356 except ValueError as err:
--> 357 raise KeyError(key) from err
358 raise KeyError(key)
359 return super().get_loc(key, method=method, tolerance=tolerance)
KeyError: 1
The text was updated successfully, but these errors were encountered: