Releases: mathLab/PINA
Version 0.2.0
PINA v0.2 Release Note
Highlightns
We are thrilled to announce version 0.2 of the PINA library, a major release
that brings numerous enhancements and new features while maintaining compatibility with previous versions.
In this release, we have significantly improved integration with PyTorch Lightning by redesigning the data flow, resulting in faster and more reliable data management throughout the training and testing process. Additionally, we have integrated PyTorch Geometric into PINA, simplifying the definition, training, and testing of graph-based models.
A comprehensive description of the updates introduced in this version is provided in the following section.
New Features and Updates
Graph based modelling
Thanks to the integration with PyTorch Geometric, PINA now offers a user-friendly interface for defining graph objects and training graph-based models. Specifically, we introduce the Graph
class, an extension of torch_geometric.data.Data
, which enables the use of labeled tensors (LabelTensor
objects). Additionally, we provide two interfaces, KNNGraph
and RadiusGraph
, for constructing Graph
objects by automatically computing edges -and, optionally, edge features- in a simple and intuitive manner. For now, we also introduce an initial implementation of a Graph Neural Operator, which can be easily used by simply importing the class and configuring the parameters accordingly. We plan to expand the library with more models in future updates.
Data management: Introduction of PINADataModule
We introduce the PinaDataModule
class, an extension of lightning.pytorch.LightningDataModule
, which enhances the reliability and efficiency of data flow within PINA. The key advantages of this new component are:
- Automatic dataset splitting: By simply specifying the desired fractions for training, validation, and testing in the Trainer, PINA automatically handles dataset splitting and the creation of corresponding DataLoaders.
- Seamless integration with graph data: the redesigned pipeline natively supports different data types (e.g.,
torch.Tensor
andtorch_geometric.data.Data
) without requiring any modifications to the user's code. This is achieved through the definition of separate custom dataset classes, making the entire data-loading process fully transparent. - Modularity and scalability: compared to the previous release, we have significantly improved the performance of the data-loading process by implementing an efficient data transfer strategy to the GPU. This is particularly beneficial for Physics-Informed problems where the dataset fits entirely in GPU memory. Additionally, we have introduced support for more advanced features of the PyTorch DataLoader, such as memory pinning, further optimizing data handling and performance.
Parallel Training
Thanks to Lightning's capabilities, PINA now supports parallel training using advanced paradigms such as Data Distributed Parallelism (DDP) and Fully-Sharded Data Parallelism (FSDP). This is made possible by our redesigned data-loading pipeline, which efficiently distributes data across multiple GPUs and even across multiple nodes. Furthermore, we have tested PINA in HPC environments, assessing its full compatibility with resource management tools like SLURM.
Problem collection
Version 0.2 introduces a new module that includes a collection of common physical problems. This module serves two key purposes:
- It provides modular implementations of widely-used problems, allowing users to easily import these problem classes and adjust parameters as needed.
- It offers a valuable resource for users looking to create new, more complex problems in PINA style.
In future releases, we will extend this module with additional problems.
Documentation
Last but not least, we are also excited to present the new documentation! Thanks to the careful work of our contributors, PINA now offers an updated and well-structured documentation, making it easier for users to get started and navigate the library.
Conclusion
Thanks to this new release, PINA becomes an even more powerful tool for Physics-Informed and Scientific Machine Learning, with broad applications in both academic and industrial environments. With its user-friendly design and the ability to scale across computational resources, our library simplifies advanced modeling, making it more accessible than ever. PINA team sincerely thanks its community for the invaluable suggestions that made this release possible. We look forward to introducing more enhancements in the near future!
New Contributors
We thank all the new contributors!
- @FilippoOlivo made their first contribution in #344
- @MatteB03 made their first contribution in #463
v0.1.2.post2503
Monthly version 0.1.2.post2503
v0.1.2.post2501
Monthly version 0.1.2.post2501
v0.1.2.post2412
Monthly version 0.1.2.post2412
v0.1.2.post2411
Monthly version 0.1.2.post2411
v0.1.3
version 0.1.3
v0.1.2.post2410
Monthly version 0.1.2.post2410
v0.1.2
Version 0.1.2
v0.1.1.post2407
Monthly version 0.1.1.post2407
v0.1.1.post2406
Monthly version 0.1.1.post2406