Skip to content

Conversation

@will-cromar
Copy link
Collaborator

Should fix this error:

Import check...
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/__w/xla/xla/torch_xla/__init__.py", line 152, in <module>
    from .version import __version__
ModuleNotFoundError: No module named 'torch_xla.version'

https://github.com/pytorch/xla/actions/runs/8898851270/job/24437801900

This results from combination of questionable decisions from both GitHub and Python. First, GHA does not guarantee that the workspace is actually empty. In this case, torch_xla/ is still checked out from a previous run. Since there is a local torch_xla directory, Python gives this precedence over the installed torch_xla package.

Just delete everything in the workspace before running tests to eliminate non-determinism.

@will-cromar will-cromar requested a review from JackCaoG April 30, 2024 18:47
@will-cromar
Copy link
Collaborator Author

This is a little repetitive. We can package the environment setup in a reusable template if we start adding more workflows that need it.

@will-cromar will-cromar merged commit b8f8fa9 into master Apr 30, 2024
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