From fa393ea4df9bb63e55267d13532e953c350de376 Mon Sep 17 00:00:00 2001 From: tazlin Date: Thu, 24 Aug 2023 07:08:17 -0400 Subject: [PATCH 1/2] fix: avoid transformers>=4.32.0 as it introduces a breaking change --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 6f97bb84..77f8a3d5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,6 +2,7 @@ torch # We have to place it here otherwise it installs the CPU version pydantic==1.10.12 horde_model_reference~=0.2.2 +transformers==4.30.2 hordelib==1.6.2 gradio pyyaml From 0d085d353744fe1ce3bdb163500e895fa272c5c4 Mon Sep 17 00:00:00 2001 From: tazlin Date: Thu, 24 Aug 2023 07:13:10 -0400 Subject: [PATCH 2/2] fix: `isinstance` instead of type compare (lint rule) --- worker/jobs/scribe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worker/jobs/scribe.py b/worker/jobs/scribe.py index 72646cf7..44537a51 100644 --- a/worker/jobs/scribe.py +++ b/worker/jobs/scribe.py @@ -70,7 +70,7 @@ def start_job(self): loop_retry += 1 time.sleep(3) continue - if type(gen_req.json()) is not dict: + if not isinstance(gen_req.json(), dict): logger.error( ( f"KAI instance {self.bridge_data.kai_url} API unexpected response on generate: {gen_req}. "