Add calibration dir

This commit is contained in:
Simon Alibert 2025-03-03 18:44:39 +01:00
parent 3111ba78ad
commit c0137e89b9
1 changed files with 11 additions and 4 deletions

View File

@ -10,6 +10,9 @@ OBS_IMAGE = "observation.image"
OBS_IMAGES = "observation.images" OBS_IMAGES = "observation.images"
ACTION = "action" ACTION = "action"
ROBOTS = "robots"
TELEOPERATORS = "teleoperators"
# files & directories # files & directories
CHECKPOINTS_DIR = "checkpoints" CHECKPOINTS_DIR = "checkpoints"
LAST_CHECKPOINT_LINK = "last" LAST_CHECKPOINT_LINK = "last"
@ -21,12 +24,16 @@ OPTIMIZER_STATE = "optimizer_state.safetensors"
OPTIMIZER_PARAM_GROUPS = "optimizer_param_groups.json" OPTIMIZER_PARAM_GROUPS = "optimizer_param_groups.json"
SCHEDULER_STATE = "scheduler_state.json" SCHEDULER_STATE = "scheduler_state.json"
# cache dir
default_cache_path = Path(HF_HOME) / "lerobot"
HF_LEROBOT_HOME = Path(os.getenv("HF_LEROBOT_HOME", default_cache_path)).expanduser()
if "LEROBOT_HOME" in os.environ: if "LEROBOT_HOME" in os.environ:
raise ValueError( raise ValueError(
f"You have a 'LEROBOT_HOME' environment variable set to '{os.getenv('LEROBOT_HOME')}'.\n" f"You have a 'LEROBOT_HOME' environment variable set to '{os.getenv('LEROBOT_HOME')}'.\n"
"'LEROBOT_HOME' is deprecated, please use 'HF_LEROBOT_HOME' instead." "'LEROBOT_HOME' is deprecated, please use 'HF_LEROBOT_HOME' instead."
) )
# cache dir
default_cache_path = Path(HF_HOME) / "lerobot"
HF_LEROBOT_HOME = Path(os.getenv("HF_LEROBOT_HOME", default_cache_path)).expanduser()
# calibration dir
default_calibration_path = HF_LEROBOT_HOME / ".calibration"
HF_LEROBOT_CALIBRATION = Path(os.getenv("HF_LEROBOT_CALIBRATION", default_calibration_path)).expanduser()