Closed marmg closed 2 years ago
Type error raised when importing evaluate
Describe the bug when importing function zshot.evaluation
TypeError: 'type' object is not subscriptable
To Reproduce
import zshot.evaluation
Hi! Thank you for your comment.
Unfortunately, I'm unable to reproduce the error, when I do import zshot.evaluation
it works without any problem. Could you please provide information about the version of Zshot you are using?
Related StackOverflow post
It seems next typing fails with Python < 3.9:
def load_medmentions() -> DatasetDict[DatasetWithEntities]:
This is due to the class DatasetDict
of datasets
extending dict
. dict
is a type, and it's not subscriptable in Python<3.9 (for typing it's used Dict
, not dict
)
Summary
TypeError
raises when printing aDatasetWithEntities
.Describe the bug When printing, displaying or representing a
DatasetWithEntities
next error raises:To Reproduce
Expected behavior The result should print a summary of the
DatasetDict
with the splits, columns and number of rows per split.