Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate ElementType #4

Closed
guybuk opened this issue Jul 8, 2024 · 1 comment
Closed

Deprecate ElementType #4

guybuk opened this issue Jul 8, 2024 · 1 comment

Comments

@guybuk
Copy link
Owner

guybuk commented Jul 8, 2024

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.

@guybuk
Copy link
Owner Author

guybuk commented Aug 20, 2024

Closed with #12

@guybuk guybuk closed this as completed Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant