Open manuelbrack opened 3 months ago
The current implementation of perplexity.compute does not allow to provide a specific coda device (e.g. cuda:1 instead of just cuda.
perplexity.compute
cuda:1
cuda
https://github.com/huggingface/evaluate/blob/8dfe05784099fb9af55b8e77793205a3b7c86465/metrics/perplexity/perplexity.py#L108
Should probably be changed to something along the lines of:
assert device in ["gpu", "cpu", "cuda"] or re.search(r'^cuda:[0-9]+$', device), "device should be either gpu or cpu."
The current implementation of
perplexity.compute
does not allow to provide a specific coda device (e.g.cuda:1
instead of justcuda
.https://github.com/huggingface/evaluate/blob/8dfe05784099fb9af55b8e77793205a3b7c86465/metrics/perplexity/perplexity.py#L108
Should probably be changed to something along the lines of: