-
Notifications
You must be signed in to change notification settings - Fork 66
adding some additional docstrings #81
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
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.
left a few small text suggestions
sub-packages/bionemo-example_model/src/bionemo/example_model/lightning_basic.py
Outdated
Show resolved
Hide resolved
value: The value tensor of shape [sk, b, ng, hn]. | ||
attention_mask: The attention mask tensor of shape [b, np, sq, sk]. | ||
attn_mask_type: The attention mask type, currently unused. Defaults to None. | ||
packed_seq_params: The packed sequence parameters. Defaults to 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.
packed_seq_params: The packed sequence parameters. These are used for context parallelism so will be needed to be implemented if we want to support this. Defaults to 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.
Approved with a few comments/suggestions.
|
||
!!! warning | ||
|
||
Using F.gelu yields subtly wrong results. |
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.
TODO can we figure out why they're wrong and explain that?
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.
not necessarily in this PR just maybe track that we should improve this docstring.
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.
@farhadrgh -- tagging you here, do you have an explanation as to why?
Co-authored-by: Steven Kothen-Hill <[email protected]> Signed-off-by: Peter St. John <[email protected]>
/build-ci |
class BionemoModelConfig(Generic[Model], ABC): | ||
"""An abstract class for model configuration.""" | ||
|
||
@abstractmethod | ||
def configure_model(self, *args, **kwargs) -> Model: # D101 # noqa: D102 | ||
def configure_model(self, *args, **kwargs) -> Model: | ||
"""Configures the model.""" | ||
raise NotImplementedError() | ||
|
||
|
||
class BionemoTrainableModelConfig(Generic[Model, Loss], BionemoModelConfig[Model]): # D101 # noqa: D101 | ||
class BionemoTrainableModelConfig(Generic[Model, Loss], BionemoModelConfig[Model]): | ||
"""An abstract class for trainable model configuration.""" | ||
|
||
@abstractmethod | ||
def get_loss_reduction_class(self) -> Type[Loss]: # D101 # noqa: D102 | ||
def get_loss_reduction_class(self) -> Type[Loss]: | ||
"""Returns the loss reduction class.""" |
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.
Is this ChatGPT output @pstjohn ?
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.
Yeah copilot most likely
Some additional work towards removing these docstring-ignore ruff rules