From df8c77c642b83e396160ef67044968d5267065ce Mon Sep 17 00:00:00 2001 From: "Adam M. Krajewski" <54290107+amkrajewski@users.noreply.github.com> Date: Thu, 28 Mar 2024 12:58:03 -0400 Subject: [PATCH] (MA) added assertions that data to operate on is available before tuning --- pysipfenn/core/modelAdjusters.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pysipfenn/core/modelAdjusters.py b/pysipfenn/core/modelAdjusters.py index f830ebb..9bc868c 100644 --- a/pysipfenn/core/modelAdjusters.py +++ b/pysipfenn/core/modelAdjusters.py @@ -245,6 +245,10 @@ def adjust( if verbose: print("Loading the data...") + assert len(self.descriptorData) != 0, "The descriptor data must not be empty for the adjustment process." + assert len(self.targetData) != 0, "The target data must not be empty for the adjustment process." + assert len(self.descriptorData) == len(self.targetData), "The descriptor and target data must have the same length." + ddTensor = torch.from_numpy(self.descriptorData).float().to(device=self.device) tdTensor = torch.from_numpy(self.targetData).float().to(device=self.device) if validation > 0: