[WARNING] ME(30107:139803967510336,MainProcess):2023-07-11-11:49:50.281.44 [mindspore/common/api.py:700] 'mindspore.ms_function' will be deprecated and removed in a future version. Please use 'mindspore.jit' instead.
Traceback (most recent call last):
File "/home/mohamedaliabid/IOvisionOCR/mindocr/tools/infer/text/predict_system.py", line 21, in
from predict_det import TextDetector
File "/home/mohamedaliabid/IOvisionOCR/mindocr/tools/infer/text/predict_det.py", line 16, in
from postprocess import Postprocessor
File "/home/mohamedaliabid/IOvisionOCR/mindocr/tools/infer/text/postprocess.py", line 9, in
from mindocr import build_postprocess
File "/home/mohamedaliabid/IOvisionOCR/mindocr/mindocr/init.py", line 1, in
from . import data, losses, metrics, models, postprocess, utils
File "/home/mohamedaliabid/IOvisionOCR/mindocr/mindocr/data/init.py", line 1, in
from . import builder, transforms
File "/home/mohamedaliabid/IOvisionOCR/mindocr/mindocr/data/builder.py", line 7, in
from .det_dataset import DetDataset, SynthTextDataset
File "/home/mohamedaliabid/IOvisionOCR/mindocr/mindocr/data/det_dataset.py", line 10, in
from .transforms.transforms_factory import create_transforms, run_transforms
File "/home/mohamedaliabid/IOvisionOCR/mindocr/mindocr/data/transforms/init.py", line 2, in
from . import transforms_factory
File "/home/mohamedaliabid/IOvisionOCR/mindocr/mindocr/data/transforms/transforms_factory.py", line 13, in
from .rec_abinet_transforms import
File "/home/mohamedaliabid/IOvisionOCR/mindocr/mindocr/data/transforms/rec_abinet_transforms.py", line 18, in
from ...models.utils.abinet_layers import CharsetMapper, onehot
File "/home/mohamedaliabid/IOvisionOCR/mindocr/mindocr/models/init.py", line 1, in
from . import _registry, builder
File "/home/mohamedaliabid/IOvisionOCR/mindocr/mindocr/models/builder.py", line 9, in
from .base_model import BaseModel
File "/home/mohamedaliabid/IOvisionOCR/mindocr/mindocr/models/base_model.py", line 5, in
from .backbones import build_backbone
File "/home/mohamedaliabid/IOvisionOCR/mindocr/mindocr/models/backbones/init.py", line 10, in
from .rec_abinet_backbone import
File "/home/mohamedaliabid/IOvisionOCR/mindocr/mindocr/models/backbones/rec_abinet_backbone.py", line 8, in
from ..utils.abinet_layers import (
File "/home/mohamedaliabid/IOvisionOCR/mindocr/mindocr/models/utils/abinet_layers.py", line 9, in
from mindspore._checkparam import Validator
ImportError: cannot import name 'Validator' from 'mindspore._checkparam' (/home/mohamedaliabid/anaconda3/envs/ocr/lib/python3.9/site-packages/mindspore/_checkparam.py)
@mohamedaliabid10 Thanks for your valuable feedback. This bug was caused by MindSpore API changes. It has been fixed by removing deprecated APIs in PR #590
Can't import validator from mindspore._checkparam
[WARNING] ME(30107:139803967510336,MainProcess):2023-07-11-11:49:50.281.44 [mindspore/common/api.py:700] 'mindspore.ms_function' will be deprecated and removed in a future version. Please use 'mindspore.jit' instead. Traceback (most recent call last): File "/home/mohamedaliabid/IOvisionOCR/mindocr/tools/infer/text/predict_system.py", line 21, in
from predict_det import TextDetector
File "/home/mohamedaliabid/IOvisionOCR/mindocr/tools/infer/text/predict_det.py", line 16, in
from postprocess import Postprocessor
File "/home/mohamedaliabid/IOvisionOCR/mindocr/tools/infer/text/postprocess.py", line 9, in
from mindocr import build_postprocess
File "/home/mohamedaliabid/IOvisionOCR/mindocr/mindocr/init.py", line 1, in
from . import data, losses, metrics, models, postprocess, utils
File "/home/mohamedaliabid/IOvisionOCR/mindocr/mindocr/data/init.py", line 1, in
from . import builder, transforms
File "/home/mohamedaliabid/IOvisionOCR/mindocr/mindocr/data/builder.py", line 7, in
from .det_dataset import DetDataset, SynthTextDataset
File "/home/mohamedaliabid/IOvisionOCR/mindocr/mindocr/data/det_dataset.py", line 10, in
from .transforms.transforms_factory import create_transforms, run_transforms
File "/home/mohamedaliabid/IOvisionOCR/mindocr/mindocr/data/transforms/init.py", line 2, in
from . import transforms_factory
File "/home/mohamedaliabid/IOvisionOCR/mindocr/mindocr/data/transforms/transforms_factory.py", line 13, in
from .rec_abinet_transforms import
File "/home/mohamedaliabid/IOvisionOCR/mindocr/mindocr/data/transforms/rec_abinet_transforms.py", line 18, in
from ...models.utils.abinet_layers import CharsetMapper, onehot
File "/home/mohamedaliabid/IOvisionOCR/mindocr/mindocr/models/init.py", line 1, in
from . import _registry, builder
File "/home/mohamedaliabid/IOvisionOCR/mindocr/mindocr/models/builder.py", line 9, in
from .base_model import BaseModel
File "/home/mohamedaliabid/IOvisionOCR/mindocr/mindocr/models/base_model.py", line 5, in
from .backbones import build_backbone
File "/home/mohamedaliabid/IOvisionOCR/mindocr/mindocr/models/backbones/init.py", line 10, in
from .rec_abinet_backbone import
File "/home/mohamedaliabid/IOvisionOCR/mindocr/mindocr/models/backbones/rec_abinet_backbone.py", line 8, in
from ..utils.abinet_layers import (
File "/home/mohamedaliabid/IOvisionOCR/mindocr/mindocr/models/utils/abinet_layers.py", line 9, in
from mindspore._checkparam import Validator
ImportError: cannot import name 'Validator' from 'mindspore._checkparam' (/home/mohamedaliabid/anaconda3/envs/ocr/lib/python3.9/site-packages/mindspore/_checkparam.py)