Skip to content

Commit

Permalink
[shortfin] Fix the f-string for python 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
AWoloszyn committed Nov 13, 2024
1 parent 903d3c1 commit 5b1576d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions shortfin/python/shortfin_apps/sd/components/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ def __repr__(self):
params = [
f" {key} : {value}" for key, value in self.inference_parameters.items()
]
# For python 3.11 since we can't have \ in the f"" expression.
new_line = "\n"
return (
f"ServiceManager("
f"\n INFERENCE DEVICES : \n"
Expand All @@ -193,9 +195,9 @@ def __repr__(self):
f" fibers per device : {self.fibers_per_device}\n"
f" program isolation mode : {self.prog_isolation}\n"
f"\n INFERENCE MODULES : \n"
f"{'\n'.join(modules)}\n"
f"{nl.join(modules)}\n"
f"\n INFERENCE PARAMETERS : \n"
f"{'\n'.join(params)}\n"
f"{nl.join(params)}\n"
f")"
)

Expand Down

0 comments on commit 5b1576d

Please sign in to comment.