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

[Proposal] Allow to specify dtype for Discrete #1118

Open
1 task done
younik opened this issue Jul 13, 2024 · 2 comments
Open
1 task done

[Proposal] Allow to specify dtype for Discrete #1118

younik opened this issue Jul 13, 2024 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@younik
Copy link
Member

younik commented Jul 13, 2024

Proposal

Add dtype argument to spaces.Discrete (similar to MultiDiscrete and Box).

Motivation

Currently the dtype is fixed to numpy.int64. However, often Discrete spaces are much smaller, resulting in a waste of memory.

Pitch

No response

Alternatives

No response

Additional context

No response

Checklist

  • I have checked that there is no similar issue in the repo
@younik younik added the enhancement New feature or request label Jul 13, 2024
@pseudo-rnd-thoughts
Copy link
Member

Sure, if you can update all the functions and update the example testing spaces with dtypes

@Kallinteris-Andreas Kallinteris-Andreas added the good first issue Good for newcomers label Sep 25, 2024
@JDRanpariya
Copy link
Contributor

JDRanpariya commented Oct 6, 2024

I would like to work on the issue.

Can you guide me on what other functions needs to be updated if we default it to int8 or int32 in constructor?

With example testing spaces do you mean tests/spaces/test_discrete.py? There is no explicit dtype checks in multidiscrete test, can you tell what needs to be done there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants