-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Unable to run HuggingFace's Tutorial Huggy due to TypeError: invalid dtype object error #6144
Comments
I found that modifying the default dtype to torch.float32 as recommended by the HuggingFace discord community resolved the issue. Is this the recommended solution or is there something else that I should try? /content/ml-agents/ml-agents/mlagents/torch_utils/torch.py if _device.type == "cuda":
torch.set_default_device(_device.type)
torch.set_default_dtype(torch.float32)
else:
torch.set_default_dtype(torch.float32) #torch.set_default_dtype(torch.cuda.FloatTensor)
logger.debug(f"default Torch device: {_device}") |
It works. Thank you. |
Also works for me. Thank you! |
This issue is stale because it has been open for 30 days with no activity. |
This issue was closed because it has been inactive for 14 days since being marked as stale. Please open a new issue for related bugs. |
Describe the bug
When trying to follow the HuggingFace's Tutorial Huggy (Google Colab Link), it is erroring out when trying to run the mlagents-learn step. It appears that pytorch is complaining about the default data type that the mlagents are using. I also got the same error when trying to execute 3DBall.
To Reproduce
Steps to reproduce the behavior:
!mlagents-learn ./config/ppo/Huggy.yaml --env=./trained-envs-executables/linux/Huggy/Huggy --run-id="Huggy2" --no-graphics
Console logs / stack traces
Environment (please complete the following information):
NOTE: We are unable to help reproduce bugs with custom environments. Please attempt to reproduce your issue with one of the example environments, or provide a minimal patch to one of the environments needed to reproduce the issue.
The text was updated successfully, but these errors were encountered: