Condition Subset#

Utilities for handling condition dataset subsets.

class _ConditionSubset(condition, indices, automatic_batching)[source]#

Bases: object

Wrapper around a condition dataset restricted to a subset of indices.

The class behaves similarly to torch.utils.data.Subset and supports cyclic indexing together with optional automatic batching.

Initialization of the _ConditionSubset class.

Parameters:
  • condition (BaseCondition) – The underlying condition.

  • indices (list[int]) – The list of indices identifying the subset samples.

  • automatic_batching (bool) – Whether dataset items should be returned directly or as raw indices.

get_all_data()[source]#

Retrieve and aggregate all subset samples.

If the returned data contains a "data" field composed of graph objects, the samples are merged into a single batched graph structure using the appropriate batching implementation.

Returns:

The aggregated subset data.

Return type:

dict