This repository has been archived by the owner on Sep 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Update the test fixtures in the routes integration tests to write out a Parquet file instead of a Zarr so that we can switch over to using Parquet for all of our diag data.
If we're not using Zarr, we won't encounter a missing group. So this message will just be a file not found error.
I don't think these are relevant anymore. We don't need to distinguish between a missing file and missing group, now that we're not using Zarr. And I don't think the unreadable file is handled the same way.
Eliminate all of the code that read from Zarr files for diagnostic data and switch over to reading the data from the Parquet files we already keep for the time series data.
esheehan-gsl
force-pushed
the
replace-zarr-with-parquet
branch
from
November 17, 2023 17:54
9a2603d
to
36775e9
Compare
Using groupby and looping over each group was horrible for performance, so I've worked out a way to apply the filters to a single DataFrame regardless of whether the variable is a vector or scalar.
Moving the is_used filter to the Parquet loading is significantly improving performance for me locally when loading the wind data. Ideally, I think it would be good to let PyArrow do all of the filtering, so that may be worth looking into. I had to update the test data in a number of cases to ensure that the is_used flag is a bool, not an int.
For some reason my test data in development has its index ordered (component, nobs) instead of (nobs, component). Not sure if this is indicative of a bug somewhere in our ETL code, or if I messed something up generating this data. Regardless, being specific like this will work no matter what, so I think we should be ok with this for now.
It looks like I’ve been able to work out all of the performance problems by eliminating all of the loops in our filtering logic. I think we can proceed with eliminating Zarr for the diag data. |
ian-noaa
approved these changes
Nov 27, 2023
Ian pointed out that this is a bit hard to follow, so I've added comments and docstrings to help describe what this function is for.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Replace the code that reads diag data from Zarr files with a view that reads the data from the Parquet files.