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

[BUG] Tensordict v0.6.0 is not compatible with rl4co #229

Closed
2 tasks done
ShuN6211 opened this issue Oct 22, 2024 · 5 comments
Closed
2 tasks done

[BUG] Tensordict v0.6.0 is not compatible with rl4co #229

ShuN6211 opened this issue Oct 22, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@ShuN6211
Copy link
Contributor

ShuN6211 commented Oct 22, 2024

Describe the bug

Tensordictv0.6,0 was released in last night, but this is not compatible with rl4co.
https://github.com/pytorch/tensordict/releases/tag/v0.6.0

To Reproduce

cd rl4co
poetry install
python -c "from rl4co.envs.routing import CVRPEnv"

System info

ImportError: cannot import name 'interaction_mode' from 'tensordict.nn.probabilistic' (path/to/python3.11/site-packages/tensordict/nn/probabilistic.py)

INSTALLED VERSIONS

        rl4co : 0.5.0
        torch : 2.5.0+cu124
    lightning : 2.4.0
      torchrl : Not installed
   tensordict : 0.6.0
        numpy : 2.0.2

pytorch_geometric : Not installed
hydra-core : 1.3.2
omegaconf : 2.3.0
matplotlib : 3.9.2
Python : 3.11.9
Platform : Linux-5.15.153.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
Lightning device : cpu

Reason and Possible fixes

This error has been raised since this morning in japan, and tensordict v0.6.0 was released in last night in japan.
Down the version of tensordict to 0.5.0 works well.

Checklist

  • I have checked that there is no similar issue in the repo (required)
  • I have provided a minimal working example to reproduce the bug (required)
@ShuN6211 ShuN6211 added the bug Something isn't working label Oct 22, 2024
@ShuN6211
Copy link
Contributor Author

I also opened PR for this issue!! #230

@fedebotu
Copy link
Member

Hi @ShuN6211 ! Thanks for submitting the PR. I think the issue is that TorchRL has not been updated yet to 0.6.0 while tensordict was updated first. I believe TorchRL will be updated in the coming day (cc @vmoens )

In the meantime, installing the nightly versions works well on my end:

pip3 install torchrl-nightly    

@ShuN6211
Copy link
Contributor Author

Hi @fedebotu ! Thanks for your answering!!
I once closed #230 . As mentioned in PR, #230 is temporal work around that is not suitable to merge into stable branch.
Hope to coming update to TorchRL would clear everything about this issue and #228 !!😁

@vmoens
Copy link

vmoens commented Oct 22, 2024

Yes I plan on making a release today! Will keep you posted

@ShuN6211
Copy link
Contributor Author

ShuN6211 commented Oct 24, 2024

@fedebotu @cbhua
It has been a few days since TorchRL v0.6.0 was released, there is no troublesome in my end. If you also have any problem, I would like to say let's close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants