Code Monkey home page Code Monkey logo

Comments (9)

tewalds avatar tewalds commented on June 19, 2024 1

I'm not entirely sure what will happen if you give it a smaller input than expected, but I would not expect useful results. The trunk of the model is a global multimesh. It's possible the encoder/decoder will only connect to a subset of the global mesh, which would lead to the nodes not connected to the inputs would likely be initialized to 0s. Given the multimesh has long range connections, the receptive field of any given output is the entire globe, so I'd expect all outputs to be at least minorly affected by all inputs, which would be 0s instead of something sensible. It's possible, if unlikely, that the model learned to ignore the long range connections leading to a non-global receptive field, but I am certain the receptive field for several variables is large (several thousand of km). If you really want a model that works on patches you'd have to change your internal representation to one without a large receptive field (this ablation is shown in 7.3.1 in the supplementary materials of the science paper while still remaining a global model), and your inputs will need to be as big as the receptive field for your expected output area. This type of model would save memory but would be more computationally expensive, especially if you want to do long time horizon evaluation since the receptive field would become global over a day or two anyway.

from graphcast.

tewalds avatar tewalds commented on June 19, 2024

GraphCast always does whole world prediction. You're welcome to run evaluations you'd like on any region you'd like though. We haven't open sourced our evaluation code, but weatherbench may be helpful there.

from graphcast.

Javier-Jimenez99 avatar Javier-Jimenez99 commented on June 19, 2024

I tried to call the model with an input_dataset which does not have all lat-lon coordinates. It is predicted over the whole world, can I assume that, at least the coordinates I used as input, are correctly mapped to the output?

from graphcast.

MiodragRancic-NOAA avatar MiodragRancic-NOAA commented on June 19, 2024

What exactly component of Graphcast would need to be modified in order to use it for regional prediction? Thanks!

from graphcast.

tewalds avatar tewalds commented on June 19, 2024

Given your region is part of the earth, just generate whole world predictions then crop the output?

If you really wanted to only generate predictions for a subregion (eg to predict at higher resolution), you'll need to modify the model then retrain. The model currently has an encoder in the form of a graphnet from a whole world grid to a icosahedral mesh, then a 16 layer graphnet over a multimesh, then a decoder from the mesh back to the whole world grid. You'd need to replace the icosahedral multimesh with something useful for your patch area. You'll also need to deal with the boundary condition problems, presumably by having a larger input region than output region, though that will make multi-step predictions harder, and updating the loss to only apply to the region of interest. You'd then need to retrain it from scratch.

from graphcast.

MiodragRancic-NOAA avatar MiodragRancic-NOAA commented on June 19, 2024

from graphcast.

tewalds avatar tewalds commented on June 19, 2024

If you're willing to put in the effort, you could modify the encoder, decoder and internal mesh to not be uniform. Right now the main computation is done on a uniform 2^6 mesh, but you could do 2^5 in some areas and 2^7 in others. Similarly the encoder/decoder input from a uniform 0.25deg grid, but it could be modified to accept arbitrary points as input, so you don't need to use a cube sphere if you'd prefer to use something that matches your actual geometry better. It may be a bit of work to get that working, but this is definitely the power of graphnets over CNNs or standard image transformers that assume a regular grid.

A 2.5-3km input is much (10^2x) higher than what we currently use, so you're likely to run into memory constraints unless you also put effort into reducing the memory usage. A single 0.25deg grid input with 37 levels and 6 variables per level is almost 1GB (at float32), so 100x the resolution will exhaust any single device's memory, never mind that we take two and need memory for intermediate values, especially at training. Of course only representing 10% of the globe at that resolution would help, but still, there will be work in dealing with this. We already had to use several tricks to run at 0.25deg within 32GB, especially when doing multi-step training. A100/H100s with 80GB will help a bit, but will still struggle. Sharding a graphnet across multiple devices is likely possible, but is likely non-trivial to do performantly. Of course higher resolution will also take longer to train due to additional computation.

from graphcast.

MiodragRancic-NOAA avatar MiodragRancic-NOAA commented on June 19, 2024

from graphcast.

mjwillson avatar mjwillson commented on June 19, 2024

Thanks -- I think we can close this now. To summarise, yes you could potentially adapt GraphCast to be a kind of combination of a high-res local area model + lower-res global model if you adapted the encoder/decoder/internal mesh structures to add local refinements over your local area of interest. It would be a substantial amount of work though and not in scope for this github project.

from graphcast.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.