microsoft / presidio

Context aware, pluggable and customizable data protection and de-identification SDK for text and images
https://microsoft.github.io/presidio
MIT License
3.89k stars 579 forks source link

Importing analyzer giving various erros #1079

Closed KrishPatel13 closed 1 year ago

KrishPatel13 commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://github.com/KrishPatel13/OpenAdapt/tree/test_record
  2. Click on 'README.md'
  3. Follows the steps to setup.
  4. Run the Record command after successfully pytest.
  5. After 5-10sec of recording (just move your mouse around, click, type few letters) and then hit Ctrl + C
  6. See error:

    
    (.venv) PS P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt> python -m openadapt.record "testing out openadapt"
    2023-05-30 23:19:09.353 | INFO     | openadapt.config:<module>:48 - CACHE_DIR_PATH=.cache
    2023-05-30 23:19:09.355 | INFO     | openadapt.config:<module>:48 - CACHE_ENABLED=True
    2023-05-30 23:19:09.356 | INFO     | openadapt.config:<module>:48 - CACHE_VERBOSITY=0
    2023-05-30 23:19:09.356 | INFO     | openadapt.config:<module>:48 - DB_ECHO=False
    2023-05-30 23:19:09.357 | INFO     | openadapt.config:<module>:48 - DB_FNAME=openadapt.db
    2023-05-30 23:19:09.357 | INFO     | openadapt.config:<module>:48 - OPENAI_API_KEY=123
    2023-05-30 23:19:09.358 | INFO     | openadapt.config:<module>:48 - OPENAI_MODEL_NAME=gpt-3.5-turbo
    2023-05-30 23:19:09.359 | INFO     | openadapt.config:<module>:48 - RECORD_READ_ACTIVE_ELEMENT_STATE=False
    2023-05-30 23:19:09.359 | INFO     | openadapt.config:<module>:48 - REPLAY_STRIP_ELEMENT_STATE=True
    2023-05-30 23:19:09.360 | INFO     | openadapt.config:<module>:48 - ROOT_DIRPATH=P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt
    2023-05-30 23:19:09.360 | INFO     | openadapt.config:<module>:48 - DB_FPATH=P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\openadapt.db
    2023-05-30 23:19:09.361 | INFO     | openadapt.config:<module>:48 - DB_URL=sqlite:///P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\openadapt.db
    2023-05-30 23:19:11.930 | INFO     | __main__:record:528 - task_description='testing out openadapt'
    2023-05-30 23:19:11.964 | INFO     | __main__:create_recording:465 - recording=Recording(id=1, timestamp=1685503151.9328675, monitor_width=3840, monitor_height=2160, double_click_interval_seconds=0.5, double_click_distance_pixels=4, platform='win32', task_description='testing out openadapt')
    2023-05-30 23:19:11.971 | INFO     | __main__:read_window_events:375 - starting
    2023-05-30 23:19:11.976 | INFO     | __main__:read_screen_events:349 - starting
    2023-05-30 23:19:11.977 | INFO     | __main__:process_events:72 - starting
    2023-05-30 23:19:11.977 | INFO     | __main__:process_events:72 - starting
    2023-05-30 23:19:12.440 | WARNING  | openadapt.window._windows:get_active_window_state:8 - window=None
    2023-05-30 23:19:12.440 | WARNING  | openadapt.window._windows:get_active_window_state:8 - window=None
    2023-05-30 23:19:12.445 | INFO     | __main__:read_window_events:394 - _window_data={'title': 'Dependency Conflict Resolution. - Google Chrome', 'left': 1926, 'top': 15, 'width': 1938, 'height': 2169, 'window_id': None}
    2023-05-30 23:19:12.445 | INFO     | __main__:read_window_events:394 - _window_data={'title': 'Dependency Conflict Resolution. - Google Chrome', 'left': 1926, 'top': 15, 'width': 1938, 'height': 2169, 'window_id': None}
    2023-05-30 23:19:15.715 | WARNING  | openadapt.window._windows:get_active_window_state:8 - window=None
    2023-05-30 23:19:15.715 | WARNING  | openadapt.window._windows:get_active_window_state:8 - window=None
    2023-05-30 23:19:15.719 | INFO     | __main__:read_window_events:394 - _window_data={'title': 'README.md - OpenAdapt - Visual Studio Code - Insiders', 'left': 0, 'top': 0, 'width': 1920, 'height': 2160, 'window_id': None}
    2023-05-30 23:19:15.719 | INFO     | __main__:read_window_events:394 - _window_data={'title': 'README.md - OpenAdapt - Visual Studio Code - Insiders', 'left': 0, 'top': 0, 'width': 1920, 'height': 2160, 'window_id': None}
    Traceback (most recent call last):
    Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "<string>", line 1, in <module>
    Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "C:\Program Files\Python310\lib\multiprocessing\spawn.py", line 116, in spawn_main
    2023-05-30 23:19:16.373  File "C:\Program Files\Python310\lib\multiprocessing\spawn.py", line 116, in spawn_main
    exitcode = _main(fd, parent_sentinel)
    exitcode = _main(fd, parent_sentinel)
    Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "C:\Program Files\Python310\lib\multiprocessing\spawn.py", line 125, in _main     
    |   File "C:\Program Files\Python310\lib\multiprocessing\spawn.py", line 116, in spawn_main
    File "C:\Program Files\Python310\lib\multiprocessing\spawn.py", line 125, in _main     
    exitcode = _main(fd, parent_sentinel)
    File "C:\Program Files\Python310\lib\multiprocessing\spawn.py", line 125, in _main     
    prepare(preparation_data)
    File "C:\Program Files\Python310\lib\multiprocessing\spawn.py", line 234, in prepare   
    prepare(preparation_data)
    File "C:\Program Files\Python310\lib\multiprocessing\spawn.py", line 234, in prepare   
    INFO        prepare(preparation_data)
    File "C:\Program Files\Python310\lib\multiprocessing\spawn.py", line 234, in prepare   
    _fixup_main_from_name(data['init_main_from_name'])
    File "C:\Program Files\Python310\lib\multiprocessing\spawn.py", line 258, in _fixup_main_from_name
    File "C:\Program Files\Python310\lib\multiprocessing\spawn.py", line 116, in spawn_main
    _fixup_main_from_name(data['init_main_from_name'])
    File "C:\Program Files\Python310\lib\multiprocessing\spawn.py", line 258, in _fixup_main_from_name
    _fixup_main_from_name(data['init_main_from_name'])
    File "C:\Program Files\Python310\lib\multiprocessing\spawn.py", line 258, in _fixup_main_from_name
    |     exitcode = _main(fd, parent_sentinel)
    main_content = runpy.run_module(mod_name,
    File "C:\Program Files\Python310\lib\runpy.py", line 224, in run_module
    File "C:\Program Files\Python310\lib\multiprocessing\spawn.py", line 125, in _main     
    __main__    main_content = runpy.run_module(mod_name,
    :    return _run_module_code(code, init_globals, run_name, mod_spec)
    File "C:\Program Files\Python310\lib\runpy.py", line 96, in _run_module_code
    File "C:\Program Files\Python310\lib\runpy.py", line 224, in run_module
    record    prepare(preparation_data)
    File "C:\Program Files\Python310\lib\multiprocessing\spawn.py", line 234, in prepare   
    return _run_module_code(code, init_globals, run_name, mod_spec)
    :    main_content = runpy.run_module(mod_name,
    _fixup_main_from_name(data['init_main_from_name'])
    File "C:\Program Files\Python310\lib\multiprocessing\spawn.py", line 258, in _fixup_main_from_name
    637    main_content = runpy.run_module(mod_name,
    File "C:\Program Files\Python310\lib\runpy.py", line 224, in run_module
    File "C:\Program Files\Python310\lib\runpy.py", line 96, in _run_module_code
    return _run_module_code(code, init_globals, run_name, mod_spec)
    File "C:\Program Files\Python310\lib\runpy.py", line 96, in _run_module_code
    -   File "C:\Program Files\Python310\lib\runpy.py", line 224, in run_module
    _run_code(code, mod_globals, init_globals,
    _run_code(code, mod_globals, init_globals,
    File "C:\Program Files\Python310\lib\runpy.py", line 86, in _run_code
    _run_code(code, mod_globals, init_globals,
    joining...  File "C:\Program Files\Python310\lib\runpy.py", line 86, in _run_code        
    return _run_module_code(code, init_globals, run_name, mod_spec)
    File "C:\Program Files\Python310\lib\runpy.py", line 96, in _run_module_code
    exec(code, run_globals)
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\openadapt\record.py", line 25, in <module>
    File "C:\Program Files\Python310\lib\runpy.py", line 86, in _run_code
    _run_code(code, mod_globals, init_globals,
    exec(code, run_globals)
    
    from openadapt import config, crud, utils, window
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\openadapt\config.py", line 7, in <module>
    from presidio_analyzer import AnalyzerEngine
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\presidio_analyzer\__init__.py", line 9, in <module>
    File "C:\Program Files\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\openadapt\record.py", line 25, in <module>
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\openadapt\record.py", line 25, in <module>
    from presidio_analyzer.entity_recognizer import EntityRecognizer
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\presidio_analyzer\entity_recognizer.py", line 6, in <module>
    exec(code, run_globals)
    2023-05-30 23:19:16.373    from openadapt import config, crud, utils, window
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\openadapt\config.py", line 7, in <module>
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\openadapt\record.py", line 25, in <module>
    from presidio_analyzer.nlp_engine import NlpArtifacts
    from openadapt import config, crud, utils, window
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\openadapt\config.py", line 7, in <module>
    from presidio_analyzer import AnalyzerEngine
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\presidio_analyzer\__init__.py", line 9, in <module>
    from presidio_analyzer.entity_recognizer import EntityRecognizer
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\presidio_analyzer\entity_recognizer.py", line 6, in <module>
    from presidio_analyzer.nlp_engine import NlpArtifacts
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\presidio_analyzer\nlp_engine\__init__.py", line 3, in <module>
    from .nlp_artifacts import NlpArtifacts
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\presidio_analyzer\nlp_engine\nlp_artifacts.py", line 4, in <module>
    from presidio_analyzer import AnalyzerEngine
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\presidio_analyzer\__init__.py", line 9, in <module>
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\presidio_analyzer\nlp_engine\__init__.py", line 3, in <module>
    from presidio_analyzer.entity_recognizer import EntityRecognizer
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\presidio_analyzer\entity_recognizer.py", line 6, in <module>
    from presidio_analyzer.nlp_engine import NlpArtifacts
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\presidio_analyzer\nlp_engine\__init__.py", line 3, in <module>
    from spacy.tokens import Doc, Span
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\spacy\__init__.py", line 6, in <module>
    from .errors import setup_default_warnings
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\spacy\errors.py", line 2, in <module>
    from .compat import Literal
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\spacy\compat.py", line 3, in <module>
    from openadapt import config, crud, utils, window
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\openadapt\config.py", line 7, in <module>
    from .nlp_artifacts import NlpArtifacts
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\presidio_analyzer\nlp_engine\nlp_artifacts.py", line 4, in <module>
    from presidio_analyzer import AnalyzerEngine
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\presidio_analyzer\__init__.py", line 9, in <module>
    from .nlp_artifacts import NlpArtifacts
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\presidio_analyzer\nlp_engine\nlp_artifacts.py", line 4, in <module>
    from spacy.tokens import Doc, Span
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\spacy\__init__.py", line 6, in <module>
    from .errors import setup_default_warnings
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\spacy\errors.py", line 2, in <module>
    |     from spacy.tokens import Doc, Span
    from presidio_analyzer.entity_recognizer import EntityRecognizer
    from thinc.util import copy_array
    from .compat import Literal
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\spacy\compat.py", line 3, in <module>
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\spacy\__init__.py", line 6, in <module>
    from .errors import setup_default_warnings
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\spacy\errors.py", line 2, in <module>
    from .compat import Literal
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\spacy\compat.py", line 3, in <module>
    from thinc.util import copy_array
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\thinc\__init__.py", line 5, in <module>
    2023-05-30 23:19:16.423  File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\presidio_analyzer\entity_recognizer.py", line 6, in <module>
    from presidio_analyzer.nlp_engine import NlpArtifacts
    from .config import registry
    from thinc.util import copy_array
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\thinc\__init__.py", line 5, in <module>
    from .config import registry
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\thinc\config.py", line 4, in <module>
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\thinc\config.py", line 4, in <module>
    from .types import Decorator
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\thinc\types.py", line 8, in <module>
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\presidio_analyzer\nlp_engine\__init__.py", line 3, in <module>
    from .compat import has_cupy, cupy
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\thinc\compat.py", line 30, in <module>
    INFO        from .nlp_artifacts import NlpArtifacts
    from .types import Decorator
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\thinc\__init__.py", line 5, in <module>
    |  |   File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\thinc\types.py", line 8, in <module>
    import torch.utils.dlpack
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\presidio_analyzer\nlp_engine\nlp_artifacts.py", line 4, in <module>
    INFO    __main__    from .config import registry
    from .compat import has_cupy, cupy
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\torch\__init__.py", line 1476, in <module>
    |   File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\thinc\config.py", line 4, in <module>
    from spacy.tokens import Doc, Span
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\thinc\compat.py", line 30, in <module>
    :  File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\spacy\__init__.py", line 6, in <module>
    from .types import Decorator
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\thinc\types.py", line 8, in <module>
    import torch.utils.dlpack
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\torch\__init__.py", line 1476, in <module>
    __main__record    from torch import func as func
    File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
    from .compat import has_cupy, cupy
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\thinc\compat.py", line 30, in <module>
    import torch.utils.dlpack
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\torch\__init__.py", line 1465, in <module>
    from .errors import setup_default_warnings
    :    from torch import func as func
    File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\spacy\errors.py", line 2, in <module>
    :read_screen_events    from . import _meta_registrations
    637:  File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\torch\func\__init__.py", line 1, in <module>
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\torch\_meta_registrations.py", line 2705, in <module>
    from .compat import Literal
    -   File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\spacy\compat.py", line 3, in <module>
    356joining... -     from torch._functorch.eager_transforms import (
    File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
    
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\torch\_functorch\eager_transforms.py", line 12, in <module>
    from thinc.util import copy_array
    done  File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\thinc\__init__.py", line 5, in <module>
    
    File "<frozen importlib._bootstrap_external>", line 879, in exec_module
    activate_meta()
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\torch\_meta_registrations.py", line 2665, in activate_meta
    from .config import registry
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\thinc\config.py", line 4, in <module>
    from torch.fx.experimental import const_fold
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\torch\fx\experimental\const_fold.py", line 6, in <module>
    2023-05-30 23:19:16.423    from .types import Decorator
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\thinc\types.py", line 8, in <module>
    from torch.fx.passes.split_module import split_module
    File "<frozen importlib._bootstrap_external>", line 969, in get_code
    op_overload.py_impl(torch._C.DispatchKey.Meta)(fn)
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\torch\_ops.py", line 327, in inner
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\torch\fx\passes\__init__.py", line 3, in <module>
    2023-05-30 23:19:16.423 |     from .compat import has_cupy, cupy
    |     dispatch_key_or_mode != torch._C.DispatchKey.Python
    from . import net_min_base
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\thinc\compat.py", line 30, in <module>
    INFO    KeyboardInterrupt
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\torch\fx\passes\net_min_base.py", line 11, in <module>
    File "<frozen importlib._bootstrap_external>", line 1091, in path_stats
    INFO     |  |     import torch.utils.dlpack
    __main__  File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\torch\__init__.py", line 1465, in <module>
    from .split_utils import split_by_tags
    __main__  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
    ::read_screen_events:process_events356: - 126done  File "<frozen importlib._bootstrap_external>", line 147, in _path_stat
    -     from . import _meta_registrations
    File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt\.venv\lib\site-packages\torch\_meta_registrations.py", line 7, in <module>

done File "", line 1006, in _find_and_load_unlocked from torch._decomp import _add_op_to_registry, global_decomposition_table, meta_table 2023-05-30 23:19:16.423 File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt.venv\lib\site-packages\torch_decomp__init.py", line 170, in KeyboardInterrupt | import torch._refs File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt.venv\lib\site-packages\torch_refs__init__.py", line 5441, in INFO File "", line 688, in _load_unlocked | main:process_events:126 - done File "", line 879, in exec_module import torch._refs.special File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt.venv\lib\site-packages\torch_refs\special__init.py", line 134, in File "", line 975, in get_code def logit(self: TensorLikeType, eps: Optional[float] = None) -> TensorLikeType:
File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt.venv\lib\site-packages\torch_decomp__init.py", line 131, in decomposition_decorator tree_map(register, aten_op) File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt.venv\lib\site-packages\torch\utils_pytree.py", line 196, in tree_map File "", line 1074, in get_data return tree_unflatten([fn(i) for i in flat_args], spec) File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt.venv\lib\site-packages\torch\utils_pytree.py", line 196, in return tree_unflatten([fn(i) for i in flat_args], spec) File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt.venv\lib\site-packages\torch_decomp\init__.py", line 128, in register KeyboardInterrupt _add_op_to_registry(registry, op, fn) File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt.venv\lib\site-packages\torch_decomp\
init__.py", line 44, in _add_op_to_registry overloads.append(getattr(op, ol)) File "P:\OpenAdapt AI - MLDS AI\cloned_repo\OpenAdapt.venv\lib\site-packages\torch_ops.py", line 447, in
getattr def getattr(self, key): KeyboardInterrupt 2023-05-30 23:19:16.902 | INFO | main__:record:652 - saved recording_timestamp=1685503151.9328675 2023-05-30 23:19:16.902 | INFO | main:record:652 - saved recording_timestamp=1685503151.9328675

``` **Expected behavior** It should successfully record and exit the command with code 0. But for the above case it does not exit. That is issue on our side. But it successfully records well, but when I add this code in config.py: and then run record it gives error. ``` # SCRUBBING CONFIGURATIONS # SCRUB_CONFIG_TRF = { # "nlp_engine_name": "spacy", # "models": [{"lang_code": "en", "model_name": "en_core_web_trf"}], # } # SCRUB_PROVIDER_TRF = NlpEngineProvider(nlp_configuration=SCRUB_CONFIG_TRF) # NLP_ENGINE_TRF = SCRUB_PROVIDER_TRF.create_engine() # SCRUB_CONFIG_LG = { # "nlp_engine_name": "spacy", # "models": [{"lang_code": "en", "model_name": "en_core_web_lg"}], # } # SCRUB_PROVIDER_LG = NlpEngineProvider(nlp_configuration=SCRUB_CONFIG_LG) # NLP_ENGINE_LG = SCRUB_PROVIDER_LG.create_engine() # ANALYZER = AnalyzerEngine( # nlp_engine=NLP_ENGINE_TRF, # supported_languages=["en"] # ) ANALYZER = AnalyzerEngine() ANONYMIZER = AnonymizerEngine() IMAGE_REDACTOR = ImageRedactorEngine() SCRUB_IGNORE_ENTITIES = [ # 'US_PASSPORT', # 'US_DRIVER_LICENSE', # 'CRYPTO', # 'UK_NHS', # 'PERSON', # 'CREDIT_CARD', # 'US_BANK_NUMBER', # 'PHONE_NUMBER', # 'US_ITIN', # 'AU_ABN', 'DATE_TIME', # 'NRP', # 'SG_NRIC_FIN', # 'AU_ACN', # 'IP_ADDRESS', # 'EMAIL_ADDRESS', 'URL', # 'IBAN_CODE', # 'AU_TFN', # 'LOCATION', # 'AU_MEDICARE', # 'US_SSN', # 'MEDICAL_LICENSE' ] SCRUBBING_ENTITIES = [ entity for entity in ANALYZER.get_supported_entities() if entity not in SCRUB_IGNORE_ENTITIES ] SCRUB_KEYS_HTML = [ 'text', 'canonical_text', 'title', 'state' ] DEFAULT_SCRUB_FILL_COLOR = (255,0,0) ``` Hence it is certainly due to error in Analyzer and its related libraries. **Additional context** >> pip list ``` Package Version Editable project location ----------------------------- ------------ -------------------------------------------------------------------- aiohttp 3.8.4 aiosignal 1.3.1 alabaster 0.7.13 alembic 1.8.1 altgraph 0.17.3 ascii-magic 2.3.0 astroid 2.15.5 asttokens 2.2.1 async-timeout 4.0.2 attrs 23.1.0 Babel 2.12.1 backcall 0.2.0 blis 0.7.9 bokeh 2.4.3 catalogue 2.0.8 certifi 2023.5.7 charset-normalizer 3.1.0 click 8.1.3 clipboard 0.0.4 colorama 0.4.6 coloredlogs 15.0.1 confection 0.0.4 contourpy 1.0.7 cycler 0.11.0 cymem 2.0.7 decorator 5.1.1 deepdiff 6.3.0 dictalchemy3 1.0.0 dill 0.3.6 docutils 0.20.1 en-core-web-lg 3.5.0 executing 1.2.0 filelock 3.12.0 fire 0.4.0 flatbuffers 23.5.26 fonttools 4.39.4 frozenlist 1.3.3 fsspec 2023.5.0 greenlet 2.0.2 huggingface-hub 0.14.1 humanfriendly 10.0 idna 3.4 imagesize 1.4.1 iniconfig 2.0.0 ipdb 0.13.11 ipython 8.13.2 isort 5.12.0 jedi 0.18.2 Jinja2 3.1.2 joblib 1.2.0 kiwisolver 1.4.4 langcodes 3.3.0 lazy-object-proxy 1.9.0 loguru 0.6.0 Mako 1.2.4 MarkupSafe 2.1.2 matplotlib 3.6.2 matplotlib-inline 0.1.6 mccabe 0.7.0 mpmath 1.3.0 mss 6.1.0 multidict 6.0.4 murmurhash 1.0.9 networkx 3.1 numpy 1.24.3 onnxruntime 1.15.0 openadapt 0.1.0 p:\openadapt ai - mlds ai\cloned_repo\openadapt openai 0.27.5 opencv-python 4.7.0.72 ordered-set 4.1.0 orjson 3.8.14 packaging 23.1 pandas 2.0.0 parso 0.8.3 pathy 0.10.1 pefile 2023.2.7 phonenumbers 8.13.13 pickleshare 0.7.5 Pillow 9.5.0 pip 23.1.2 platformdirs 3.5.1 pluggy 1.0.0 preshed 3.0.8 presidio-analyzer 2.2.32 presidio-anonymizer 2.2.32 presidio-image-redactor 0.0.46 prompt-toolkit 3.0.38 protobuf 4.23.2 pure-eval 0.2.2 py 1.11.0 pyclipper 1.3.0.post4 pycryptodome 3.18.0 pydantic 1.7.4 pydicom 2.3.1 PyGetWindow 0.0.9 Pygments 2.15.1 pyinstaller 5.11.0 pyinstaller-hooks-contrib 2023.3 pylint 2.17.4 pynput 1.7.6 p:\openadapt ai - mlds ai\cloned_repo\openadapt\.venv\src\pynput\lib pyparsing 3.0.9 pyperclip 1.8.2 pypng 0.20220715.0 pyreadline3 3.4.1 PyRect 0.2.0 pytesseract 0.3.7 pytest 7.1.3 python-dateutil 2.8.2 python-dotenv 1.0.0 pytz 2023.3 pywin32 306 pywin32-ctypes 0.2.0 PyYAML 6.0 rapidocr-onnxruntime 1.2.3 regex 2023.5.5 requests 2.31.0 requests-file 1.5.1 scikit-learn 1.2.2 scipy 1.9.3 setuptools 67.8.0 setuptools-lint 0.6.0 shapely 2.0.1 six 1.16.0 smart-open 6.3.0 snowballstemmer 2.2.0 spacy 3.5.3 spacy-legacy 3.0.12 spacy-loggers 1.0.4 Sphinx 7.0.1 sphinxcontrib-applehelp 1.0.4 sphinxcontrib-devhelp 1.0.2 sphinxcontrib-htmlhelp 2.0.1 sphinxcontrib-jsmath 1.0.1 sphinxcontrib-qthelp 1.0.3 sphinxcontrib-serializinghtml 1.1.5 SQLAlchemy 1.4.43 srsly 2.4.6 stack-data 0.6.2 sympy 1.12 termcolor 2.3.0 thinc 8.1.10 threadpoolctl 3.1.0 tiktoken 0.4.0 tldextract 3.4.4 tokenizers 0.13.3 tomli 2.0.1 tomlkit 0.11.8 torch 2.0.0 tornado 6.3.2 tqdm 4.65.0 traitlets 5.9.0 transformers 4.28.1 typer 0.7.0 typing_extensions 4.6.2 tzdata 2023.3 urllib3 2.0.2 wasabi 1.1.1 wcwidth 0.2.6 wheel 0.40.0 win32-setctime 1.1.0 wrapt 1.15.0 yarl 1.9.2 ``` My Configurations: Python 3.10.11 and win32 OS (windows) [using VSCode]
SharonHart commented 1 year ago

@KrishPatel13 What is the actual error in the attached trace? I think that some internal knowledge on your project is needed to really understand the issue. Briefly looking through it, looks like it traces into some inner dependencies of presidio (spacy, that you also depend on directly), and some dependency of your project (torch, thinc)

SharonHart commented 1 year ago

Closing for the time, please reopen with more information if this persists