Due to legacy design, the ElementType is an enum with values that sort of, but not exactly, overlap with DataCategory. In practice, ElementTypes are only semantic:
In DualDatasets, we expect to have two image elements, but they need to have separate types to be distinguishable (e.g. ElementType == low_res or high_res in super-resolution). When we convert to PyTorch, if we don't do this, we'll have collisions (both low and high-res will be converted to the 'image' key)
In case of DisplayEngines, two element types with the same category can be displayed differently depending on context (e.g. source and target)
The go-to solution is to just use strings, but we're not fans of magic strings everywhere. Also, there's a need to synchronize between element types in datasets (e.g. 'image', 'class_label') and display engines, so we don't get 'image' vs 'img' or 'class_label' vs 'class' mismatches.
Due to legacy design, the ElementType is an enum with values that sort of, but not exactly, overlap with DataCategory. In practice, ElementTypes are only semantic:
The go-to solution is to just use strings, but we're not fans of magic strings everywhere. Also, there's a need to synchronize between element types in datasets (e.g. 'image', 'class_label') and display engines, so we don't get 'image' vs 'img' or 'class_label' vs 'class' mismatches.