mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
Allow ray datasets to be used with trainer (#36699)
Co-authored-by: Marc Sun <57196510+SunMarc@users.noreply.github.com>
This commit is contained in:
parent
2256875a77
commit
da7d64f4ff
@ -762,6 +762,9 @@ def has_length(dataset):
|
||||
except TypeError:
|
||||
# TypeError: len() of unsized object
|
||||
return False
|
||||
except AttributeError:
|
||||
# Ray DataSets raises an AttributeError: https://github.com/ray-project/ray/blob/master/python/ray/data/dataset.py#L5616
|
||||
return False
|
||||
|
||||
|
||||
def denumpify_detensorize(metrics):
|
||||
|
Loading…
Reference in New Issue
Block a user