Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed May 10, 2024
1 parent 3ca03d3 commit ba2cbf2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/super_gradients/training/sg_trainer/sg_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import warnings
from copy import deepcopy
from typing import Union, Tuple, Mapping, Dict, Any, List, Optional
import concurrent.futures

import hydra
import numpy as np
Expand Down Expand Up @@ -115,12 +116,12 @@

logger = get_logger(__name__)


class PrefetchIterable:
def __init__(self, iterable):
self.iterable = iterable

def __iter__(self):
import concurrent.futures
executor = concurrent.futures.ThreadPoolExecutor(max_workers=1)

try:
Expand All @@ -141,6 +142,7 @@ def _prefetch():
finally:
executor.shutdown()


class Trainer:
"""
SuperGradient Model - Base Class for Sg Models
Expand Down

0 comments on commit ba2cbf2

Please sign in to comment.