emmi.datasets.ahmedml

Classes

AhmedMLStats

AhmedMLDefaultSplitIDs

AhmedMLDataset

Dataset implementation for AhmedML that supports both local and AISTORE storage.

Module Contents

class emmi.datasets.ahmedml.AhmedMLStats
raw_pos_min: tuple[float]
raw_pos_max: tuple[float] = (6.0,)
surface_pressure_mean: tuple[float]
surface_pressure_std: tuple[float] = (0.188242,)
surface_wallshearstress_mean: tuple[float, float, float]
surface_wallshearstress_std: tuple[float, float, float] = (0.00117512, 0.000652266, 0.000713125)
volume_totalpcoeff_mean: tuple[float] = (0.812013,)
volume_totalpcoeff_std: tuple[float] = (0.367992,)
volume_velocity_mean: tuple[float, float, float] = (0.8746, 1.42877e-05, 0.00776145)
volume_velocity_std: tuple[float, float, float] = (0.300305, 0.114927, 0.124698)
volume_vorticity_mean: tuple[float, float, float]
volume_vorticity_std: tuple[float, float, float] = (19.2822, 142.25, 129.528)
volume_vorticity_logscale_mean: tuple[float, float, float]
volume_vorticity_logscale_std: tuple[float, float, float] = (1.11017, 1.9653, 1.77495)
volume_vorticity_magnitude_mean: float = 55.2088
volume_vorticity_magnitude_std: float = 185.313
raw_pos_z_min: float = 0.0
class emmi.datasets.ahmedml.AhmedMLDefaultSplitIDs
train
val
test
static create_split(seed=42)

A helper function to create a random split of the dataset. The default indices were created with seed=42.

class emmi.datasets.ahmedml.AhmedMLDataset(split, root=None, ais_bucket_name=None, ais_endpoint='http://compute-permanent-node-179:8080', **kwargs)

Bases: ksuit.data.Dataset

Dataset implementation for AhmedML that supports both local and AISTORE storage.

Currently, supports the following properties: - position of car surface points and corresponding values for pressure and wall shear stress. - position of the volumetric cells with corresponding values for pressure, velocity and vorticity.

Parameters:
  • split (str) – Which split to use. “debug” will use all available “run_X” folders. “train”, “valid”, “test” will load the splits as specified in the “train_val_test_splits/{split}_design_ids.txt” file.

  • root (str | None) – path to the processed dataset, e.g. /nfs-gpu/simulation/data/ahmedml_processed/subsampled_10x.

  • ais_bucket_name (str | None) – The name of the ais bucket on oracle object storage, e.g. ‘emmi-ahmedml-subsampled-10x’.

  • ais_endpoint (str) – The endpoint (host) running the AISTORE instance.

Args: dataset_config_provider: Optional provider for dataset configuration. dataset_normalizers: A dictionary that contains normalization ComposePreProcess(ers) for each data type. The key for each normalizer can be used in the with_normalizers decorator.

is_using_ais
split
property default_split_ids: dict[str, list[int]]

Property to get the sorted split IDs for train, validation, and test sets, based on DEFAULT_SPLIT_*_IDS.

Return type:

dict[str, list[int]]

static get_normalization_stats()

Returns the normalization stats for the dataset. Exists for backwards compatibility with downstream repo, where collators use this.

Return type:

AhmedMLStats

getitem_surface_position_vtp(idx)

Retrieves surface positions (num_surface_points, 3)

Parameters:

idx (int)

Return type:

torch.Tensor

getitem_surface_position_stl(idx)

Retrieves surface positions (num_surface_points, 3)

Parameters:

idx (int)

Return type:

torch.Tensor

getitem_surface_position_stl_resampled100k(idx)

Retrieves surface positions (num_surface_points, 3)

Parameters:

idx (int)

Return type:

torch.Tensor

getitem_surface_pressure(idx)

Retrieves surface pressures (num_surface_points, 1)

Parameters:

idx (int)

Return type:

torch.Tensor

getitem_surface_wallshearstress(idx)

Retrieves surface wallshearstress (num_surface_points, 3)

Parameters:

idx (int)

Return type:

torch.Tensor

getitem_volume_position(idx)

Retrieves volume position (num_volume_points, 3)

Parameters:

idx (int)

Return type:

torch.Tensor

getitem_volume_totalpcoeff(idx)

Retrieves volume pressures (num_volume_points, 1)

Parameters:

idx (int)

Return type:

torch.Tensor

getitem_volume_velocity(idx)

Retrieves volume velocity (num_volume_points, 3)

Parameters:

idx (int)

Return type:

torch.Tensor

getitem_volume_vorticity(idx)

Retrieves volume vorticity (num_volume_points, 3)

Parameters:

idx (int)

Return type:

torch.Tensor

getitem_volume_distance_to_surface(idx)

Retrieves distance to surface of volume points (num_volume_points, 1)

Parameters:

idx (int)

Return type:

torch.Tensor