{
  "id": 234343,
  "title": "Not able to use NERModel due to import issue.",
  "url": "/competitions/coleridgeinitiative-show-us-the-data/discussion/234343",
  "author_name": "Shyam Sundar",
  "post_date": "2021-04-23T19:00:59.324000",
  "votes": 5,
  "comment_count": 8,
  "views": 0,
  "content": "<p>Hi All,<br>\nI'm trying to use SimpleTransformers module for this competition.</p>\n<p>After successfully installing the package SimpleTransformers in kernel , i'm trying to import NERModel and NERArgs packages from simpletransformers.ner. But i get error message as below.</p>\n<p>from simpletransformers.ner import NERModel,NERArgs</p>\n<hr>\n<p>ImportError                               Traceback (most recent call last)<br>\n in <br>\n      1 get_ipython().system('pip install --upgrade fsspec')<br>\n----&gt; 2 from simpletransformers.ner import NERModel,NERArgs</p>\n<p>/opt/conda/lib/python3.7/site-packages/simpletransformers/ner/<strong>init</strong>.py in <br>\n      1 from simpletransformers.config.model_args import NERArgs<br>\n----&gt; 2 from simpletransformers.ner.ner_model import NERModel</p>\n<p>/opt/conda/lib/python3.7/site-packages/simpletransformers/ner/ner_model.py in <br>\n     30 )<br>\n     31 from transformers.optimization import AdamW, Adafactor<br>\n---&gt; 32 from transformers import (<br>\n     33     AlbertConfig,<br>\n     34     AlbertForTokenClassification,</p>\n<p>/opt/conda/lib/python3.7/site-packages/transformers/<strong>init</strong>.py in <strong>getattr</strong>(self, name)<br>\n   2485             if name == \"<strong>version</strong>\":<br>\n   2486                 return <strong>version</strong><br>\n-&gt; 2487             return super().<strong>getattr</strong>(name)<br>\n   2488 <br>\n   2489     sys.modules[<strong>name</strong>] = _LazyModule(<strong>name</strong>, _import_structure)</p>\n<p>/opt/conda/lib/python3.7/site-packages/transformers/file_utils.py in <strong>getattr</strong>(self, name)<br>\n   1698         elif name in self._class_to_module.keys():<br>\n   1699             module = self._get_module(self._class_to_module[name])<br>\n-&gt; 1700             value = getattr(module, name)<br>\n   1701         else:<br>\n   1702             raise AttributeError(f\"module {self.<strong>name</strong>} has no attribute {name}\")</p>\n<p>/opt/conda/lib/python3.7/site-packages/transformers/file_utils.py in <strong>getattr</strong>(self, name)<br>\n   1697             value = self._get_module(name)<br>\n   1698         elif name in self._class_to_module.keys():<br>\n-&gt; 1699             module = self._get_module(self._class_to_module[name])<br>\n   1700             value = getattr(module, name)<br>\n   1701         else:</p>\n<p>/opt/conda/lib/python3.7/site-packages/transformers/models/auto/<strong>init</strong>.py in _get_module(self, module_name)<br>\n    196 <br>\n    197         def _get_module(self, module_name: str):<br>\n--&gt; 198             return importlib.import_module(\".\" + module_name, self.<strong>name</strong>)<br>\n    199 <br>\n    200     sys.modules[<strong>name</strong>] = _LazyModule(<strong>name</strong>, _import_structure)</p>\n<p>/opt/conda/lib/python3.7/importlib/<strong>init</strong>.py in import_module(name, package)<br>\n    125                 break<br>\n    126             level += 1<br>\n--&gt; 127     return _bootstrap._gcd_import(name[level:], package, level)<br>\n    128 <br>\n    129 </p>\n<p>/opt/conda/lib/python3.7/site-packages/transformers/models/auto/modeling_auto.py in <br>\n    197 from ..pegasus.modeling_pegasus import PegasusForCausalLM, PegasusForConditionalGeneration, PegasusModel<br>\n    198 from ..prophetnet.modeling_prophetnet import ProphetNetForCausalLM, ProphetNetForConditionalGeneration, ProphetNetModel<br>\n--&gt; 199 from ..rag.modeling_rag import (  # noqa: F401 - need to import all RagModels to be in globals() function<br>\n    200     RagModel,<br>\n    201     RagSequenceForGeneration,</p>\n<p>/opt/conda/lib/python3.7/site-packages/transformers/models/rag/modeling_rag.py in <br>\n     27 from …utils import logging<br>\n     28 from .configuration_rag import RagConfig<br>\n---&gt; 29 from .retrieval_rag import RagRetriever<br>\n     30 <br>\n     31 </p>\n<p>/opt/conda/lib/python3.7/site-packages/transformers/models/rag/retrieval_rag.py in <br>\n     37 <br>\n     38 if is_datasets_available():<br>\n---&gt; 39     from datasets import Dataset, load_dataset, load_from_disk<br>\n     40 <br>\n     41 if is_faiss_available():</p>\n<p>/opt/conda/lib/python3.7/site-packages/datasets/<strong>init</strong>.py in <br>\n     31     )<br>\n     32 <br>\n---&gt; 33 from .arrow_dataset import Dataset, concatenate_datasets<br>\n     34 from .arrow_reader import ArrowReader, ReadInstruction<br>\n     35 from .arrow_writer import ArrowWriter</p>\n<p>/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in <br>\n     44 from .arrow_writer import ArrowWriter, OptimizedTypedSequence<br>\n     45 from .features import ClassLabel, Features, Value, cast_to_python_objects<br>\n---&gt; 46 from .filesystems import extract_path_from_uri, is_remote_filesystem<br>\n     47 from .fingerprint import (<br>\n     48     fingerprint_transform,</p>\n<p>/opt/conda/lib/python3.7/site-packages/datasets/filesystems/<strong>init</strong>.py in <br>\n      7 <br>\n      8 if _has_s3fs:<br>\n----&gt; 9     from .s3filesystem import S3FileSystem  # noqa: F401<br>\n     10 <br>\n     11 </p>\n<p>/opt/conda/lib/python3.7/site-packages/datasets/filesystems/s3filesystem.py in <br>\n----&gt; 1 import s3fs<br>\n      2 <br>\n      3 <br>\n      4 class S3FileSystem(s3fs.S3FileSystem):<br>\n      5     \"\"\"</p>\n<p>/opt/conda/lib/python3.7/site-packages/s3fs/<strong>init</strong>.py in <br>\n----&gt; 1 from .core import S3FileSystem, S3File<br>\n      2 from .mapping import S3Map<br>\n      3 <br>\n      4 from ._version import get_versions<br>\n      5 </p>\n<p>/opt/conda/lib/python3.7/site-packages/s3fs/core.py in <br>\n      9 <br>\n     10 from fsspec.spec import AbstractBufferedFile<br>\n---&gt; 11 from fsspec.utils import infer_storage_options, tokenize, setup_logging<br>\n     12 from fsspec.asyn import AsyncFileSystem, sync, sync_wrapper<br>\n     13 </p>\n<p>ImportError: cannot import name 'setup_logging' from 'fsspec.utils' (/opt/conda/lib/python3.7/site-packages/fsspec/utils.py)</p>\n<p>This has become show stopper for me in kaggle.The same code works in Colab.Please advice.</p>\n<p>Thanks,<br>\nShyam.</p>",
  "messages": [
    {
      "id": 1282294,
      "postDate": "2021-04-23T19:00:59.323Z",
      "content": "<p>Hi All,<br>\nI'm trying to use SimpleTransformers module for this competition.</p>\n<p>After successfully installing the package SimpleTransformers in kernel , i'm trying to import NERModel and NERArgs packages from simpletransformers.ner. But i get error message as below.</p>\n<p>from simpletransformers.ner import NERModel,NERArgs</p>\n<hr>\n<p>ImportError                               Traceback (most recent call last)<br>\n in <br>\n      1 get_ipython().system('pip install --upgrade fsspec')<br>\n----&gt; 2 from simpletransformers.ner import NERModel,NERArgs</p>\n<p>/opt/conda/lib/python3.7/site-packages/simpletransformers/ner/<strong>init</strong>.py in <br>\n      1 from simpletransformers.config.model_args import NERArgs<br>\n----&gt; 2 from simpletransformers.ner.ner_model import NERModel</p>\n<p>/opt/conda/lib/python3.7/site-packages/simpletransformers/ner/ner_model.py in <br>\n     30 )<br>\n     31 from transformers.optimization import AdamW, Adafactor<br>\n---&gt; 32 from transformers import (<br>\n     33     AlbertConfig,<br>\n     34     AlbertForTokenClassification,</p>\n<p>/opt/conda/lib/python3.7/site-packages/transformers/<strong>init</strong>.py in <strong>getattr</strong>(self, name)<br>\n   2485             if name == \"<strong>version</strong>\":<br>\n   2486                 return <strong>version</strong><br>\n-&gt; 2487             return super().<strong>getattr</strong>(name)<br>\n   2488 <br>\n   2489     sys.modules[<strong>name</strong>] = _LazyModule(<strong>name</strong>, _import_structure)</p>\n<p>/opt/conda/lib/python3.7/site-packages/transformers/file_utils.py in <strong>getattr</strong>(self, name)<br>\n   1698         elif name in self._class_to_module.keys():<br>\n   1699             module = self._get_module(self._class_to_module[name])<br>\n-&gt; 1700             value = getattr(module, name)<br>\n   1701         else:<br>\n   1702             raise AttributeError(f\"module {self.<strong>name</strong>} has no attribute {name}\")</p>\n<p>/opt/conda/lib/python3.7/site-packages/transformers/file_utils.py in <strong>getattr</strong>(self, name)<br>\n   1697             value = self._get_module(name)<br>\n   1698         elif name in self._class_to_module.keys():<br>\n-&gt; 1699             module = self._get_module(self._class_to_module[name])<br>\n   1700             value = getattr(module, name)<br>\n   1701         else:</p>\n<p>/opt/conda/lib/python3.7/site-packages/transformers/models/auto/<strong>init</strong>.py in _get_module(self, module_name)<br>\n    196 <br>\n    197         def _get_module(self, module_name: str):<br>\n--&gt; 198             return importlib.import_module(\".\" + module_name, self.<strong>name</strong>)<br>\n    199 <br>\n    200     sys.modules[<strong>name</strong>] = _LazyModule(<strong>name</strong>, _import_structure)</p>\n<p>/opt/conda/lib/python3.7/importlib/<strong>init</strong>.py in import_module(name, package)<br>\n    125                 break<br>\n    126             level += 1<br>\n--&gt; 127     return _bootstrap._gcd_import(name[level:], package, level)<br>\n    128 <br>\n    129 </p>\n<p>/opt/conda/lib/python3.7/site-packages/transformers/models/auto/modeling_auto.py in <br>\n    197 from ..pegasus.modeling_pegasus import PegasusForCausalLM, PegasusForConditionalGeneration, PegasusModel<br>\n    198 from ..prophetnet.modeling_prophetnet import ProphetNetForCausalLM, ProphetNetForConditionalGeneration, ProphetNetModel<br>\n--&gt; 199 from ..rag.modeling_rag import (  # noqa: F401 - need to import all RagModels to be in globals() function<br>\n    200     RagModel,<br>\n    201     RagSequenceForGeneration,</p>\n<p>/opt/conda/lib/python3.7/site-packages/transformers/models/rag/modeling_rag.py in <br>\n     27 from …utils import logging<br>\n     28 from .configuration_rag import RagConfig<br>\n---&gt; 29 from .retrieval_rag import RagRetriever<br>\n     30 <br>\n     31 </p>\n<p>/opt/conda/lib/python3.7/site-packages/transformers/models/rag/retrieval_rag.py in <br>\n     37 <br>\n     38 if is_datasets_available():<br>\n---&gt; 39     from datasets import Dataset, load_dataset, load_from_disk<br>\n     40 <br>\n     41 if is_faiss_available():</p>\n<p>/opt/conda/lib/python3.7/site-packages/datasets/<strong>init</strong>.py in <br>\n     31     )<br>\n     32 <br>\n---&gt; 33 from .arrow_dataset import Dataset, concatenate_datasets<br>\n     34 from .arrow_reader import ArrowReader, ReadInstruction<br>\n     35 from .arrow_writer import ArrowWriter</p>\n<p>/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in <br>\n     44 from .arrow_writer import ArrowWriter, OptimizedTypedSequence<br>\n     45 from .features import ClassLabel, Features, Value, cast_to_python_objects<br>\n---&gt; 46 from .filesystems import extract_path_from_uri, is_remote_filesystem<br>\n     47 from .fingerprint import (<br>\n     48     fingerprint_transform,</p>\n<p>/opt/conda/lib/python3.7/site-packages/datasets/filesystems/<strong>init</strong>.py in <br>\n      7 <br>\n      8 if _has_s3fs:<br>\n----&gt; 9     from .s3filesystem import S3FileSystem  # noqa: F401<br>\n     10 <br>\n     11 </p>\n<p>/opt/conda/lib/python3.7/site-packages/datasets/filesystems/s3filesystem.py in <br>\n----&gt; 1 import s3fs<br>\n      2 <br>\n      3 <br>\n      4 class S3FileSystem(s3fs.S3FileSystem):<br>\n      5     \"\"\"</p>\n<p>/opt/conda/lib/python3.7/site-packages/s3fs/<strong>init</strong>.py in <br>\n----&gt; 1 from .core import S3FileSystem, S3File<br>\n      2 from .mapping import S3Map<br>\n      3 <br>\n      4 from ._version import get_versions<br>\n      5 </p>\n<p>/opt/conda/lib/python3.7/site-packages/s3fs/core.py in <br>\n      9 <br>\n     10 from fsspec.spec import AbstractBufferedFile<br>\n---&gt; 11 from fsspec.utils import infer_storage_options, tokenize, setup_logging<br>\n     12 from fsspec.asyn import AsyncFileSystem, sync, sync_wrapper<br>\n     13 </p>\n<p>ImportError: cannot import name 'setup_logging' from 'fsspec.utils' (/opt/conda/lib/python3.7/site-packages/fsspec/utils.py)</p>\n<p>This has become show stopper for me in kaggle.The same code works in Colab.Please advice.</p>\n<p>Thanks,<br>\nShyam.</p>",
      "rawMarkdown": "Hi All,\nI'm trying to use SimpleTransformers module for this competition.\n\nAfter successfully installing the package SimpleTransformers in kernel , i'm trying to import NERModel and NERArgs packages from simpletransformers.ner. But i get error message as below.\n\nfrom simpletransformers.ner import NERModel,NERArgs\n\n---------------------------------------------------------------------------\nImportError                               Traceback (most recent call last)\n<ipython-input-25-5acb008222c8> in <module>\n      1 get_ipython().system('pip install --upgrade fsspec')\n----> 2 from simpletransformers.ner import NERModel,NERArgs\n\n/opt/conda/lib/python3.7/site-packages/simpletransformers/ner/__init__.py in <module>\n      1 from simpletransformers.config.model_args import NERArgs\n----> 2 from simpletransformers.ner.ner_model import NERModel\n\n/opt/conda/lib/python3.7/site-packages/simpletransformers/ner/ner_model.py in <module>\n     30 )\n     31 from transformers.optimization import AdamW, Adafactor\n---> 32 from transformers import (\n     33     AlbertConfig,\n     34     AlbertForTokenClassification,\n\n/opt/conda/lib/python3.7/site-packages/transformers/__init__.py in __getattr__(self, name)\n   2485             if name == \"__version__\":\n   2486                 return __version__\n-> 2487             return super().__getattr__(name)\n   2488 \n   2489     sys.modules[__name__] = _LazyModule(__name__, _import_structure)\n\n/opt/conda/lib/python3.7/site-packages/transformers/file_utils.py in __getattr__(self, name)\n   1698         elif name in self._class_to_module.keys():\n   1699             module = self._get_module(self._class_to_module[name])\n-> 1700             value = getattr(module, name)\n   1701         else:\n   1702             raise AttributeError(f\"module {self.__name__} has no attribute {name}\")\n\n/opt/conda/lib/python3.7/site-packages/transformers/file_utils.py in __getattr__(self, name)\n   1697             value = self._get_module(name)\n   1698         elif name in self._class_to_module.keys():\n-> 1699             module = self._get_module(self._class_to_module[name])\n   1700             value = getattr(module, name)\n   1701         else:\n\n/opt/conda/lib/python3.7/site-packages/transformers/models/auto/__init__.py in _get_module(self, module_name)\n    196 \n    197         def _get_module(self, module_name: str):\n--> 198             return importlib.import_module(\".\" + module_name, self.__name__)\n    199 \n    200     sys.modules[__name__] = _LazyModule(__name__, _import_structure)\n\n/opt/conda/lib/python3.7/importlib/__init__.py in import_module(name, package)\n    125                 break\n    126             level += 1\n--> 127     return _bootstrap._gcd_import(name[level:], package, level)\n    128 \n    129 \n\n/opt/conda/lib/python3.7/site-packages/transformers/models/auto/modeling_auto.py in <module>\n    197 from ..pegasus.modeling_pegasus import PegasusForCausalLM, PegasusForConditionalGeneration, PegasusModel\n    198 from ..prophetnet.modeling_prophetnet import ProphetNetForCausalLM, ProphetNetForConditionalGeneration, ProphetNetModel\n--> 199 from ..rag.modeling_rag import (  # noqa: F401 - need to import all RagModels to be in globals() function\n    200     RagModel,\n    201     RagSequenceForGeneration,\n\n/opt/conda/lib/python3.7/site-packages/transformers/models/rag/modeling_rag.py in <module>\n     27 from ...utils import logging\n     28 from .configuration_rag import RagConfig\n---> 29 from .retrieval_rag import RagRetriever\n     30 \n     31 \n\n/opt/conda/lib/python3.7/site-packages/transformers/models/rag/retrieval_rag.py in <module>\n     37 \n     38 if is_datasets_available():\n---> 39     from datasets import Dataset, load_dataset, load_from_disk\n     40 \n     41 if is_faiss_available():\n\n/opt/conda/lib/python3.7/site-packages/datasets/__init__.py in <module>\n     31     )\n     32 \n---> 33 from .arrow_dataset import Dataset, concatenate_datasets\n     34 from .arrow_reader import ArrowReader, ReadInstruction\n     35 from .arrow_writer import ArrowWriter\n\n/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in <module>\n     44 from .arrow_writer import ArrowWriter, OptimizedTypedSequence\n     45 from .features import ClassLabel, Features, Value, cast_to_python_objects\n---> 46 from .filesystems import extract_path_from_uri, is_remote_filesystem\n     47 from .fingerprint import (\n     48     fingerprint_transform,\n\n/opt/conda/lib/python3.7/site-packages/datasets/filesystems/__init__.py in <module>\n      7 \n      8 if _has_s3fs:\n----> 9     from .s3filesystem import S3FileSystem  # noqa: F401\n     10 \n     11 \n\n/opt/conda/lib/python3.7/site-packages/datasets/filesystems/s3filesystem.py in <module>\n----> 1 import s3fs\n      2 \n      3 \n      4 class S3FileSystem(s3fs.S3FileSystem):\n      5     \"\"\"\n\n/opt/conda/lib/python3.7/site-packages/s3fs/__init__.py in <module>\n----> 1 from .core import S3FileSystem, S3File\n      2 from .mapping import S3Map\n      3 \n      4 from ._version import get_versions\n      5 \n\n/opt/conda/lib/python3.7/site-packages/s3fs/core.py in <module>\n      9 \n     10 from fsspec.spec import AbstractBufferedFile\n---> 11 from fsspec.utils import infer_storage_options, tokenize, setup_logging\n     12 from fsspec.asyn import AsyncFileSystem, sync, sync_wrapper\n     13 \n\nImportError: cannot import name 'setup_logging' from 'fsspec.utils' (/opt/conda/lib/python3.7/site-packages/fsspec/utils.py)\n\nThis has become show stopper for me in kaggle.The same code works in Colab.Please advice.\n\nThanks,\nShyam.\n\n",
      "votes": 5
    },
    {
      "id": 1286404,
      "postDate": "2021-04-28T00:23:07.807Z",
      "content": "<p>Hi, did you try to upgrade fsspec with the command:<br>\n!pip install --upgrade fsspec</p>\n<p>The problem is that the default version in kaggle's notebook seems to be 0.8.7 and there is no setup_logging in fsspec.utils for this version. If you upgrade the package, you should get version 2021.04.0 and your code should be able to import NERModel because setup_logging would be where it is suppose to be.</p>",
      "rawMarkdown": "Hi, did you try to upgrade fsspec with the command:\n!pip install --upgrade fsspec\n\nThe problem is that the default version in kaggle's notebook seems to be 0.8.7 and there is no setup_logging in fsspec.utils for this version. If you upgrade the package, you should get version 2021.04.0 and your code should be able to import NERModel because setup_logging would be where it is suppose to be.",
      "votes": 3
    },
    {
      "id": 1287286,
      "postDate": "2021-04-28T21:50:15.917Z",
      "content": "<p>this solved my problem:<br>\n!pip install --upgrade fsspec<br>\n!pip install fsspec==0.9.0</p>",
      "rawMarkdown": "this solved my problem:\n!pip install --upgrade fsspec\n!pip install fsspec==0.9.0",
      "votes": 4
    },
    {
      "id": 1287284,
      "postDate": "2021-04-28T21:40:48.570Z",
      "content": "<p>I have the same problem when trying to download a dataset from huggingface.</p>\n<p>`from datasets import load_dataset</p>\n<h2>​</h2>\n<p>ImportError                               Traceback (most recent call last)<br>\n in <br>\n----&gt; 1 from datasets import load_dataset<br>\n      2 <br>\n      3 <br>\n      4 def load_mnli(use_validation=True):<br>\n      5     result = []</p>\n<p>/opt/conda/lib/python3.7/site-packages/datasets/<strong>init</strong>.py in <br>\n     31     )<br>\n     32 <br>\n---&gt; 33 from .arrow_dataset import Dataset, concatenate_datasets<br>\n     34 from .arrow_reader import ArrowReader, ReadInstruction<br>\n     35 from .arrow_writer import ArrowWriter</p>\n<p>/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in <br>\n     44 from .arrow_writer import ArrowWriter, OptimizedTypedSequence<br>\n     45 from .features import ClassLabel, Features, Value, cast_to_python_objects<br>\n---&gt; 46 from .filesystems import extract_path_from_uri, is_remote_filesystem<br>\n     47 from .fingerprint import (<br>\n     48     fingerprint_transform,</p>\n<p>/opt/conda/lib/python3.7/site-packages/datasets/filesystems/<strong>init</strong>.py in <br>\n      7 <br>\n      8 if _has_s3fs:<br>\n----&gt; 9     from .s3filesystem import S3FileSystem  # noqa: F401<br>\n     10 <br>\n     11 </p>\n<p>/opt/conda/lib/python3.7/site-packages/datasets/filesystems/s3filesystem.py in <br>\n----&gt; 1 import s3fs<br>\n      2 <br>\n      3 <br>\n      4 class S3FileSystem(s3fs.S3FileSystem):<br>\n      5     \"\"\"</p>\n<p>/opt/conda/lib/python3.7/site-packages/s3fs/<strong>init</strong>.py in <br>\n----&gt; 1 from .core import S3FileSystem, S3File<br>\n      2 from .mapping import S3Map<br>\n      3 <br>\n      4 from ._version import get_versions<br>\n      5 </p>\n<p>/opt/conda/lib/python3.7/site-packages/s3fs/core.py in <br>\n      9 <br>\n     10 from fsspec.spec import AbstractBufferedFile<br>\n---&gt; 11 from fsspec.utils import infer_storage_options, tokenize, setup_logging<br>\n     12 from fsspec.asyn import AsyncFileSystem, sync, sync_wrapper<br>\n     13 </p>\n<p>ImportError: cannot import name 'setup_logging' from 'fsspec.utils' (/opt/conda/lib/python3.7/site-packages/fsspec/utils.py)`</p>",
      "rawMarkdown": "I have the same problem when trying to download a dataset from huggingface.\n\n`from datasets import load_dataset\n​\n---------------------------------------------------------------------------\nImportError                               Traceback (most recent call last)\n<ipython-input-9-009c28d5fe8b> in <module>\n----> 1 from datasets import load_dataset\n      2 \n      3 \n      4 def load_mnli(use_validation=True):\n      5     result = []\n\n/opt/conda/lib/python3.7/site-packages/datasets/__init__.py in <module>\n     31     )\n     32 \n---> 33 from .arrow_dataset import Dataset, concatenate_datasets\n     34 from .arrow_reader import ArrowReader, ReadInstruction\n     35 from .arrow_writer import ArrowWriter\n\n/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in <module>\n     44 from .arrow_writer import ArrowWriter, OptimizedTypedSequence\n     45 from .features import ClassLabel, Features, Value, cast_to_python_objects\n---> 46 from .filesystems import extract_path_from_uri, is_remote_filesystem\n     47 from .fingerprint import (\n     48     fingerprint_transform,\n\n/opt/conda/lib/python3.7/site-packages/datasets/filesystems/__init__.py in <module>\n      7 \n      8 if _has_s3fs:\n----> 9     from .s3filesystem import S3FileSystem  # noqa: F401\n     10 \n     11 \n\n/opt/conda/lib/python3.7/site-packages/datasets/filesystems/s3filesystem.py in <module>\n----> 1 import s3fs\n      2 \n      3 \n      4 class S3FileSystem(s3fs.S3FileSystem):\n      5     \"\"\"\n\n/opt/conda/lib/python3.7/site-packages/s3fs/__init__.py in <module>\n----> 1 from .core import S3FileSystem, S3File\n      2 from .mapping import S3Map\n      3 \n      4 from ._version import get_versions\n      5 \n\n/opt/conda/lib/python3.7/site-packages/s3fs/core.py in <module>\n      9 \n     10 from fsspec.spec import AbstractBufferedFile\n---> 11 from fsspec.utils import infer_storage_options, tokenize, setup_logging\n     12 from fsspec.asyn import AsyncFileSystem, sync, sync_wrapper\n     13 \n\nImportError: cannot import name 'setup_logging' from 'fsspec.utils' (/opt/conda/lib/python3.7/site-packages/fsspec/utils.py)`",
      "votes": 2
    },
    {
      "id": 1346239,
      "postDate": "2021-06-12T08:16:38.837Z",
      "content": "<p>I was having trouble circumventing this issue even after using !pip install fsspec==0.9.0. I switched internet on and tried to run my notebook. I noticed that fsspec-2021.5.0-py3-none-any.whl was installed and there was no error. I tried to install fsspec-2021.5.0-py3-none-any.whl but it was already present in <a href=\"url\" target=\"_blank\">https://www.kaggle.com/abee82/icevision-080?select=fsspec-2021.5.0-py3-none-any.whl</a>. </p>\n<p>So, added it to my notebook and used : !pip install ../input/icevision-080/fsspec-2021.5.0-py3-none-any.whl</p>\n<p>It is working now.</p>",
      "rawMarkdown": "I was having trouble circumventing this issue even after using !pip install fsspec==0.9.0. I switched internet on and tried to run my notebook. I noticed that fsspec-2021.5.0-py3-none-any.whl was installed and there was no error. I tried to install fsspec-2021.5.0-py3-none-any.whl but it was already present in [https://www.kaggle.com/abee82/icevision-080?select=fsspec-2021.5.0-py3-none-any.whl](url). \n\nSo, added it to my notebook and used : !pip install ../input/icevision-080/fsspec-2021.5.0-py3-none-any.whl\n\nIt is working now."
    },
    {
      "id": 1344369,
      "postDate": "2021-06-10T21:23:30.047Z",
      "content": "<p><a href=\"https://www.kaggle.com/shunjiyamauchi/fsspec\" target=\"_blank\">https://www.kaggle.com/shunjiyamauchi/fsspec</a><br>\nuse this one<br>\nif useful, upvote him.</p>",
      "rawMarkdown": "https://www.kaggle.com/shunjiyamauchi/fsspec\nuse this one\nif useful, upvote him."
    },
    {
      "id": 1343740,
      "postDate": "2021-06-10T12:00:02.603Z",
      "content": "<p><a href=\"https://www.kaggle.com/hugoarmandopazvivas\" target=\"_blank\">@hugoarmandopazvivas</a> Were you able to resolve this issue for \"from datasets import load_dataset\"?<br>\nI am having a similar issue. It would be great if you could share!</p>\n<p>Thanks!</p>",
      "rawMarkdown": "@hugoarmandopazvivas Were you able to resolve this issue for \"from datasets import load_dataset\"?\nI am having a similar issue. It would be great if you could share!\n\nThanks!",
      "replies": [
        {
          "id": 1344385,
          "postDate": "2021-06-10T21:54:00.313Z",
          "content": "<p>Hi Tuhina,</p>\n<p>I guess you have troubles to install simple transformers offline in your notebook. I had this problem too and I made a simple dataset with every necessary file to install and use it. I called it \"SimpleTransformersOffline\". The code to run to install it is in the description section of the dataset's page. Please tell me if this solves your issues.</p>",
          "rawMarkdown": "Hi Tuhina,\n\nI guess you have troubles to install simple transformers offline in your notebook. I had this problem too and I made a simple dataset with every necessary file to install and use it. I called it \"SimpleTransformersOffline\". The code to run to install it is in the description section of the dataset's page. Please tell me if this solves your issues.",
          "votes": 2
        }
      ]
    },
    {
      "id": 1332785,
      "postDate": "2021-06-02T09:51:05.893Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 1286404,
      "author_name": "Nicolas Baouaya",
      "author_url": "",
      "post_date": "2021-04-28T00:23:07.807000",
      "content": "<p>Hi, did you try to upgrade fsspec with the command:<br>\n!pip install --upgrade fsspec</p>\n<p>The problem is that the default version in kaggle's notebook seems to be 0.8.7 and there is no setup_logging in fsspec.utils for this version. If you upgrade the package, you should get version 2021.04.0 and your code should be able to import NERModel because setup_logging would be where it is suppose to be.</p>",
      "votes": 3,
      "replies": []
    },
    {
      "id": 1287286,
      "author_name": "HUGO ARMANDO PAZ VIVAS",
      "author_url": "",
      "post_date": "2021-04-28T21:50:15.917000",
      "content": "<p>this solved my problem:<br>\n!pip install --upgrade fsspec<br>\n!pip install fsspec==0.9.0</p>",
      "votes": 4,
      "replies": []
    },
    {
      "id": 1287284,
      "author_name": "HUGO ARMANDO PAZ VIVAS",
      "author_url": "",
      "post_date": "2021-04-28T21:40:48.570000",
      "content": "<p>I have the same problem when trying to download a dataset from huggingface.</p>\n<p>`from datasets import load_dataset</p>\n<h2>​</h2>\n<p>ImportError                               Traceback (most recent call last)<br>\n in <br>\n----&gt; 1 from datasets import load_dataset<br>\n      2 <br>\n      3 <br>\n      4 def load_mnli(use_validation=True):<br>\n      5     result = []</p>\n<p>/opt/conda/lib/python3.7/site-packages/datasets/<strong>init</strong>.py in <br>\n     31     )<br>\n     32 <br>\n---&gt; 33 from .arrow_dataset import Dataset, concatenate_datasets<br>\n     34 from .arrow_reader import ArrowReader, ReadInstruction<br>\n     35 from .arrow_writer import ArrowWriter</p>\n<p>/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in <br>\n     44 from .arrow_writer import ArrowWriter, OptimizedTypedSequence<br>\n     45 from .features import ClassLabel, Features, Value, cast_to_python_objects<br>\n---&gt; 46 from .filesystems import extract_path_from_uri, is_remote_filesystem<br>\n     47 from .fingerprint import (<br>\n     48     fingerprint_transform,</p>\n<p>/opt/conda/lib/python3.7/site-packages/datasets/filesystems/<strong>init</strong>.py in <br>\n      7 <br>\n      8 if _has_s3fs:<br>\n----&gt; 9     from .s3filesystem import S3FileSystem  # noqa: F401<br>\n     10 <br>\n     11 </p>\n<p>/opt/conda/lib/python3.7/site-packages/datasets/filesystems/s3filesystem.py in <br>\n----&gt; 1 import s3fs<br>\n      2 <br>\n      3 <br>\n      4 class S3FileSystem(s3fs.S3FileSystem):<br>\n      5     \"\"\"</p>\n<p>/opt/conda/lib/python3.7/site-packages/s3fs/<strong>init</strong>.py in <br>\n----&gt; 1 from .core import S3FileSystem, S3File<br>\n      2 from .mapping import S3Map<br>\n      3 <br>\n      4 from ._version import get_versions<br>\n      5 </p>\n<p>/opt/conda/lib/python3.7/site-packages/s3fs/core.py in <br>\n      9 <br>\n     10 from fsspec.spec import AbstractBufferedFile<br>\n---&gt; 11 from fsspec.utils import infer_storage_options, tokenize, setup_logging<br>\n     12 from fsspec.asyn import AsyncFileSystem, sync, sync_wrapper<br>\n     13 </p>\n<p>ImportError: cannot import name 'setup_logging' from 'fsspec.utils' (/opt/conda/lib/python3.7/site-packages/fsspec/utils.py)`</p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 1346239,
      "author_name": "Bishal Mazumdar",
      "author_url": "",
      "post_date": "2021-06-12T08:16:38.837000",
      "content": "<p>I was having trouble circumventing this issue even after using !pip install fsspec==0.9.0. I switched internet on and tried to run my notebook. I noticed that fsspec-2021.5.0-py3-none-any.whl was installed and there was no error. I tried to install fsspec-2021.5.0-py3-none-any.whl but it was already present in <a href=\"url\" target=\"_blank\">https://www.kaggle.com/abee82/icevision-080?select=fsspec-2021.5.0-py3-none-any.whl</a>. </p>\n<p>So, added it to my notebook and used : !pip install ../input/icevision-080/fsspec-2021.5.0-py3-none-any.whl</p>\n<p>It is working now.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1344369,
      "author_name": "ToMo",
      "author_url": "",
      "post_date": "2021-06-10T21:23:30.047000",
      "content": "<p><a href=\"https://www.kaggle.com/shunjiyamauchi/fsspec\" target=\"_blank\">https://www.kaggle.com/shunjiyamauchi/fsspec</a><br>\nuse this one<br>\nif useful, upvote him.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1343740,
      "author_name": "Tuhina",
      "author_url": "",
      "post_date": "2021-06-10T12:00:02.603000",
      "content": "<p><a href=\"https://www.kaggle.com/hugoarmandopazvivas\" target=\"_blank\">@hugoarmandopazvivas</a> Were you able to resolve this issue for \"from datasets import load_dataset\"?<br>\nI am having a similar issue. It would be great if you could share!</p>\n<p>Thanks!</p>",
      "votes": 0,
      "replies": [
        {
          "id": 1344385,
          "author_name": "Nicolas Baouaya",
          "author_url": "",
          "post_date": "2021-06-10T21:54:00.313000",
          "content": "<p>Hi Tuhina,</p>\n<p>I guess you have troubles to install simple transformers offline in your notebook. I had this problem too and I made a simple dataset with every necessary file to install and use it. I called it \"SimpleTransformersOffline\". The code to run to install it is in the description section of the dataset's page. Please tell me if this solves your issues.</p>",
          "votes": 2,
          "replies": []
        }
      ]
    },
    {
      "id": 1332785,
      "author_name": "",
      "author_url": "",
      "post_date": "2021-06-02T09:51:05.893000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1282294": "Hi All,\nI'm trying to use SimpleTransformers module for this competition.\n\nAfter successfully installing the package SimpleTransformers in kernel , i'm trying to import NERModel and NERArgs packages from simpletransformers.ner. But i get error message as below.\n\nfrom simpletransformers.ner import NERModel,NERArgs\n\n---------------------------------------------------------------------------\nImportError                               Traceback (most recent call last)\n<ipython-input-25-5acb008222c8> in <module>\n      1 get_ipython().system('pip install --upgrade fsspec')\n----> 2 from simpletransformers.ner import NERModel,NERArgs\n\n/opt/conda/lib/python3.7/site-packages/simpletransformers/ner/__init__.py in <module>\n      1 from simpletransformers.config.model_args import NERArgs\n----> 2 from simpletransformers.ner.ner_model import NERModel\n\n/opt/conda/lib/python3.7/site-packages/simpletransformers/ner/ner_model.py in <module>\n     30 )\n     31 from transformers.optimization import AdamW, Adafactor\n---> 32 from transformers import (\n     33     AlbertConfig,\n     34     AlbertForTokenClassification,\n\n/opt/conda/lib/python3.7/site-packages/transformers/__init__.py in __getattr__(self, name)\n   2485             if name == \"__version__\":\n   2486                 return __version__\n-> 2487             return super().__getattr__(name)\n   2488 \n   2489     sys.modules[__name__] = _LazyModule(__name__, _import_structure)\n\n/opt/conda/lib/python3.7/site-packages/transformers/file_utils.py in __getattr__(self, name)\n   1698         elif name in self._class_to_module.keys():\n   1699             module = self._get_module(self._class_to_module[name])\n-> 1700             value = getattr(module, name)\n   1701         else:\n   1702             raise AttributeError(f\"module {self.__name__} has no attribute {name}\")\n\n/opt/conda/lib/python3.7/site-packages/transformers/file_utils.py in __getattr__(self, name)\n   1697             value = self._get_module(name)\n   1698         elif name in self._class_to_module.keys():\n-> 1699             module = self._get_module(self._class_to_module[name])\n   1700             value = getattr(module, name)\n   1701         else:\n\n/opt/conda/lib/python3.7/site-packages/transformers/models/auto/__init__.py in _get_module(self, module_name)\n    196 \n    197         def _get_module(self, module_name: str):\n--> 198             return importlib.import_module(\".\" + module_name, self.__name__)\n    199 \n    200     sys.modules[__name__] = _LazyModule(__name__, _import_structure)\n\n/opt/conda/lib/python3.7/importlib/__init__.py in import_module(name, package)\n    125                 break\n    126             level += 1\n--> 127     return _bootstrap._gcd_import(name[level:], package, level)\n    128 \n    129 \n\n/opt/conda/lib/python3.7/site-packages/transformers/models/auto/modeling_auto.py in <module>\n    197 from ..pegasus.modeling_pegasus import PegasusForCausalLM, PegasusForConditionalGeneration, PegasusModel\n    198 from ..prophetnet.modeling_prophetnet import ProphetNetForCausalLM, ProphetNetForConditionalGeneration, ProphetNetModel\n--> 199 from ..rag.modeling_rag import (  # noqa: F401 - need to import all RagModels to be in globals() function\n    200     RagModel,\n    201     RagSequenceForGeneration,\n\n/opt/conda/lib/python3.7/site-packages/transformers/models/rag/modeling_rag.py in <module>\n     27 from ...utils import logging\n     28 from .configuration_rag import RagConfig\n---> 29 from .retrieval_rag import RagRetriever\n     30 \n     31 \n\n/opt/conda/lib/python3.7/site-packages/transformers/models/rag/retrieval_rag.py in <module>\n     37 \n     38 if is_datasets_available():\n---> 39     from datasets import Dataset, load_dataset, load_from_disk\n     40 \n     41 if is_faiss_available():\n\n/opt/conda/lib/python3.7/site-packages/datasets/__init__.py in <module>\n     31     )\n     32 \n---> 33 from .arrow_dataset import Dataset, concatenate_datasets\n     34 from .arrow_reader import ArrowReader, ReadInstruction\n     35 from .arrow_writer import ArrowWriter\n\n/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in <module>\n     44 from .arrow_writer import ArrowWriter, OptimizedTypedSequence\n     45 from .features import ClassLabel, Features, Value, cast_to_python_objects\n---> 46 from .filesystems import extract_path_from_uri, is_remote_filesystem\n     47 from .fingerprint import (\n     48     fingerprint_transform,\n\n/opt/conda/lib/python3.7/site-packages/datasets/filesystems/__init__.py in <module>\n      7 \n      8 if _has_s3fs:\n----> 9     from .s3filesystem import S3FileSystem  # noqa: F401\n     10 \n     11 \n\n/opt/conda/lib/python3.7/site-packages/datasets/filesystems/s3filesystem.py in <module>\n----> 1 import s3fs\n      2 \n      3 \n      4 class S3FileSystem(s3fs.S3FileSystem):\n      5     \"\"\"\n\n/opt/conda/lib/python3.7/site-packages/s3fs/__init__.py in <module>\n----> 1 from .core import S3FileSystem, S3File\n      2 from .mapping import S3Map\n      3 \n      4 from ._version import get_versions\n      5 \n\n/opt/conda/lib/python3.7/site-packages/s3fs/core.py in <module>\n      9 \n     10 from fsspec.spec import AbstractBufferedFile\n---> 11 from fsspec.utils import infer_storage_options, tokenize, setup_logging\n     12 from fsspec.asyn import AsyncFileSystem, sync, sync_wrapper\n     13 \n\nImportError: cannot import name 'setup_logging' from 'fsspec.utils' (/opt/conda/lib/python3.7/site-packages/fsspec/utils.py)\n\nThis has become show stopper for me in kaggle.The same code works in Colab.Please advice.\n\nThanks,\nShyam.\n\n",
    "1286404": "Hi, did you try to upgrade fsspec with the command:\n!pip install --upgrade fsspec\n\nThe problem is that the default version in kaggle's notebook seems to be 0.8.7 and there is no setup_logging in fsspec.utils for this version. If you upgrade the package, you should get version 2021.04.0 and your code should be able to import NERModel because setup_logging would be where it is suppose to be.",
    "1287286": "this solved my problem:\n!pip install --upgrade fsspec\n!pip install fsspec==0.9.0",
    "1287284": "I have the same problem when trying to download a dataset from huggingface.\n\n`from datasets import load_dataset\n​\n---------------------------------------------------------------------------\nImportError                               Traceback (most recent call last)\n<ipython-input-9-009c28d5fe8b> in <module>\n----> 1 from datasets import load_dataset\n      2 \n      3 \n      4 def load_mnli(use_validation=True):\n      5     result = []\n\n/opt/conda/lib/python3.7/site-packages/datasets/__init__.py in <module>\n     31     )\n     32 \n---> 33 from .arrow_dataset import Dataset, concatenate_datasets\n     34 from .arrow_reader import ArrowReader, ReadInstruction\n     35 from .arrow_writer import ArrowWriter\n\n/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in <module>\n     44 from .arrow_writer import ArrowWriter, OptimizedTypedSequence\n     45 from .features import ClassLabel, Features, Value, cast_to_python_objects\n---> 46 from .filesystems import extract_path_from_uri, is_remote_filesystem\n     47 from .fingerprint import (\n     48     fingerprint_transform,\n\n/opt/conda/lib/python3.7/site-packages/datasets/filesystems/__init__.py in <module>\n      7 \n      8 if _has_s3fs:\n----> 9     from .s3filesystem import S3FileSystem  # noqa: F401\n     10 \n     11 \n\n/opt/conda/lib/python3.7/site-packages/datasets/filesystems/s3filesystem.py in <module>\n----> 1 import s3fs\n      2 \n      3 \n      4 class S3FileSystem(s3fs.S3FileSystem):\n      5     \"\"\"\n\n/opt/conda/lib/python3.7/site-packages/s3fs/__init__.py in <module>\n----> 1 from .core import S3FileSystem, S3File\n      2 from .mapping import S3Map\n      3 \n      4 from ._version import get_versions\n      5 \n\n/opt/conda/lib/python3.7/site-packages/s3fs/core.py in <module>\n      9 \n     10 from fsspec.spec import AbstractBufferedFile\n---> 11 from fsspec.utils import infer_storage_options, tokenize, setup_logging\n     12 from fsspec.asyn import AsyncFileSystem, sync, sync_wrapper\n     13 \n\nImportError: cannot import name 'setup_logging' from 'fsspec.utils' (/opt/conda/lib/python3.7/site-packages/fsspec/utils.py)`",
    "1346239": "I was having trouble circumventing this issue even after using !pip install fsspec==0.9.0. I switched internet on and tried to run my notebook. I noticed that fsspec-2021.5.0-py3-none-any.whl was installed and there was no error. I tried to install fsspec-2021.5.0-py3-none-any.whl but it was already present in [https://www.kaggle.com/abee82/icevision-080?select=fsspec-2021.5.0-py3-none-any.whl](url). \n\nSo, added it to my notebook and used : !pip install ../input/icevision-080/fsspec-2021.5.0-py3-none-any.whl\n\nIt is working now.",
    "1344369": "https://www.kaggle.com/shunjiyamauchi/fsspec\nuse this one\nif useful, upvote him.",
    "1343740": "@hugoarmandopazvivas Were you able to resolve this issue for \"from datasets import load_dataset\"?\nI am having a similar issue. It would be great if you could share!\n\nThanks!",
    "1332785": ""
  }
}