Conversation
smellycloud
requested changes
Jan 12, 2026
|
|
||
| def __init__( | ||
| self, | ||
| index_cols: List[str] = ["time", "entity_id"], |
Collaborator
There was a problem hiding this comment.
Standardizes index names to ["time", "entity_id"] by default, but the CMDataset/PGMDataset handlers use month_id/country_id or month_id/priogrid_id.
| first_df = next(iter(df_to_aggregate.values())) | ||
| index_cols = list(first_df.index.names) | ||
| #target_cols = [c for c in first_df.columns if c not in index_cols] ### This is not right, but how to chose target cols? | ||
| target_cols = [c for c in first_df.columns if c not in index_cols] |
Collaborator
There was a problem hiding this comment.
For predictions, only columns like pred_* or specific target columns should be aggregated, not all non-index columns. This could accidentally aggregate metadata columns. Use self.configs["targets"] for actual target columns.
| for i in range(len(dfs[0])): | ||
| df_to_aggregate = [df[i] for df in dfs] | ||
| for i in range(len(n_outputs)): | ||
| model_dfs_i = {model_name: dfs[i] for model_name, dfs in eval_results.items()} |
Collaborator
There was a problem hiding this comment.
If any model returns fewer DataFrames than expected, this will raise an IndexError without a helpful error message.
Contributor
There was a problem hiding this comment.
Added explicit error message
c6e776f to
a4600f4
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.