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
LinearOperator Base Class #3659
Conversation
raise RuntimeError("super().__init__ must be executed first") | ||
|
||
|
||
def checklinop(linop: LinearOperator) -> 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 should be moved to the tests and not in the main library
return self._is_gpn_implemented | ||
|
||
# debug functions | ||
def check(self, warn: Optional[bool] = 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 should be moved to unit test
create_graph=torch.is_grad_enabled())[0] # (*BAY, q) | ||
return res | ||
|
||
# def __check_if_implemented(self, methodname: str) -> bool: |
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.
Remove the commented out code
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.
Once we move tests out and cleanup this should be nearly ready to merge
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.
LGTM
Description
Fix #(issue)
Linear Operator. Contains only the main class.
Subsequent Classes for addition division multiplication will be implemented in further PRs.
Type of change
Please check the option that is related to your PR.
Checklist
yapf -i <modified file>
and check no errors (yapf version must be 0.32.0)mypy -p deepchem
and check no errorsflake8 <modified file> --count
and check no errorspython -m doctest <modified file>
and check no errors