Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions libero/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# LIBERO: Benchmarking Knowledge Transfer for Lifelong Robot Learning
__version__ = "0.1.0"
2 changes: 1 addition & 1 deletion libero/libero/benchmark/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def get_task_init_states(self, i):
self.tasks[i].problem_folder,
self.tasks[i].init_states_file,
)
init_states = torch.load(init_states_path)
init_states = torch.load(init_states_path, weights_only=False)
return init_states

def set_task_embs(self, task_embs):
Expand Down
18 changes: 18 additions & 0 deletions libero/libero/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ def postprocess_model_xml(xml_str, cameras_dict={}):

path = os.path.split(robosuite.__file__)[0]
path_split = path.split("/")
libero_path = os.path.split(__file__)[0]
libero_path_split = libero_path.split("/")
libero_path_split.pop() # remove 'utils'

# replace mesh and texture file paths
tree = ET.fromstring(xml_str)
Expand All @@ -47,6 +50,21 @@ def postprocess_model_xml(xml_str, cameras_dict={}):
new_path_split = path_split + old_path_split[ind + 1 :]
new_path = "/".join(new_path_split)
elem.set("file", new_path)

# Correcting the libero asset paths
for elem in all_elements:
old_path = elem.get("file")
if old_path is None:
continue
old_path_split = old_path.split("/")
if "chiliocosm" not in old_path_split:
continue
ind = max(
loc for loc, val in enumerate(old_path_split) if val == "chiliocosm"
) # last occurrence index
new_path_split = libero_path_split + old_path_split[ind + 1 :]
new_path = "/".join(new_path_split)
elem.set("file", new_path)

# cameras = root.find("worldbody").findall("camera")
cameras = find_elements(root=tree, tags="camera", return_first=False)
Expand Down
38 changes: 38 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[project]
name = "libero"
version = "0.1.0"
description = "LIBERO: Benchmarking Knowledge Transfer for Lifelong Robot Learning"
readme = "README.md"
requires-python = ">=3.8"
authors = [
{ name = "Bo Liu", email = "bliu@cs.utexas.edu" },
{ name = "Yifeng Zhu", email = "yifengz@cs.utexas.edu" },
{ name = "Chongkai Gao" },
{ name = "Yihao Feng" },
{ name = "Qiang Liu" },
{ name = "Yuke Zhu" },
{ name = "Peter Stone" },
]
dependencies = [
"easydict",
"robomimic==0.2.0",
"robosuite==1.4.0",
"bddl==1.0.1",
"future==0.18.2",
"matplotlib",
"cloudpickle",
"gym==0.25.2",
]

[project.scripts]
"lifelong.main" = "libero.lifelong.main:main"
"lifelong.eval" = "libero.lifelong.evaluate:main"
"libero.config_copy" = "scripts.config_copy:main"
"libero.create_template" = "scripts.create_template:main"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.wheel]
packages = ["libero"]
36 changes: 0 additions & 36 deletions setup.py

This file was deleted.