-
Notifications
You must be signed in to change notification settings - Fork 53
Dummy exit actions for graph building #442
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
Conversation
| # 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, | ||
| ) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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)
| if module is None: | ||
| results[name] = False | ||
| continue | ||
|
|
||
| # If the estimator does not have a module, we cannot compile it. | ||
| try: |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
|
oops, i merged another PR which I think included this one by mistake. ill address these changes now |
Description
Adds a basic exit / dummy action which DB / SubTB can use