Conversation
yousefmoazzam
left a comment
There was a problem hiding this comment.
Looks reasonable to me!
If it hasn't been done so already, I'd recommend running the memory hook tests in httomo-backends against these changes, to double-check that memory estimation of methods which use the new validation function hasn't been affected.
Another thing to mention is that httomolibgpu has a .pre-commit-config.yaml which has black formatting setup, so I'm assuming that httomolibgpu code should be formatted with black? If so, you may want to check if black has been applied to the changed files, I can see some things like missing newline characters and no spaces after commas that I think wouldn't be present if black were applied (though I could be wrong!).
|
Very good point about |
|
This also allocates the memory: |
|
Yes, looks like both functions (inf's nan's estimation/removal) and zeros calculation create the copy of the data. This actually opens up more general discussion, sorry for many words. I can see two ways of dealing with this as modifying every memory estimator doesn't seem appealing at all.
Both approaches have benefits actually:
To me it looks like we need both 1 and 2 :) But we can do this in stages, if no. 1 resolves the memory issue, we can merge it first and then we can do no. 2. Any thoughts? |
|
Latest update. I've implemented no.1 from above. All tests now pass in the branch and with |
adding data validation modules, tests and correcting all functions in misc