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

Stateless enviroments #334

Open
AlexandraVolokhova opened this issue Jul 10, 2024 · 5 comments
Open

Stateless enviroments #334

AlexandraVolokhova opened this issue Jul 10, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@AlexandraVolokhova
Copy link
Collaborator

There're several methods in the environments which work with states (e.g. state2policy, get_parents) and either take state as an input or use internal state of the enrolment self.state. This was a source of bugs in the past (when an env was supposed to transform input states but is was transforming the internal state or vice versa)

Proposal (by @carriepl ):
Alternative approach would be to get rid of the internal state of the environment and require input state for all methods where the state is needed.

@AlexandraVolokhova AlexandraVolokhova added the enhancement New feature or request label Jul 10, 2024
@alexhernandezgarcia
Copy link
Owner

I think I would like to hear more arguments for this change. If we make the environment stateless, then we should also get rid of self.done and pass it to all methods too, and probably self.n_actions, etc. It should be all or nothing, no?

@AlexandraVolokhova
Copy link
Collaborator Author

@carriepl could you elaborate on that? I'm not sure I fully understood your suggestion to be able to address Alex's question

@josephdviviano
Copy link
Collaborator

josephdviviano commented Jul 10, 2024 via email

@alexhernandezgarcia
Copy link
Owner

I'm not boldly against it, but it's a huge change that would require changing many methods in all environments and all their units tests. Even if I wanted to have this change done in theory, I don't see myself doing it right now.

@josephdviviano
Copy link
Collaborator

josephdviviano commented Jul 10, 2024 via email

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

No branches or pull requests

3 participants