Commit 9261c7f7 authored by Morgan Funtowicz's avatar Morgan Funtowicz
Browse files

Remove f-string device creation on PyTorch GPU pipelines.


Signed-off-by: default avatarMorgan Funtowicz <morgan@huggingface.co>
parent 91d33c79
......@@ -335,7 +335,7 @@ class Pipeline(_ScikitCompat):
self.tokenizer = tokenizer
self.modelcard = modelcard
self.framework = framework
self.device = device if framework == "tf" else torch.device("cpu" if device < 0 else f"cuda:{device}")
self.device = device if framework == "tf" else torch.device("cpu" if device < 0 else "cuda:{}".format(device))
self.binary_output = binary_output
self._args_parser = args_parser or DefaultArgumentHandler()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment