I am not able to use the imports on torchrl or its modules. I am installing it from the official github repo https://github.com/pytorch/rl

huangapple go评论68阅读模式
英文:

I am not able to use the imports on torchrl or its modules. I am installing it from the official github repo https://github.com/pytorch/rl

问题

ImportError: 无法从 'tensordict.utils' 导入名称 'unravel_keys'

这是每次我尝试导入任何模块时显示的错误。我该如何解决?
我正在使用搭载 x86_64 架构的 MacBook M1。

我尝试将存储库克隆到我的机器上,但在 tensordict 库中出现了一些错误。

英文:

ImportError: cannot import name 'unravel_keys' from 'tensordict.utils'

This is the error being shown whenever I am trying to import any module. How do I solve this?
I am using a MacBook M1 with x86_64 architecture

I tried cloning the repo to my machine but it has some errors in the tensordict library.

答案1

得分: 3

TorchRL是与TensorDict一同开发的,您可以在这里找到它。如果您正在使用最新版本的torchrl(来自GitHub),您还需要安装最新版本的tensordict和可能是最新版本的pytorch。

pip install git+https://github.com/pytorch-labs/tensordict

TorchRL还提供了夜间版本的发布:

pip install tensordict-nightly torchrl-nightly
英文:

TorchRL is developed alongside TensorDict which you can find here

If you're using the latest version of torchrl (from github) you will need to also install the latest version of tensordict and -- perhaps -- the latest pytorch

pip install git+https://github.com/pytorch-labs/tensordict

TorchRL also comes with nightly releases:

pip install tensordict-nightly torchrl-nightly

huangapple
  • 本文由 发表于 2023年6月11日 22:29:02
  • 转载请务必保留本文链接:https://go.coder-hub.com/76450955.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定