1
0
Fork 0

apply lint

This commit is contained in:
Sean Sube 2023-02-14 19:01:14 -06:00
parent 8a2a9174ba
commit 4d0cd2e981
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
2 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -211,7 +211,11 @@ class DevicePoolExecutor:
# 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(