Although the doc-string does say how the ordering should be implemented, the information is quickly lost when implementing a subclass or while debugging the application. The following code contains "magic numbers" for example:
I would just a NamedTuple with the keys:
image_key, question, answer, and extra. Where extra may either be an iterable or an object. Though an iterable would require less changes:
I would favour the use of a NamedTuple for the
qa_data
rather than an index-based tupleClassificationVQADataset.py
.https://github.com/lhackel-tub/ConfigILM/blob/4d1890740c37aac6d918319f6df3e5159f9e18c2/configilm/extra/DataSets/ClassificationVQADataset.py#L163-L177
Although the doc-string does say how the ordering should be implemented, the information is quickly lost when implementing a subclass or while debugging the application. The following code contains "magic numbers" for example:
https://github.com/lhackel-tub/ConfigILM/blob/4d1890740c37aac6d918319f6df3e5159f9e18c2/configilm/extra/DataSets/ClassificationVQADataset.py#L208-L243
I would just a NamedTuple with the keys:
image_key
,question
,answer
, andextra
. Whereextra
may either be an iterable or an object. Though an iterable would require less changes:https://github.com/lhackel-tub/ConfigILM/blob/4d1890740c37aac6d918319f6df3e5159f9e18c2/configilm/extra/DataSets/ClassificationVQADataset.py#L240-L243