Currently, get_dataset_splits() in our datasets is a static method (@staticmethod), but it would be more appropriate to have it marked as a class method (@classmethod).
The following example shows the difference between these two:
class A:
@staticmethod
def x():
A.y()
@staticmethod
def y():
print('Ay')
class B(A):
@staticmethod
def y():
print('By')
B.x() prints Ay
class A:
@classmethod
def x(cls):
cls.y()
@staticmethod
def y():
print('Ay')
class B(A):
@staticmethod
def y():
print('By')
B.x() prints By
In our datasets, x corresponds to get_dataset_splits and y corresponds to get_default_fields. The issue is that our current pattern doesn't support overriding get_default_fields by a subclass as can be seen in the example above (replace print with return fields), without overriding get_dataset_splits as well. We have this scenario in the SNLI dataset so this is the main reason why I'm opening this issue.
Currently,
get_dataset_splits()in our datasets is a static method (@staticmethod), but it would be more appropriate to have it marked as a class method (@classmethod).The following example shows the difference between these two:
B.x()printsAyB.x()printsByIn our datasets,
xcorresponds toget_dataset_splitsandycorresponds toget_default_fields. The issue is that our current pattern doesn't support overridingget_default_fieldsby a subclass as can be seen in the example above (replaceprintwithreturn fields), without overridingget_dataset_splitsas well. We have this scenario in the SNLI dataset so this is the main reason why I'm opening this issue.