fix: defer MuJoCo env import until headless GL is configured
This commit is contained in:
@@ -25,7 +25,6 @@ from omegaconf import DictConfig, OmegaConf
|
|||||||
from hydra.utils import instantiate
|
from hydra.utils import instantiate
|
||||||
from einops import rearrange
|
from einops import rearrange
|
||||||
|
|
||||||
from roboimi.envs.double_pos_ctrl_env import make_sim_env
|
|
||||||
from roboimi.utils.act_ex_utils import sample_transfer_pose
|
from roboimi.utils.act_ex_utils import sample_transfer_pose
|
||||||
from roboimi.vla.eval_utils import execute_policy_action
|
from roboimi.vla.eval_utils import execute_policy_action
|
||||||
|
|
||||||
@@ -48,6 +47,11 @@ def _configure_headless_mujoco_gl(eval_cfg: DictConfig) -> None:
|
|||||||
log.info('headless eval detected without DISPLAY; set MUJOCO_GL=egl')
|
log.info('headless eval detected without DISPLAY; set MUJOCO_GL=egl')
|
||||||
|
|
||||||
|
|
||||||
|
def make_sim_env(task_name: str, headless: bool = False):
|
||||||
|
from roboimi.envs.double_pos_ctrl_env import make_sim_env as _make_sim_env_impl
|
||||||
|
return _make_sim_env_impl(task_name, headless=headless)
|
||||||
|
|
||||||
|
|
||||||
def load_checkpoint(
|
def load_checkpoint(
|
||||||
ckpt_path: str,
|
ckpt_path: str,
|
||||||
agent_cfg: DictConfig,
|
agent_cfg: DictConfig,
|
||||||
|
|||||||
Reference in New Issue
Block a user