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

Can't import from_module from tensordict #5

Open
StoneT2000 opened this issue Sep 24, 2024 · 1 comment
Open

Can't import from_module from tensordict #5

StoneT2000 opened this issue Sep 24, 2024 · 1 comment

Comments

@StoneT2000
Copy link

StoneT2000 commented Sep 24, 2024

Hi, thanks for the awesome work in making RL with torch fast.

The general lessons (e.g. how to use compile) are making some improvements but they are very marginal. I want to try and use the cudagraphs improvements which bring the biggest speedups, but am having some issues with the from_module function, it seems i can't import it?

  File "/home/stao/work/research/maniskill/ManiSkill/examples/baselines/ppo/ppo.py", line 23, in <module>
    from tensordict import from_module
ImportError: cannot import name 'from_module' from 'tensordict' (/home/stao/miniforge3/envs/ms3-py311/lib/python3.11/site-packages/tensordict/__init__.py)

This is my current used version for torch and tensordict

Name: tensordict-nightly
Version: 2024.7.3
Summary: 
Home-page: https://github.com/pytorch/tensordict
Author: tensordict contributors
Author-email: vmoens@fb.com
License: BSD
Name: torch
Version: 2.4.1
Summary: Tensors and Dynamic neural networks in Python with strong GPU acceleration
Home-page: https://pytorch.org/
Author: PyTorch Team
Author-email: packages@pytorch.org
License: BSD-3

Any idea?

I am also trying to do as minimal of an install as possible as I want to make some torch compile examples in a separate project, so I hope there isn't some dependency I missed. I only installed tensordict and torch essentially.

@StoneT2000 StoneT2000 changed the title What version of tensordict is required? Can't import from_module from tensordict Sep 24, 2024
@vmoens
Copy link
Contributor

vmoens commented Sep 24, 2024

It's a feature on the most recent nightly, I think that here the issue is that you have installed the latest nightly that is compatible with torch 2.4 - try using torch nightly too!
Sorry for the inconvenience, I'll upgrade it all to non-nightly asap

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

2 participants