Fix no-ml tests
@@ -7,13 +7,13 @@ from wandb import cli
from wandb import util
from wandb.apis import InternalApi
-import torch
import webbrowser
whaaaaat = util.vendor_import("whaaaaat")
from wandb.git_repo import GitRepo
from distutils.version import LooseVersion
-
+torch = util.get_module("torch")
+if torch:
if LooseVersion(torch.__version__) < LooseVersion("0.4"):
pytorch_tensor = torch.Tensor
OLD_PYTORCH = True
