Skip to content

Empty target for stream still looks for coordinate embedding network #1748

@kctezcan

Description

@kctezcan

What happened?

In model.py, predict_decoders(), we have in a loop over the stream names:

for stream_name in self.stream_names:
    ...
    # embed token coords
    tc_embed = self.embed_target_coords[stream_name]
    tc_tokens = tc_embed(t_coords)

If we have a stream tht is only used as a forcing, i.e. does not have any targets, it does not have network in embed_target_coords, so self.embed_target_coords[stream_name] returns an error.

Solution: we should add a check in the loop:

for stream_name in self.stream_names:
    ...
    if stream_name not in self.embed_target_coords.keys():
        continue

    # embed token coords
    tc_embed = self.embed_target_coords[stream_name]
    tc_tokens = tc_embed(t_coords)

What are the steps to reproduce the bug?

run for example era5 as forcing and decode synop

Hedgedoc link to logs and more information. This ticket is public, do not attach files directly.

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions