Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipeline does not run when using SRL model that is a property of the environment. #27

Open
Caselles opened this issue Aug 9, 2018 · 1 comment
Labels
bug Something isn't working

Comments

@Caselles
Copy link
Collaborator

Caselles commented Aug 9, 2018

When you use the first way to add your SRL model, cf README of repo state_representation :

If your SRL model is a carateristic of the environment (position, angles, ...):

Add the name of the model to the registered_srl dictionary in state_representation/registry.py, using this format NAME: (SRLType.ENVIRONMENT, [LIMITED_TO_ENV]), where:
NAME: is your model's name.
[LIMITED_TO_ENV]: is the list of environments where this model works (will check for subclass), set to None if this model applies to every environment.
Modifiy the def getSRLState(self, observation) in the environments to return the data you want for this model.
Now you can call your SRL model using --srl-model NAME with train.py or pipeline.py.

Then there is no problem with train.py, but pipeline.py does not run because of these lines : https://github.com/araffin/robotics-rl-srl/blob/master/rl_baselines/utils.py#L318

The problem is that it tries to call the SRLModel as if you would have added it with the second way specified in the README.

My fix is to avoid going in that if statement. I'm sure there a better way to fix it.

@araffin araffin added the bug Something isn't working label Aug 9, 2018
@hill-a
Copy link
Collaborator

hill-a commented Aug 14, 2018

The code seems to think you are loading an SRL model from srl_zoo, but you registered it as an environment SRLType. Have you added a path to the config files? before very recently (ef51ccd) we inferred the type of SRL, by seeing if the model had a defined path or not.

If this is not the case, can you post the exact tracecall and the parameters that where sent to the environment? (pipeline --verbose)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants