Fix feature coordinate handling in WeatherDataset#558
Fix feature coordinate handling in WeatherDataset#5582024itb047samata wants to merge 1 commit intomllam:mainfrom
Conversation
|
#556 tackles this issue already. PLEASE @2024itb047samata stop submitting PRs without checking for dupes |
|
Hi @sadamov, I noticed that #556 is still open, which is why I worked on this issue to provide a minimal and focused alternative fix for the feature coordinate handling. I understand the concern about overlapping work, and I’ll be more careful to coordinate and check active PRs beforehand. That said, I would really appreciate more specific guidance on how you’d prefer contributors to proceed in such cases (e.g., whether to wait, collaborate on an existing PR, or propose alternatives). That would help avoid similar situations going forward. Happy to adjust or close this PR if needed. |
|
Hi @2024itb047samata, are you already a part of our slack channel kutt.to/mllam? Joel posted this message some weeks ago about contributing to neural-lam: https://ml-lam.slack.com/archives/C0AFPLZ682X/p1772895022445439 I think your questions should be answered there. It is however a totally fair criticism that we don't yet have a proper CONTRIBUTING.md file, which is being worked on in #407. I hope we get this merged soon and then things should become even clearer. |
Describe your changes
This PR fixes incorrect feature coordinate handling in
WeatherDataset.Previously, the implementation hardcoded access to
state_feature, which caused failures for other dataset categories such asforcingandstatic.This change dynamically selects the correct coordinate using
f"{category}_feature", accesses it viada_datastore_state.coords[feature_key], and adds validation to ensure the coordinate exists. It also improves error messages for easier debugging.Issue Link
Closes #536
Type of change
Checklist before requesting a review
pullwith--rebaseoption if possible).Checklist for reviewers
Author checklist after completed review
reflecting type of change (add section where missing):
Checklist for assignee