Skip to content

Commit d0f84fb

Browse files
Update vulnscan/genData.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent aaa258e commit d0f84fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vulnscan/genData.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def embeddings(self, embed_model: SentenceTransformer, texts: list[str], labels:
109109
batch_labels.append(torch.tensor(batch_lbls, dtype=torch.float32).unsqueeze(1))
110110

111111
# Offload if memory usage too high
112-
if psutil.virtual_memory().percent / 100 > self.cfg.RAM_THRESHOLD:
112+
if psutil.virtual_memory().percent > self.cfg.RAM_THRESHOLD:
113113
self.offload_embeddings(
114114
batch_embeddings=torch.cat(tensors=batch_embeddings, dim=0),
115115
batch_labels=torch.cat(batch_labels, dim=0),

0 commit comments

Comments
 (0)