Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing Bagua modules do no work #718

Open
silverCore97 opened this issue Jul 4, 2024 · 0 comments
Open

Importing Bagua modules do no work #718

silverCore97 opened this issue Jul 4, 2024 · 0 comments

Comments

@silverCore97
Copy link

Describe the bug
While intending to run my Bagua code on google colab, the error appeared already with this import from bagua.torch_api.bucket import BaguaBucket.
The error itself is "PydanticUserError: Please use typing_extensions.TypedDict instead of typing.TypedDict on Python < 3.12." But in bagua.bagua_define.py we have

if sys.version_info >= (3, 9):
    from typing import TypedDict  # pytype: disable=not-supported-yet
else:
    from typing_extensions import TypedDict  # pytype: disable=not-supported-yet
from pydantic import BaseModel

Environment

  • Your operating system and version: "Ubuntu 22.04.3 LTS"
  • Your python version: 3.10.12
  • Your PyTorch version: not relevant
  • How did you install python (e.g. apt or pyenv)? Did you use a virtualenv?: Comes pre-installed in Google Colab; No
  • Have you tried using latest bagua master (python3 -m pip install --pre bagua)?: Yes, does not work either

Reproducing

Please provide a minimal working example. This means the runnable code.

!pip install bagua-cuda116
from bagua.torch_api.bucket import BaguaBucket

Please also write what exact commands are required to reproduce your results.

Additional context
It''s on Google Colab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant