Skip to content

Commit

Permalink
force reload caps on plugin in case of changed lora
Browse files Browse the repository at this point in the history
  • Loading branch information
mitya52 committed Mar 21, 2024
1 parent 830c93b commit cb1d4ce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion refact_webgui/webgui/selfhost_fastapi_completions.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ def __init__(self,

@property
def _caps_version(self) -> int:
return self._model_assigner.config_inference_mtime()
cfg_active_lora_mtime = int(os.path.getmtime(env.CONFIG_ACTIVE_LORA)) if os.path.isfile(env.CONFIG_ACTIVE_LORA) else 0
return max(self._model_assigner.config_inference_mtime(), cfg_active_lora_mtime)

async def _account_from_bearer(self, authorization: str) -> str:
raise NotImplementedError()
Expand Down

0 comments on commit cb1d4ce

Please sign in to comment.