{"id":18439441,"url":"https://github.com/idiap/inference-from-real-world-sparse-measurements","last_synced_at":"2025-04-15T03:46:44.389Z","repository":{"id":232582006,"uuid":"784596896","full_name":"idiap/inference-from-real-world-sparse-measurements","owner":"idiap","description":"Multi-Layer Self-Attention, a state-of-the-art model designed for wind nowcasting tasks","archived":false,"fork":false,"pushed_at":"2024-04-10T11:38:21.000Z","size":56,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-15T03:46:31.938Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/idiap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-04-10T06:57:09.000Z","updated_at":"2025-01-08T12:36:39.000Z","dependencies_parsed_at":"2024-04-10T12:50:06.151Z","dependency_job_id":null,"html_url":"https://github.com/idiap/inference-from-real-world-sparse-measurements","commit_stats":null,"previous_names":["idiap/inference-from-real-world-sparse-measurements"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idiap%2Finference-from-real-world-sparse-measurements","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idiap%2Finference-from-real-world-sparse-measurements/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idiap%2Finference-from-real-world-sparse-measurements/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idiap%2Finference-from-real-world-sparse-measurements/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/idiap","download_url":"https://codeload.github.com/idiap/inference-from-real-world-sparse-measurements/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249003941,"owners_count":21196794,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T06:24:47.325Z","updated_at":"2025-04-15T03:46:44.371Z","avatar_url":"https://github.com/idiap.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\nCopyright © \u003c2023\u003e Idiap Research Institute \u003ccontact@idiap.ch\u003e\n\nSPDX-FileContributor: Arnaud Pannatier \u003carnaud.pannatier@idiap.ch\u003e\n\nSPDX-License-Identifier: LGPL-3.0-only\n--\u003e\n\n\n# Inference from Real-World Sparse Measurements - MALAT\n\nThis code was developed as a part of the Innosuisse MALAT: Machine Learning for Air Traffic project, which is a partnership between SkySoft ATM and the Idiap Research Institute.\n\nMain research partner: Pr. François Fleuret (UNIGE)\n\nProject manager : Didier Berling (SkySoft ATM)\n\nAuthor: Arnaud Pannatier \u003carnaud.pannatier@idiap.ch\u003e (Idiap Research Institute).\n\nFor any questions/remarks about this work or this research, feel free to contact the author.\n\n\n## Project Overview\nThis project contains the implementation of the Multi-Layer Self-Attention, a state-of-the-art model designed for wind nowcasting tasks. The code in this repository corresponds to part T2.4 of the Innosuisse project (the second part of the wind nowcasting task) and is also related to the publication `Inference from Real-World Sparse Measurements` accepted at Transactions on Machine Learning Research (TMLR) available at: [https://openreview.net/forum?id=y9IDfODRns](https://openreview.net/forum?id=y9IDfODRns).\n\nThe Extrinsic Transformer is specifically tailored for wind nowcasting, focusing on the training and evaluation of the transformer model. In addition to the core model, this repository also includes code for training and evaluating the transformer, GEN (Graph Element Networks), CNP (Conditional Neural Processes), and various baseline models. These models are applied to different tasks, including wind nowcasting, Poisson equation task, and other baselines to compare and showcase the capabilities of the Extrinsic Transformer.\n\n![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge\u0026logo=python\u0026logoColor=ffdd54)\n![PyTorch](https://img.shields.io/badge/PyTorch-%23EE4C2C.svg?style=for-the-badge\u0026logo=PyTorch\u0026logoColor=white)\n![Matplotlib](https://img.shields.io/badge/Matplotlib-%23ffffff.svg?style=for-the-badge\u0026logo=Matplotlib\u0026logoColor=black)\n\n## Installation\n\nThe `environment.yml` contains all the required dependencies.\nYou should be able to create a working environment by running this command in the main folder.\n\n```\nconda env create -f environment.yml\n```\n\n## Usage\n\n```python\nimport torch\nfrom msa.modes.msa import MSA\n\nm = MSA(\n    dim_x = 3,\n    dim_yc = 2,\n    dim_yt = 2,\n    dim_h = 128,\n    nhead = 8,\n    nlayers = 4,\n    use_same_pos_enc=True,\n    dropout=0.0\n)\n\nxc,yc, xt = torch.randn(10,1000, 3), torch.randn(10, 1000, 2), torch.randn(10, 2000,3)\n\nyt = m(xc,yc,xt) # (10, 2000, 2)\n```\n\nThis repository is structured as follows:\n\n- `msa`: This package includes all the necessary models and dataset processing components, which will be installed automatically when the requirements are met.\n- `configs`: These are the Hydra configuration folders that contain all the essential parameters for running the experiments and the baseline models.\n- `scripts`: This folder serves as the entry point for training the model and conducting the experiments. Each file within the folder provides more detailed information in its respective docstring.\n\nModels can be used out of the box:\n\n\n\n### Configuration files\n\nThis repository uses Hydra for configuration management. The configuration files are located in the `configs` folder.\n\n### Training\n\nTo train the model, you can use the `train.py` script. The script will train the model using the configuration file specified in the `config` argument.\n\nto train msa on the wind nowcasting task, you can run the following command in the `scripts` folder:\n\n```bash\npython train.py\n```\n\nYou might need to download the data first.\n\nData can be automatically downloaded by running the following command in the `scripts` folder:\n\n```bash\npython -m msa.dataset.wind dataset.create=download\npython -m msa.dataset.wind dataset.create=default\n```\nThe data is available here: [https://www.idiap.ch/en/scientific-research/data/skysoft](https://www.idiap.ch/en/scientific-research/data/skysoft)\n\nFor the Poisson equation task, you can run the following command in the `scripts` folder:\n\n```bash\npython train.py dataset=poisson\n```\n\nyou might need to download the data first:\n\n```bash\npython -m msa.dataset.poisson dataset=poisson dataset.create=download\n```\n\n## Minimal GPU specs\nThis repository contains rather small models, running without problem in a few hours on modest GPUs (such as a few GTX 1080Tis).\n\n## License\n\nThis project is licensed under the terms of the LGPL-3.0-only license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidiap%2Finference-from-real-world-sparse-measurements","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidiap%2Finference-from-real-world-sparse-measurements","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidiap%2Finference-from-real-world-sparse-measurements/lists"}