Skip to content
This repository was archived by the owner on Nov 22, 2022. It is now read-only.
This repository was archived by the owner on Nov 22, 2022. It is now read-only.

Unable to Run Toy Example: ModuleNotFoundError: No module named 'accelerators' #1612

@hungryjireh

Description

@hungryjireh

Steps to reproduce

After a fresh install of pytext, in the cloned directory pytext, it isn't possible to execute pytext train < demo/configs/docnn.json.

Observed Results

(speculation_analysis) user@MacBook-Pro pytext % pytext train < demo/configs/docnn.json
WARNING:root:This caffe2 python run failed to load cuda module:No module named 'caffe2.python.caffe2_pybind11_state_gpu',and AMD hip module:No module named 'caffe2.python.caffe2_pybind11_state_hip'.Will run in CPU only mode.
Install apex from https://github.com/NVIDIA/apex/.
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/bin/pytext", line 33, in <module>
    sys.exit(load_entry_point('pytext-nlp', 'console_scripts', 'pytext')())
  File "/Library/Frameworks/Python.framework/Versions/3.8/bin/pytext", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/pytext/pytext/__init__.py", line 13, in <module>
    from pytext.task import load
  File "/pytext/pytext/task/__init__.py", line 4, in <module>
    from .new_task import NewTask, _NewTask
  File "/pytext/pytext/task/new_task.py", line 22, in <module>
    from .accelerator_lowering import (
  File "/pytext/pytext/task/accelerator_lowering.py", line 7, in <module>
    from accelerators.pytorch.lib.glow_decorator import accelerator
ModuleNotFoundError: No module named 'accelerators'

Expected Results

I should be at least able to execute the example in the documentation. The accelerators module is apparently a mock one, which should not require installation of other libraries.

Relevant Code

from accelerators.pytorch.lib.glow_decorator import accelerator
ModuleNotFoundError: No module named 'accelerators'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions