qewton.data package¶
Module contents¶
Data Submodule¶
Integrates data sources and point samplers into the graph. It provides a standardized way to load and batch data as a source in the computation graph, ensuring that the data is correctly configured and compatible with the model’s expectations.
Key Components¶
DataNode: A specializedNodethat serves as a source of data in the graph. It can wrap various data sources, such as files, in-memory arrays, or synthetic data generators.DataSet: An abstraction for data containers. For example,NumpyDataSethandles NumPy arrays while ensuring they match a specificDataConfiguration.DataLoader: A specializedNodethat loads from a dataset. It handles batching, shuffling, and feeding data into the input ports of subsequent nodes.PointSampler: A node that generates points based on a specifiedGeometryand sampling strategy (e.g., uniform). This is particularly useful for physics-informed models that require collocation points. Samplers can be multiplied (sampler_a * sampler_b) to aProductSampler, whose output combines every point of one factor with every point of the other and keeps the geometry axes of both. For visualization, samplers can be switched to mesh mode (discretization_mode), where they output mesh vertices of their geometry, or be given a fixed reference geometry (active_discretization_mode), whose points they output instead of sampling.
Goals¶
Interface: Treat external data sources consistently, regardless of whether they originate from files or geometries.
Graph: Enable data loading to be a first-class citizen in the DAG, allowing for end-to-end pipelines from raw files to optimized models.
Metadata: Ensure that the
DataConfiguration(axes types, semantic meaning) is correctly associated with data from the moment it is loaded.
See DECISIONS.md for design decisions.
Subpackages¶
- qewton.data.data_processing package
- qewton.data.dataloaders package
- qewton.data.datasets package