-
Notifications
You must be signed in to change notification settings - Fork 398
Formatting fixes #120
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
base: main
Are you sure you want to change the base?
Formatting fixes #120
Conversation
""" | ||
|
||
def broadcast_parameters(self): | ||
def broadcast_parameters(self) -> None: |
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 personally dont like the -> None
type inting anywhere, it feels redundant.
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.
@Mayankm96 Whats your opinion on this? :D
def reset( | ||
self, | ||
dones: torch.Tensor | None = None, | ||
hidden_states: tuple[torch.Tensor | tuple[torch.Tensor, ...] | None, ...] = (None, None), |
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 such an ugly type 😅
It would feel pretty confusing to me if i were using it for the first time. Either we define a HiddenState type in the memory.py
or we need to add some docstrings. I would personally prefer the first one
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.
Mh, I get it, but I am personally not a big fan of defining types. But maybe it still makes sense for this one.
old_mu_batch = old_mu[batch_idx] | ||
old_sigma_batch = old_sigma[batch_idx] | ||
|
||
hid_a_batch = None |
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.
does creating this None variables inside the loop add some non negligeble overhead? Probably not right
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 would doubt that. Should be fine :)
Validated on the following tasks: