Skip to content

Conversation

@alanwaketan
Copy link
Collaborator

@alanwaketan alanwaketan commented Apr 20, 2023

Reverts #4872

This breaks mnist.

root@t1v-n-307ffe96-w-0:/workspaces/work/pytorch/xla# PJRT_DEVICE=TPU python test/test_train_mp_mnist.py --num_epochs=1
Traceback (most recent call last):
  File "test/test_train_mp_mnist.py", line 2, in <module>
    from torch_xla.experimental import pjrt
  File "/workspaces/work/pytorch/xla/torch_xla/experimental/pjrt.py", line 14, in <module>
    import torch_xla.core.xla_model as xm
  File "/workspaces/work/pytorch/xla/torch_xla/core/xla_model.py", line 11, in <module>
    import torch_xla.experimental.xla_sharding as xs
  File "/workspaces/work/pytorch/xla/torch_xla/experimental/xla_sharding.py", line 10, in <module>
    from torch_xla.experimental.pjrt import requires_pjrt
ImportError: cannot import name 'requires_pjrt' from partially initialized module 'torch_xla.experimental.pjrt' (most likely due to a circular import) (/workspaces/work/pytorch/xla/torch_xla/experimental/pjrt.py)

Copy link
Collaborator

@JackCaoG JackCaoG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonb377 can you take care of the reland?

@alanwaketan
Copy link
Collaborator Author

Thanks Jack for approving.

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

Successfully merging this pull request may close these issues.

3 participants