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

Import "torch_xla.core.xla_model" could not be resolved #7897

Open
hiralU opened this issue Aug 21, 2024 · 6 comments
Open

Import "torch_xla.core.xla_model" could not be resolved #7897

hiralU opened this issue Aug 21, 2024 · 6 comments
Assignees

Comments

@hiralU
Copy link

hiralU commented Aug 21, 2024

getting issues on torch_xla.core.xla_model. , while installing package also getting errors : "ERROR: Could not find a version that satisfies the requirement torch-xla (from versions: none)
ERROR: No matching distribution found for torch-xla"
I have installed python version is : Python 3.10.0

Any Solution ?

@ezyang ezyang transferred this issue from pytorch/pytorch Aug 21, 2024
@JackCaoG
Copy link
Collaborator

I am assuming you are running on TPU, what command did you use ? Does instruction in https://github.com/pytorch/xla#tpu works?

@hiralU
Copy link
Author

hiralU commented Aug 22, 2024

I had updated code as following to resolve issue,|
USE_PEFT_BACKEND = True

if is_torch_xla_available():
#import torch_xla.core.xla_model as xm
import torch as xm

XLA_AVAILABLE = True

else:
XLA_AVAILABLE = False

but still not working, showing many compatibility issues

@JackCaoG
Copy link
Collaborator

what workload are you trying to run?

@hiralU
Copy link
Author

hiralU commented Aug 23, 2024

I am working on Virtual dressing room project. in which i have getting issue of CUDA .

@JackCaoG
Copy link
Collaborator

I guess my question is more basic, it seem you are trying to use HF peft and you don't intend to use PyTorch/XLA nor TPU. In which case none of the torch_xla logic should be trigger,

is_torch_xla_available

should be false. Can you check why it returns True? if is_torch_xla_available is false you most likely won't run into any xla related codes.

@ManfeiBai
Copy link
Collaborator

Hi, @JackCaoG, is that ok to assign this ticket to you?

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

3 participants