Zhihan Gao
Zhihan Gao
Thanks for your question. You may want to refer to the [simplest test case](https://github.com/gaozhihan/earth-forecasting-transformer/blob/a5c07f22ec53ba577d679e0a3be8eb7e77d3e82c/tests/test_cuboid.py) to verify if the shapes are aligned correctly. Please note that this test script is from...
I'm not sure if you are using the [correct script in my fork](https://github.com/gaozhihan/earth-forecasting-transformer/blob/a5c07f22ec53ba577d679e0a3be8eb7e77d3e82c/tests/test_cuboid.py), but you don't need to run `pytest`. Please simply try `python ROOT_DIR/tests/test_cuboid.py`.
You should parse the args to `CuboidTransformerModel` like https://github.com/gaozhihan/earth-forecasting-transformer/blob/a5c07f22ec53ba577d679e0a3be8eb7e77d3e82c/tests/test_cuboid.py#L24-L29
Yes, please feel free to refer to [`train_cuboid_nbody.py`]](https://github.com/amazon-science/earth-forecasting-transformer/blob/7732b03bdb366110563516c3502315deab4c2026/scripts/cuboid_transformer/nbody/train_cuboid_nbody.py) and [`train_cuboid_sevir.py`](https://github.com/amazon-science/earth-forecasting-transformer/blob/7732b03bdb366110563516c3502315deab4c2026/scripts/cuboid_transformer/sevir/train_cuboid_sevir.py) for implementing your own training script. The main task is to implement your own [`LightningDataModule`](https://lightning.ai/docs/pytorch/1.6.4/extensions/datamodules.html) to replace the original one...
Earthformer is designed to handle regularly gridded data. For your case, you may want to use masks to indicate missing values, if the data is not too sparse.
Thank you for reporting this error. It appears that the error may be related to the usage of the training script [`train_cuboid_sevir.py`](https://github.com/amazon-science/earth-forecasting-transformer/blob/7732b03bdb366110563516c3502315deab4c2026/scripts/cuboid_transformer/sevir/train_cuboid_sevir.py). However, I was unable to reproduce the error...
Could you please try `torchmetrics==0.11.1`? It works correctly with `torch==1.12.1+cu116` and `pytorch_lightning==1.6.4` on my end.
This seems to be related to [`matplotlib`](https://stackoverflow.com/questions/52839758/matplotlib-and-runtimeerror-main-thread-is-not-in-main-loop).
Thank you very much for pointing it out! it's fixed in #51. https://github.com/amazon-science/earth-forecasting-transformer/blob/0303b37178940dd27acbcb619ffd9c381731a224/src/earthformer/cuboid_transformer/cuboid_transformer.py#L2365-L2369
Thank you for reporting this issue. The compatibility between different versions of PyTorch Lightning (PL) can be troublesome, even between minor version changes. There is a straightforward solution that avoids...