From 226521e98f7a29bb7bcd204503ef58cae2bb3ad9 Mon Sep 17 00:00:00 2001 From: min99830 <72486552+min99830@users.noreply.github.com> Date: Fri, 26 Dec 2025 06:17:50 +0000 Subject: [PATCH 1/3] fix: fix libero_utils to correct libero asset paths too --- libero/libero/utils/utils.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/libero/libero/utils/utils.py b/libero/libero/utils/utils.py index 1f5a990a8..18e5b7789 100644 --- a/libero/libero/utils/utils.py +++ b/libero/libero/utils/utils.py @@ -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) @@ -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) From 9f7de8e3d74a56bb2f072dbc1f9a5143d3824a7c Mon Sep 17 00:00:00 2001 From: Minseo Kim Date: Mon, 23 Feb 2026 14:29:18 +0900 Subject: [PATCH 2/3] fix: for python >= 3.10 and pytorch >= 2.5 --- libero/__init__.py | 2 ++ libero/libero/benchmark/__init__.py | 2 +- pyproject.toml | 39 +++++++++++++++++++++++++++++ setup.py | 36 -------------------------- 4 files changed, 42 insertions(+), 37 deletions(-) create mode 100644 libero/__init__.py create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/libero/__init__.py b/libero/__init__.py new file mode 100644 index 000000000..436b9f26a --- /dev/null +++ b/libero/__init__.py @@ -0,0 +1,2 @@ +# LIBERO: Benchmarking Knowledge Transfer for Lifelong Robot Learning +__version__ = "0.1.0" \ No newline at end of file diff --git a/libero/libero/benchmark/__init__.py b/libero/libero/benchmark/__init__.py index 2b833d093..5734edbee 100644 --- a/libero/libero/benchmark/__init__.py +++ b/libero/libero/benchmark/__init__.py @@ -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): diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..41de020aa --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,39 @@ +[build-system] +requires = ["setuptools>=64", "wheel"] +build-backend = "setuptools.build_meta" + +[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" + +[tool.setuptools.packages.find] +where = ["."] +include = ["libero"] \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index 59d490046..000000000 --- a/setup.py +++ /dev/null @@ -1,36 +0,0 @@ -# read the contents of your README file -from os import path - -from setuptools import find_packages, setup - -this_directory = path.abspath(path.dirname(__file__)) -with open(path.join(this_directory, "./README.md"), encoding="utf-8") as f: - lines = f.readlines() - -# remove images from README -lines = [x for x in lines if ".png" not in x] -long_description = "".join(lines) - -setup( - name="libero", - packages=[package for package in find_packages() if package.startswith("libero")], - install_requires=[], - eager_resources=["*"], - include_package_data=True, - python_requires=">=3", - description="LIBERO: Benchmarking Knowledge Transfer for Lifelong Robot Learning", - author="Bo Liu, Yifeng Zhu, Chongkai Gao, Yihao Feng, Qiang Liu, Yuke Zhu, Peter Stone", - # url="https://github.com/ARISE-Initiative/robosuite", - author_email="bliu@cs.utexas.edu, yifengz@cs.utexas.edu", - version="0.1.0", - long_description=long_description, - long_description_content_type="text/markdown", - entry_points={ - "console_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", - ] - }, -) From 19fadaebf03a4fd75a1d4d6aa2e9c80731713a5e Mon Sep 17 00:00:00 2001 From: Minseo Kim Date: Mon, 23 Feb 2026 14:42:06 +0900 Subject: [PATCH 3/3] fix: hatchling build system --- pyproject.toml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 41de020aa..ddca540cb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,3 @@ -[build-system] -requires = ["setuptools>=64", "wheel"] -build-backend = "setuptools.build_meta" - [project] name = "libero" version = "0.1.0" @@ -34,6 +30,9 @@ dependencies = [ "libero.config_copy" = "scripts.config_copy:main" "libero.create_template" = "scripts.create_template:main" -[tool.setuptools.packages.find] -where = ["."] -include = ["libero"] \ No newline at end of file +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = ["libero"] \ No newline at end of file