Skip to content

Commit

Permalink
apply lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Feb 15, 2023
1 parent 8a2a917 commit 4d0cd2e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion api/onnx_web/params.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from enum import IntEnum
from onnxruntime import SessionOptions
from typing import Any, Dict, Literal, Optional, Tuple, Union

from onnxruntime import SessionOptions


class SizeChart(IntEnum):
mini = 128 # small tile for very expensive models
Expand Down
6 changes: 5 additions & 1 deletion api/onnx_web/server/device_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,11 @@ def prune(self):
# self.jobs[:] = [job for job in self.jobs if not job.future.done()]
recent_count = len(self.recent)
if recent_count > self.recent_limit:
logger.debug("pruning %s of %s recent jobs", recent_count - self.recent_limit, recent_count)
logger.debug(
"pruning %s of %s recent jobs",
recent_count - self.recent_limit,
recent_count,
)
self.recent[:] = self.recent[-self.recent_limit :]

def submit(
Expand Down

0 comments on commit 4d0cd2e

Please sign in to comment.