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

[rllib] Observations are forced to be a float numpy array? #13432

Open
deeplearningrobotics opened this issue Jan 14, 2021 · 4 comments
Open
Labels
bug Something that is supposed to be working; but isn't rllib RLlib related issues

Comments

@deeplearningrobotics
Copy link

What is the problem?

Ray version 1.0.1 with TF 2.2

I have complex observations containing of strings but also float arrays. It seems RLlib only accepts float numpy arrays or dicts/lists of those as observations from a custom environment.

Does some documentation exist on how to get complex non-float observations to work?
Either complex observations always end up as a float tensor or RLlib throws an error because it assumes that the observations are a numpy array.

Reproduction (REQUIRED)

I will work on providing some standalone example as soon as I can. But this requires a bit more work as I need to provide a custom environment and a custom model.

@deeplearningrobotics deeplearningrobotics added bug Something that is supposed to be working; but isn't triage Needs triage (eg: priority, bug/not-bug, and owning component) labels Jan 14, 2021
@richardliaw richardliaw added rllib and removed triage Needs triage (eg: priority, bug/not-bug, and owning component) labels Jan 14, 2021
@richardliaw
Copy link
Contributor

cc @sven1977

@ericl ericl added this to the RLlib Bugs milestone Mar 11, 2021
@ericl ericl removed the rllib label Mar 11, 2021
@Bam4d
Copy link
Contributor

Bam4d commented Mar 18, 2021

@deeplearningrobotics I have been working around this by putting observations that are not tensors into the 'info' dict and then retrieving them later on in the policy by overriding compute_actions_from_input_dict. Its pretty hacky but it works 🚀

@maxsnijders
Copy link

@Bam4d if you have any details on how to get the info dict inside compute_actions_from_input_dict then that would be very helpful! There's a kwarg for info_dict, but if I breakpoint there it doesn't seem like the "info" that's returned from step() by the environment through it's last return value is present.

@Bam4d
Copy link
Contributor

Bam4d commented Sep 27, 2021

I think this bug was fixed in one of the latest versions. 1.6.0 perhaps

@richardliaw richardliaw added the rllib RLlib related issues label Oct 5, 2021
@anyscalesam anyscalesam removed this from the RLlib Bugs milestone Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is supposed to be working; but isn't rllib RLlib related issues
Projects
None yet
Development

No branches or pull requests

6 participants