DLR-RM / rl-baselines3-zoo

A training framework for Stable Baselines3 reinforcement learning agents, with hyperparameter optimization and pre-trained agents included.
https://rl-baselines3-zoo.readthedocs.io
MIT License
2.01k stars 510 forks source link

[Question] Support for Customized BaseFeaturesExtractor #411

Closed kingjin94 closed 11 months ago

kingjin94 commented 11 months ago

❓ Question

I have implemented a FeatureExtractor as suggested in https://stable-baselines3.readthedocs.io/en/master/guide/custom_policy.html#custom-feature-extractor that I can manually train within SB3. It seems that using such a feature extractor has not yet been considered within the rl-baselines3-zoo. Is anyone aware of such efforts?

A preliminary survey of this code base indicates to me that an integration should be rather straight forward. It would require

  1. some kind of registration such that the code of the custom Feature Extractor can be found and named (similar to ALGOS in utils.py or the registrations done in import_envs.py)
  2. a slight change to ExperimentManager such that it adds "policy_kwargs" -> "features_extractor_class" based on the str to class mapping implemented in step 1.

I welcome any feedback on where else model creation is touched or where such a registration step for custom feature extractors would be appropriate.

Checklist

araffin commented 11 months ago

Duplicate of https://github.com/DLR-RM/rl-baselines3-zoo/issues/300, see the two solutions.