ARISE-Initiative / robomimic

robomimic: A Modular Framework for Robot Learning from Demonstration
MIT License
592 stars 181 forks source link

Modules registry for supporting custom backbone networks #190

Closed arhanjain closed 1 week ago

arhanjain commented 3 weeks ago

Addresses #189

The implementation consists of adding a registry to the Module class so that all child classes are registered by their name into the registry upon __init_subclass__. This allows one to initialized backbones (like in parameters of VisualCore) through the registry rather than using eval which only allows models from base_nets.py

Example script coming soon

danfeiX commented 2 weeks ago

Thanks! I think it'd be much better to move this to EncoderCore in obs_core.py, as many classes that inherits Module are not necessarily encoders

arhanjain commented 2 weeks ago

looks like there's already a encoder registry, so we just need to modify the way the VisualCore class initializes its backbone!

amandlek commented 1 week ago

Thanks @arhanjain for your contribution!