Skip to content

Commit 87ac706

Browse files
committed
benchmark_pytorch fix imports order resulting in crash
1 parent 55def2e commit 87ac706

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dlclive/benchmark_pytorch.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import csv
2-
import os
32
import platform
43
import subprocess
54
import sys
@@ -8,10 +7,11 @@
87
import colorcet as cc
98
import cv2
109
import h5py
11-
import numpy as np
12-
import torch
1310
from PIL import ImageColor
1411
from pip._internal.operations import freeze
12+
import torch
13+
# torch import needs to switch order with "from pip._internal.operations import freeze" because of crash
14+
# see https://github.com/pytorch/pytorch/issues/140914
1515

1616
from dlclive import DLCLive
1717
from dlclive.version import VERSION

0 commit comments

Comments
 (0)