Skip to content

Conversation

@e-koch
Copy link
Contributor

@e-koch e-koch commented Jul 14, 2025

Addressing #971 and #972

  • Fix progress bar being hardwired for ray-wise spectral operations.
  • Fix and test parallelization for convolve_to Issue is not with parallelization from Large cube convolutions - Parallel #971. Same error occurs with other functions and is somehow related to the specific FITS file.
  • Fix and test use_memmap=False for convolve_to -- warning message that parallel does not work with joblib parallelization without memmap. This was noted in the existing code but not passed to the user.
  • Add docs section in big_data.rst on selecting the directory for memmap files with memmap_dir="/path/dir/"
  • Add a new disable_huge_flag that ensures multiple memmaps aren't used in parallel with joblib (based issue in Large cube convolutions - Parallel #971 )

time2 = time.time()

if time2 - time1 > 0.3:
if time2 - time1 > 0.5:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@astrofrog Any issues with slightly increasing this load time check? It was coming in at ~0.302 s and failing for some of the windows CI tests.

print(rslt)


# @pytest.mark.skipif('True')
Copy link
Contributor

Choose a reason for hiding this comment

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

just a reminder - this is probably intended to be removed before merge?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We had this in before and I wanted to make sure tests would pass when adding these back in.

@keflavich
Copy link
Contributor

I approved, but the PR at present doesn't resolve the second two checkmarks... I probably should have waited

@e-koch
Copy link
Contributor Author

e-koch commented Jul 14, 2025

I approved, but the PR at present doesn't resolve the second two checkmarks... I probably should have waited

Yeah it still needs verification that the new tests are actually testing the parallelized part

@e-koch
Copy link
Contributor Author

e-koch commented Jul 14, 2025

https://github.com/radio-astro-tools/spectral-cube/actions/runs/16269516496/job/45933264057?pr=973#step:10:359

The #971 failure may be system specific. It's only failing on the Windows CI tests.

@e-koch
Copy link
Contributor Author

e-koch commented Jul 14, 2025

@keflavich -- I don't think we ever have parallel operations in non-dask mode without memmap?

if not parallel or not use_memmap:

Is that right?

@e-koch
Copy link
Contributor Author

e-koch commented Jul 14, 2025

Yes, I see this comment above:

# it is not possible to run joblib parallelization without memmap

I think we just need a clear warning and suggestion to use dask in these cases

@e-koch
Copy link
Contributor Author

e-koch commented Jul 15, 2025

@keflavich @astrofrog We have some important kwargs relevant to controlling the location of memmap files, etc, hidden in

def _apply_function_parallel_base(self,

Because it's a private method, though, this doesn't get included in the docs.

We could either make it a public method (not its intended use) or duplicate some of the kwarg descriptions in apply_function_parallel_spatial and apply_function_parallel_spectral. thoughts?

@keflavich
Copy link
Contributor

Yeah.... it's kind of 'private' in the sense that it's not meant to be used directly, but the documentation should be public. Maybe we remove the leading underscore, get it into the API docs, but note that "Users should not use this function directly, but the kwargs are used in other functions... [list of functions]"

@e-koch
Copy link
Contributor Author

e-koch commented Jul 15, 2025

Agreed. I'll make that change with the warning.

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.

Large cube convolutions - Parallel, no memmap Large cube convolutions - Parallel

2 participants