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.
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
Load
esmvalcore.dataset.Dataset
objects in parallel using Dask #2517base: main
Are you sure you want to change the base?
Load
esmvalcore.dataset.Dataset
objects in parallel using Dask #2517Changes from 9 commits
4649d87
bc889ba
a21996d
0bd3da1
7e232a3
4057950
d19ce4d
078b5bf
81b41a0
d5a39af
52cc1ed
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes how data is passed through the different preprocessor functions, doesn't it?
Right now, for example,
fix_metadata
will get ALL cubes from ALL files as input. With this change here, it will only get the cubes from one file, right?I know that
fix_metadata
itself groups by file, but this is already very problematic (see #1806 and #2551).I also fear that this might have other undesired side effects. Why do you need to treat these first preprocessor functions differently in the new code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To improve parallelism. Like this, each input file can be loaded and preprocessed up to the concatenate step in parallel.
No, it just takes the grouping out of
fix_metadata
and implements it in the function callingfix_metadata
to enable additional parallelism. If this pull request is merged, #2551 would need to be updated to do the grouping here instead of insidefix_metadata
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I think I misunderstood the code in the first place. The function
preprocess
is not at all straightforward when it comes to handling of input and output types...I agree that the behavior has not changed.I will test this with a couple of recipes once Levante is running again next week. In the meantime, would it make sense to remove the grouping of files in
fix_metadata
? It would be confusing to have this in two places of the code. I know that this wouldn't be strictly backwards-compatible, but the grouping was only enabled if the cubes have asource_file
attribute (which is probably only the case when used within ESMValTool). I highly doubt that this function would be very useful outside of ESMValTool anyway.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the grouping in d5a39af, but where would you suggest we remove the
"source_file"
attribute now? Apart from grouping, it is also used to generate error messages from the cmor checkers. Should it be removed aftercmor_check_data
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. I would either remove it after
cmor_check_data
or remove it altogether from the code. The preprocessors log all filenames anyway now, so its not as important anymore as it used to be.