-
Notifications
You must be signed in to change notification settings - Fork 451
Description
Dear developers,
What is the best practice to have RSLRL runners load a custom network (module)?
From a quick look to the code, it looks like RSLRL relies on a class_name attribute inside the policy config dataclass, which is then passed to python's built-in eval:
rsl_rl/rsl_rl/runners/distillation_runner.py
Line 156 in c49573e
| student_teacher_class = eval(self.policy_cfg.pop("class_name")) |
This however relies on the runner having pre-imported the required python module
rsl_rl/rsl_rl/runners/on_policy_runner.py
Line 19 in c49573e
| from rsl_rl.modules import ActorCritic, ActorCriticRecurrent, resolve_rnd_config, resolve_symmetry_config |
I believe this make it more difficult for users to inject their custom modules, but maybe I've missed something.
We're now experimenting with swapping class_name with class_type (in the same spirit of IsaacLab's config dataclasses), which returns a handle to a class that the user can freely set at configuration time.
student_teacher_class = self.policy_cfg["class_type"] # or something similarThanks for your help!
Arturo