From 9a33313c813024edb2962f07de2b2a171d49ae99 Mon Sep 17 00:00:00 2001 From: PsicoThePato Date: Mon, 13 May 2024 08:39:57 +0000 Subject: [PATCH] fix: status code --- src/synthia/miner/BaseLLM.py | 3 ++- src/synthia/validator/_config.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/synthia/miner/BaseLLM.py b/src/synthia/miner/BaseLLM.py index d890592..c2d562b 100644 --- a/src/synthia/miner/BaseLLM.py +++ b/src/synthia/miner/BaseLLM.py @@ -42,7 +42,8 @@ def generate(self, prompt: str) -> dict[str, str]: try: message = self.prompt(prompt, self.get_context_prompt(self.max_tokens)) except Exception as e: - raise HTTPException(status_code=e.status_code, detail=str(e)) from e # type: ignore + status_code = getattr(e, 'status_code', 500) + raise HTTPException(status_code=status_code, detail=str(e)) from e match message: case None, explanation: diff --git a/src/synthia/validator/_config.py b/src/synthia/validator/_config.py index 11704fc..12041f2 100644 --- a/src/synthia/validator/_config.py +++ b/src/synthia/validator/_config.py @@ -12,7 +12,7 @@ class ValidatorSettings(BaseSettings): # == Scoring == # sleep time between each iteration # (we are aiming at 50 block subnet tempo, with 8 second block time) - iteration_interval: int = 800 + iteration_interval: int = 1600 max_allowed_weights: int = 420 # this is a global parameter of the maximum weights that a validator can set hf_uploader_ss58: str = "5EX6ixabe8fiWHySw4SYaJAkaHLKeqSJ3rv7so2FrLC2cfGV"