Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
UltralyticsAssistant committed Jan 16, 2025
1 parent 519be04 commit a937abd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ pip install ultralytics-autoimport
Use the `lazy` context manager to defer imports:

```python
from autoimport import lazy
import time

from autoimport import lazy

with lazy():
t0 = time.perf_counter()
import torch

print(f"Initial import: {time.perf_counter() - t0:.3f}s") # Initial import: 0.000s

t1 = time.perf_counter()
Expand Down

0 comments on commit a937abd

Please sign in to comment.