Skip to content

Possible regression with PyNIO data not being lazily loaded #1720

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

Closed
shoyer opened this issue Nov 15, 2017 · 6 comments
Closed

Possible regression with PyNIO data not being lazily loaded #1720

shoyer opened this issue Nov 15, 2017 · 6 comments

Comments

@shoyer
Copy link
Member

shoyer commented Nov 15, 2017

@WeatherGod reports on the mailing list:

I just tried [0.10.0 rc2] out in combination with the pynio engine (v1.5.0 from conda-forge), and doing a print on a dataset object causes all of the data to get loaded into memory.

@shoyer
Copy link
Member Author

shoyer commented Nov 17, 2017

@WeatherGod can you verify that you don't get immediate loading when loading netCDF files, e.g., with scipy or netCDF4-python?

We did change how loading of data works with printing in this release (#1532), but if anything the changes should go the other way, to do less loading of data.

I'm having trouble debugging this locally because I can't seem to get a working version of pynio installed from conda-forge on OS X (running into various ABI incompatibility issues when I try this in a new conda environment).

@WeatherGod
Copy link
Contributor

WeatherGod commented Nov 17, 2017 via email

@shoyer
Copy link
Member Author

shoyer commented Nov 17, 2017

The private Variable._in_memory attribute (e.g., ds.variables['temperature']._in_memory) will tell you if xarray thinks the data is in memory for the purposes of printing array values.

Are you using dask to load this data? That can also change things.

@fujiisoup
Copy link
Member

fujiisoup commented Nov 17, 2017

I don't think we have tests of this case for any backend other than dask after #1532.
In my local tests, many backend array are loaded after print.

@fujiisoup
Copy link
Member

OK. Found a bug and sent a PR.
This was the smallest bug fix I have ever done :)

@WeatherGod
Copy link
Contributor

Awesome! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants