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

Argument 'variables' missing for Checkpoint.mars_requests #127

Open
jasperges opened this issue Feb 4, 2025 · 0 comments
Open

Argument 'variables' missing for Checkpoint.mars_requests #127

jasperges opened this issue Feb 4, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@jasperges
Copy link

What happened?

When trying to run inference on a model with input from mars I ran into an error:

File "/home/jasperge/.local/pyenv/versions/3.13.1/envs/parallel-inference/lib/python3.13/site-packages/anemoi/inference/commands/requests.py", line 32, in run
    for r in c.mars_requests(dates=[-1], use_grib_paramid=args.use_grib_paramid):
             ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Checkpoint.mars_requests() missing 1 required keyword-only argument: 'variables'

In the config file I have:

input:
  mars:
    class: ea
    stream: oper

When I looked in anemoi/inference/commands/requests.py my editor was also pointing out this error. When you look at line 257 of anemoi/inference/checkpoint.py you can see that Checkpoint.mars_requests() indeed expects a keyword argument variables which is clearly not being passed in the invocation in requests.py.

What are the steps to reproduce the bug?

Use mars to get the input data when running inference. Or just look at the mentioned code. 😇

Version

v0.4.6

Platform (OS and architecture)

Fedora 41 (6.12.11-200.fc41.x86_64)

Relevant log output

Traceback (most recent call last):
  File "/home/jasperge/.local/pyenv/versions/parallel-inference/bin/anemoi-inference", line 8, in <module>
    sys.exit(main())
             ~~~~^^
  File "/home/jasperge/.local/pyenv/versions/3.13.1/envs/parallel-inference/lib/python3.13/site-packages/anemoi/inference/__main__.py", line 23, in main
    cli_main(__version__, __doc__, COMMANDS)
    ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jasperge/.local/pyenv/versions/3.13.1/envs/parallel-inference/lib/python3.13/site-packages/anemoi/utils/cli.py", line 153, in cli_main
    cmd.run(args)
    ~~~~~~~^^^^^^
  File "/home/jasperge/.local/pyenv/versions/3.13.1/envs/parallel-inference/lib/python3.13/site-packages/anemoi/inference/commands/requests.py", line 32, in run
    for r in c.mars_requests(dates=[-1], use_grib_paramid=args.use_grib_paramid):
             ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Checkpoint.mars_requests() missing 1 required keyword-only argument: 'variables'
[ble: exit 1]

KNMI/mlops/parallel-inference via 🐍 v3.13.1 (parallel-inference)
>> anemoi-inference requests --mars --use-grib-paramid CERRA_stretched_grid_ch512_inference-anemoi-by_epoch-epoch_011-step_150000.ckpt
Traceback (most recent call last):
  File "/home/jasperge/.local/pyenv/versions/parallel-inference/bin/anemoi-inference", line 8, in <module>
    sys.exit(main())
             ~~~~^^
  File "/home/jasperge/.local/pyenv/versions/3.13.1/envs/parallel-inference/lib/python3.13/site-packages/anemoi/inference/__main__.py", line 23, in main
    cli_main(__version__, __doc__, COMMANDS)
    ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jasperge/.local/pyenv/versions/3.13.1/envs/parallel-inference/lib/python3.13/site-packages/anemoi/utils/cli.py", line 153, in cli_main
    cmd.run(args)
    ~~~~~~~^^^^^^
  File "/home/jasperge/.local/pyenv/versions/3.13.1/envs/parallel-inference/lib/python3.13/site-packages/anemoi/inference/commands/requests.py", line 32, in run
    for r in c.mars_requests(dates=[-1], use_grib_paramid=args.use_grib_paramid):
             ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Checkpoint.mars_requests() missing 1 required keyword-only argument: 'variables'

Accompanying data

No response

Organisation

KNMI

@jasperges jasperges added the bug Something isn't working label Feb 4, 2025
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

2 participants