Skip to content

Conversation

@josephdviviano
Copy link
Collaborator

  • I've read the .github/CONTRIBUTING.md file
  • My code follows the typing guidelines
  • I've added appropriate tests
  • I've run pre-commit hooks locally

Description

Adds a basic exit / dummy action which DB / SubTB can use

@josephdviviano josephdviviano self-assigned this Nov 28, 2025
Comment on lines +378 to +399
# Required by the Actions base class for DB/SubTB style algorithms.
action_shape = (5,)
dummy_action = torch.tensor(
[
GraphActionType.DUMMY,
-2,
-2,
-2,
-2,
],
dtype=torch.long,
)
exit_action = torch.tensor(
[
GraphActionType.EXIT,
-1,
-1,
-1,
-1,
],
dtype=torch.long,
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be defined directly in GraphActions then, as those values are fixed there

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in another pr (oops)

Comment on lines +38 to +43
if module is None:
results[name] = False
continue

# If the estimator does not have a module, we cannot compile it.
try:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but we already checked above, so we can directly use module instead of try?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is because sometimes compile just fails for some reason. I'm not really sure why this happens. torch.compile interacts with all sorts of things and im only starting to learn about how it works.

@josephdviviano josephdviviano merged commit c31a0e6 into master Dec 12, 2025
3 checks passed
@josephdviviano
Copy link
Collaborator Author

oops, i merged another PR which I think included this one by mistake. ill address these changes now

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

Successfully merging this pull request may close these issues.

3 participants