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

Hypergrid.get_terminating_states_indices code #205

Closed
younik opened this issue Oct 22, 2024 · 4 comments
Closed

Hypergrid.get_terminating_states_indices code #205

younik opened this issue Oct 22, 2024 · 4 comments
Assignees
Labels
bug Something isn't working invalid This doesn't seem right small Small enhancement

Comments

@younik
Copy link
Collaborator

younik commented Oct 22, 2024

I believe this function is not correct; it should be without argument and use self.sf (?)

def get_terminating_states_indices(
self, states: DiscreteStates
) -> TT["batch_shape", torch.long]:
return self.get_states_indices(states)

@josephdviviano josephdviviano self-assigned this Nov 15, 2024
@josephdviviano josephdviviano added bug Something isn't working small Small enhancement labels Nov 15, 2024
@josephdviviano
Copy link
Collaborator

OK - actually, this is fine. It's supposed to return the indices of the final states as sampled. It's used in this file

states_indices = env.get_terminating_states_indices(states).cpu().numpy().tolist()

to calculate the l1_dist with the true posterior.

however I'm going to patch up one or two things to make this more obvious and make the tests more robust.

@josephdviviano
Copy link
Collaborator

I've submitted a PR that hopefully addresses the confusion here.

@josephdviviano josephdviviano closed this as not planned Won't fix, can't repro, duplicate, stale Nov 15, 2024
@josephdviviano
Copy link
Collaborator

There's no need for this function when it just calls self.get_states_indices -- we should simply directly call this.

@josephdviviano
Copy link
Collaborator

Will follow up in new issue

@josephdviviano josephdviviano closed this as not planned Won't fix, can't repro, duplicate, stale Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right small Small enhancement
Projects
None yet
Development

No branches or pull requests

2 participants