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

BinaryDiscreteTensorSpec vs DiscreteTensorSpec #980

Closed
matteobettini opened this issue Mar 20, 2023 · 2 comments
Closed

BinaryDiscreteTensorSpec vs DiscreteTensorSpec #980

matteobettini opened this issue Mar 20, 2023 · 2 comments

Comments

@matteobettini
Copy link
Contributor

I recently saw that the default done_spec is

 self.output_spec["done"] = DiscreteTensorSpec(
            n=2, shape=(*self.batch_size, 1), dtype=torch.bool, device=self.device
        )

Is there a reason that this is not a BinaryDiscreteTensorSpec?
Should we make BinaryDiscreteTensorSpec just call DiscreteTensorSpec with n=2 to simplify the codebase?

@vmoens
Copy link
Contributor

vmoens commented Mar 20, 2023

I'm in for simplication yep.
We could inherit from DiscreteTensorSpec and put a warning saying that it will be deprecated some time in the future, wdyt?

@matteobettini
Copy link
Contributor Author

Yep, even without deprecating it, but just using all the logic from DiscreteTensorSpec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants