From 5cb4507d14ec7538d74204a0ed89a1e8938de6bb Mon Sep 17 00:00:00 2001 From: Vineet Bansal Date: Tue, 6 Aug 2024 11:25:36 -0400 Subject: [PATCH] failing as we should, instead of printing out an error --- src/osqp/nn/torch.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/osqp/nn/torch.py b/src/osqp/nn/torch.py index fda1dbc8..b3b48fbe 100644 --- a/src/osqp/nn/torch.py +++ b/src/osqp/nn/torch.py @@ -1,12 +1,9 @@ import numpy as np import scipy.sparse as spa -try: - import torch - from torch.nn import Module - from torch.autograd import Function -except ImportError as e: - print(f'Import Error: {e}') +import torch +from torch.nn import Module +from torch.autograd import Function from joblib import Parallel, delayed import multiprocessing