Skip to content

Conversation

@garrettwrong
Copy link
Collaborator

For my first pull request with this group, I started with something a manageable size.

A BlockDiagonal class replaces blk_diag_* functions. This includes:

  • operator overloading, and some additional operations
  • slightly optimized in-place operations
  • some additional unit tests
  • Replace known uses of blk_diag

In the future, it is possible to optimize this code several ways. One way is to parallelize the block computations in python. Alternatively, the code was tested and is able to be Cython-ized, but this requires some ugly adjustments. Such optimizations should be easier now that we are consistently using the class (afaict).

There are still a few todo items I will complete, and I would like to review the code myself with fresh eyes as well, but I think it is close enough that we can go through the motions of a review.

Closes #111

@garrettwrong garrettwrong requested a review from junchaoxia April 15, 2020 14:03
Copy link
Collaborator

@junchaoxia junchaoxia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall it looks good. Some discussions can be done to make some changes before merging.

@garrettwrong
Copy link
Collaborator Author

@junchaoxia I think most of the comments have been addressed if you want to take another peek at the latest. I tried to stack the commits closer to how you discussed as well. Thanks.

@garrettwrong
Copy link
Collaborator Author

garrettwrong commented Apr 16, 2020

rebased from latest develop that has the pipeline fixes. Perhaps not. Will look tomorrow.

Copy link
Collaborator

@janden janden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some things to discuss here. Overall looks very good.

One thing to note: the PR is quite large, which makes reviewing and discussing more difficult (rule of thumb we try to use is roughly one day of work or 800 lines). Large PRs are of course unavoidable sometimes (many moving parts that need to be changed to avoid breaking things). For this type of feature, it might be good to have one PR to add the basic functionality (say without operator overloading), another to extend that functionality, and then another where the functionality is integrated into the rest of the project and the old code is removed.

mostly docstring formatting and readability

some minor code improvements
@garrettwrong
Copy link
Collaborator Author

@janden I got the first batch of easy stuff. I will go back to the remaining items Monday. I have a better idea what you are looking for regarding style etc now. I got a little rusty at PPPL :). Have a nice weekend.

Copy link
Collaborator

@janden janden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Just one or two small things.

Copy link
Collaborator Author

@garrettwrong garrettwrong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following our discussion I implemented the suggested changes. Will merge in once CI pipeline completes.

also cleanup some pep8 whitespace complaints
@garrettwrong
Copy link
Collaborator Author

@junchaoxia When you get a second can you review/accept? This way I can avoid using admin overide to merge. Thanks

@garrettwrong garrettwrong merged commit e8e3472 into ComputationalCryoEM:develop May 1, 2020
@garrettwrong garrettwrong deleted the blk_diag_class branch February 16, 2021 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants