-
Notifications
You must be signed in to change notification settings - Fork 298
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
TypeError: 'staticmethod' object is not callable #644
Comments
I've experienced the same problem with version 2.4.1+cpu. My workaroud:
|
I also got this. what I did was to change the init.py code in the torch_directml library and comment out the @staticmethod code for the default_device() function. after that, I successfully imported the torch_directml library
I honestly don't know if what I'm doing is wrong or not. |
The example seems to be working fine in the following configuration without any workarounds - But fails if we try to use python >= 3.7 and < 3.10 It seems that the code in new versions of the torch-directml library is heavily dependent on the new advancements related to staticmethod and classmethod. POINT NO.9 introduced from Python 3.10 onwards. Here's the PR which introduced this feature. |
Yeah, it works! Tack så mycket! |
Windows 10
Python 3.8
torch-directml-0.2.4.dev240815
2.3.1+cpu
Traceback (most recent call last):
File "tt_v6.py", line 17, in
import torch_directml
File "C:\Users\Zver.conda\envs\gan\lib\site-packages\torch_directml_init_.py", line 27, in
class PrivateUse1Module:
File "C:\Users\Zver.conda\envs\gan\lib\site-packages\torch_directml_init_.py", line 74, in PrivateUse1Module
def has_float64_support(device_id = default_device()):
TypeError: 'staticmethod' object is not callable
The text was updated successfully, but these errors were encountered: