mindspore-ai / mindspore

MindSpore is a new open source deep learning training/inference framework that could be used for mobile, edge and cloud scenarios.
https://gitee.com/mindspore/mindspore
Apache License 2.0
4.24k stars 701 forks source link

MindSpore text dataset API import error on Windows #131

Closed leonwanghui closed 3 years ago

leonwanghui commented 3 years ago

Environment

Hardware Environment(Ascend/GPU/CPU):

/device cpu

Software Environment:

Describe the current behavior

When I tried to import PythonTokenizer from MindSpore text dataset API, some errors occurred:

>>> from mindspore.dataset import text
>>> text.__all__
['Lookup', 'JiebaTokenizer', 'UnicodeCharTokenizer', 'Ngram', 'to_str', 'to_bytes', 'Vocab', 'WordpieceTokenizer', 'TruncateSequencePair', 'ToNumber', 'PythonTokenizer', 'SlidingWindow', 'SentencePieceVocab', 'SentencePieceTokenizer', 'SPieceTokenizerOutType', 'SentencePieceModel', 'SPieceTokenizerLoadType']
>>> text.PythonTokenizer
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'mindspore.dataset.text' has no attribute 'PythonTokenizer'

Describe the expected behavior

Fix the import error.

Steps to reproduce the issue

  1. >>> from mindspore.dataset import text
  2. >>> text.__all__
  3. >>> text.PythonTokenizer

Related log / screenshot

Special notes for this issue

leonwanghui commented 3 years ago

This issue has been fixed by PR #14518, so will close it.