Skip to content
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

fix and enhance masked output #86

Open
dietervdb-meteo opened this issue Dec 18, 2024 · 0 comments
Open

fix and enhance masked output #86

dietervdb-meteo opened this issue Dec 18, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@dietervdb-meteo
Copy link
Contributor

What happened?

Output has an extract_lam option that currently is broken (it doesn't get the cutout mask correctly out of the checkpoint). This should be fixed.

At the same time during training one has the option to set an output_mask in the model part of the config. This mask is now also stored in the checkpoint. It thus seems natural to define a more general masked_output to replace extract_lam. The idea would be that one can specify in the config which mask to apply to crop the output, but that the default will be output_mask (a feature of the model) , rather than the cutout_mask (which is a feature of the dataset).

What are the steps to reproduce the bug?

Run inference on a lam model checkpoint with a config including

output:
  extract_lam:
    output:
       <my_favorite_output_type>

Version

current develop

Platform (OS and architecture)

irrelevant

Relevant log output

File "XXX/lib/python3.12/site-packages/anemoi/inference/outputs/extract_lam.py", line 28, in __init__
    mask = self.checkpoint.load_supporting_array(points)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "XXX/anemoi-auto-test/lib/python3.12/site-packages/anemoi/inference/checkpoint.py", line 216, in load_supporting_array
    return self._metadata.load_supporting_array(name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "XXX/lib/python3.12/site-packages/anemoi/inference/metadata.py", line 741, in load_supporting_array
    raise ValueError(f"Supporting array `{name}` not found")
ValueError: Supporting array `cutout_mask` not found
2024-12-18 10:15:12 ERROR 
💣 Supporting array `cutout_mask` not found
2024-12-18 10:15:12 ERROR 💣 Exiting

Accompanying data

No response

Organisation

RMI

@dietervdb-meteo dietervdb-meteo added the bug Something isn't working label Dec 18, 2024
@dietervdb-meteo dietervdb-meteo self-assigned this Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant