Fix: torch >= 2.6 compatibility & multi-instance file contention#111
Open
andylin-hao wants to merge 4 commits intoLifelong-Robot-Learning:masterfrom
Open
Fix: torch >= 2.6 compatibility & multi-instance file contention#111andylin-hao wants to merge 4 commits intoLifelong-Robot-Learning:masterfrom
andylin-hao wants to merge 4 commits intoLifelong-Robot-Learning:masterfrom
Conversation
Signed-off-by: Hao Lin <linhaomails@gmail.com>
When multiple libero instances run for the first time, they all try to create the config directory and file, causing contention. This commit adds a file lock to prevent contention Signed-off-by: Hao Lin <linhaomails@gmail.com>
Signed-off-by: Hao Lin <linhaomails@gmail.com>
|
Is there any plan to merge this? I think having python fixed to 3.8 is not a realistic thing for many people in almost 2026...Python 3.8 reached its official EOL in October 2024, thus it would be nice for the robotics community to use benchmarks with up-to-date tools. |
Signed-off-by: Hao Lin <linhaomails@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes LIBERO's compatibility with torch>=2.6 by adding
weights_only=Falsetotorch.load, which is a breaking change in torch 2.6 that denies any other data structures besides tensor, primitives, and dictionary. See https://docs.pytorch.org/docs/stable/notes/serialization.html#weights-onlyWhen running LIBERO on torch 2.6, the following error occurs:
After adding the
weights_onlyargument, the states can be correctly loaded and LIBERO can run on torch >= 2.6. Supposedly, this addresses #99.Further more, when running multiple processes using LIBERO for the first time, all the processes try to create the config directory and file simultaneously, causing contention.
For example, several processes may find that the config directory does not exist, and try to create it together. Only one process will succeed while the others crash directly due to folder already exists.
This PR adds file lock to prevent such contention, thereby enabling LIBERO to be used in large parallel training.