Skip to content
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

Unittests for SPDHG take long time #1496

Closed
paskino opened this issue Aug 10, 2023 · 3 comments · May be fixed by #1644
Closed

Unittests for SPDHG take long time #1496

paskino opened this issue Aug 10, 2023 · 3 comments · May be fixed by #1644
Assignees
Milestone

Comments

@paskino
Copy link
Contributor

paskino commented Aug 10, 2023

Unittests for SPDHG are done with the ASTRA cpu projector and on relatively large data, taking long time. We should reduce the amount of data that is processed.

def test_SPDHG_vs_PDHG_implicit(self):
data = dataexample.SIMPLE_PHANTOM_2D.get(size=(128,128))
ig = data.geometry
ig.voxel_size_x = 0.1
ig.voxel_size_y = 0.1
detectors = ig.shape[0]
angles = np.linspace(0, np.pi, 90)
ag = AcquisitionGeometry.create_Parallel2D().set_angles(angles,angle_unit='radian').set_panel(detectors, 0.1)
# Select device
dev = 'cpu'
Aop = ProjectionOperator(ig, ag, dev)

@gfardell
Copy link
Member

gfardell commented Apr 5, 2024

test_SPDHG_vs_PDHG_explicit and test_SPDHG_vs_PDHG_implicit
are particularly slow. The assert_almost_equal on such a large array is probably one of the biggest costs.

@MargaretDuff
Copy link
Member

Thanks Gemma - have added this comment to #1644 PR which attempted to fix the slow tests

@gfardell gfardell assigned gfardell and unassigned MargaretDuff May 1, 2024
@gfardell gfardell added this to the v24.2.0 milestone Jul 15, 2024
@MargaretDuff
Copy link
Member

Closed by #1898

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: No status
3 participants