You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.
_LazyInstances (allennlp's subclass of IterableDataset) returns 1 when the __len__ method is not overridden.
This, for example, causes a problem with SlantedTriangular which expects the length of the dataset in batches as constructor parameter if used programmatically.
It is baffling behavior to return 1 for the length. We should return None for the length when we don't know, and deal with the fallout wherever it happens.
@maksym-del If I did want to use SlantedTriangular while lazy=True in my DatasetReader, would I just manually set dataloader.batches_per_epoch in my config?
(not just asking to be annoying, I actually do want to use SlantedTriangular with a lazy reader).
_LazyInstances
(allennlp's subclass ofIterableDataset
) returns1
when the__len__
method is not overridden.This, for example, causes a problem with
SlantedTriangular
which expects the length of the dataset in batches as constructor parameter if used programmatically.See #4028 (comment) and #4028 (comment) for more context.
The text was updated successfully, but these errors were encountered: