Skip to content

Commit

Permalink
Complete conditional infinity import TODO
Browse files Browse the repository at this point in the history
- add logging
- change declaration order
  • Loading branch information
SecretiveShell authored Aug 31, 2024
1 parent 2171257 commit 43104e0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backends/infinity/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
from common.utils import unwrap

# Conditionally import infinity to sidestep its logger
# TODO: Make this prettier
has_infinity_emb: bool = False
try:
from infinity_emb import EngineArgs, AsyncEmbeddingEngine

has_infinity_emb = True
logger.debug("Successfully imported infinity.")
except ImportError:
has_infinity_emb = False
logger.debug("Failed to import infinity.")


class InfinityContainer:
Expand Down

0 comments on commit 43104e0

Please sign in to comment.