From 1e74a44f1805487c1bb7a6568410bc37bb2075bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Kardos?= Date: Tue, 10 Sep 2024 10:22:01 +0200 Subject: [PATCH 1/2] Limited CTMs to only use CPU at all times --- turftopic/models/ctm.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/turftopic/models/ctm.py b/turftopic/models/ctm.py index f3d6665..8781ac2 100644 --- a/turftopic/models/ctm.py +++ b/turftopic/models/ctm.py @@ -213,9 +213,7 @@ def fit( seed = self.random_state or random.randint(0, 10_000) torch.manual_seed(seed) pyro.set_rng_seed(seed) - device = torch.device( - "cuda:0" if torch.cuda.is_available() else "cpu" - ) + device = torch.device("cpu") pyro.clear_param_store() contextualized_size = embeddings.shape[1] if self.combined: From 31ddd32260769621e6944a6f2c069a4fb1fb6d67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Kardos?= Date: Tue, 10 Sep 2024 10:22:44 +0200 Subject: [PATCH 2/2] Version bump --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 16846e4..8dfa767 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ line-length=79 [tool.poetry] name = "turftopic" -version = "0.5.3" +version = "0.5.4" description = "Topic modeling with contextual representations from sentence transformers." authors = ["Márton Kardos "] license = "MIT"