-
Notifications
You must be signed in to change notification settings - Fork 2
Conversation
General
- Prefer
pyproject.tomloverrequirements.txt. Refer to Why Should I Choose pyproject.toml over requirements.txt for managing dependencies? - Use a nested folder structure. Aka
train.py,dataloader.pygo insidesrcorllm101orscriptsfolder. This will help in adding atestfolder - Implement unit tests (Not applicable in this instance, but just typing out)
- Have appropriate white spaces after a class of a function ends. You can use autoformatters like
Blackto achieve this.
To be continued...
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.
Use if name main pattern to make this module reusable also to prevent wonky variable scoping
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.
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.
Dont use global variables
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.
use if __name__ == "__main__":
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.
Move this to else block. This is causing confusion.
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.
Prefer initizliser list. This way your compiler can warn you if there are uninitialized variables
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 like east const. Checkout https://hackingcpp.com/cpp/design/east_vs_west_const.html
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.
Typically in C++ member variables have a m_ prefix. This prevents variable shadowing
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.
Mark this as final so no one accidently inherets.
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.
Prefer auto initialization. This prevents uninitialized garbage values
Adds two files:
Adds dataloaders as well as requirements file as well.