DataModules¤
pdearena.data.datamodule
¤
PDEDataModule
¤
Bases: LightningDataModule
Defines the standard dataloading process for PDE data.
Does not support generalization to different parameterizations or time. Consider using pdearena.data.cond_datamodule.CondPDEDataModule for that.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
task |
str
|
The task to be solved. |
required |
data_dir |
str
|
The path to the data directory. |
required |
time_history |
int
|
The number of time steps in the past. |
required |
time_future |
int
|
The number of time steps in the future. |
required |
time_gap |
int
|
The number of time steps between the past and the future to be skipped. |
required |
pde |
dict
|
The PDE to be solved. |
required |
batch_size |
int
|
The batch size. |
required |
pin_memory |
bool
|
Whether to pin memory. |
required |
num_workers |
int
|
The number of workers. Make sure when using values greater than 1 on multi-GPU systems, the number of shards is divisible by the number of workers times number of GPUs. |
required |
train_limit_trajectories |
int
|
The number of trajectories to be used for training. This is from each shard. |
required |
valid_limit_trajectories |
int
|
The number of trajectories to be used for validation. This is from each shard. |
required |
test_limit_trajectories |
int
|
The number of trajectories to be used for testing. This is from each shard. |
required |
usegrid |
bool
|
Whether to use a grid. Defaults to False. |
False
|
Source code in pdearena/data/datamodule.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
pdearena.data.cond_datamodule
¤
CondPDEDataModule
¤
Bases: LightningDataModule
Definest the dataloading process for conditioned PDE data.
Supports generalization experiments.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
task |
str
|
Name of the task. |
required |
data_dir |
str
|
Path to the data directory. |
required |
pde |
dict
|
Dictionary containing the PDE class and its arguments. |
required |
batch_size |
int
|
Batch size. |
required |
pin_memory |
bool
|
Whether to pin memory. |
required |
num_workers |
int
|
Number of workers. |
required |
train_limit_trajectories |
int
|
Number of trajectories to use for training. |
required |
valid_limit_trajectories |
int
|
Number of trajectories to use for validation. |
required |
test_limit_trajectories |
int
|
Number of trajectories to use for testing. |
required |
eval_dts |
List[int]
|
List of timesteps to use for evaluation. Defaults to [1, 2, 4, 8, 16]. |
[1, 2, 4, 8, 16]
|
usegrid |
bool
|
Whether to use the grid. Defaults to False. |
False
|
Source code in pdearena/data/cond_datamodule.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
|