Fix Concrete ML compatibility issue and improve FHE service logging

- Update requirements.txt to make concrete-ml optional with clear comment
- Enhance FHE service warning message to include Python version info
- Remove concrete-ml from mandatory dependencies due to Python 3.13 incompatibility
- Maintain full functionality with TenSEAL provider as default

This resolves the 'Concrete ML not installed' warning by providing clear
information about the version compatibility issue while preserving all
FHE functionality through the TenSEAL provider.
This commit is contained in:
oib
2026-03-05 08:13:45 +01:00
parent 8e974bf0e2
commit 4be6f8d5d9
2 changed files with 5 additions and 3 deletions

View File

@@ -14,7 +14,7 @@ aiosqlite>=0.20.0
sqlmodel>=0.0.16
numpy>=1.26.0
tenseal
concrete-ml
# concrete-ml # Optional - requires Python <3.13, currently incompatible
# HTTP & Networking
httpx>=0.27.0

View File

@@ -210,8 +210,10 @@ class FHEService:
# Optional Concrete ML provider
try:
providers["concrete"] = ConcreteMLProvider()
except ImportError:
logging.warning("Concrete ML not installed; skipping Concrete provider")
except ImportError as e:
logging.warning("Concrete ML not installed; skipping Concrete provider. "
"Concrete ML requires Python <3.13. Current version: %s",
__import__('sys').version.split()[0])
self.providers = providers
self.default_provider = "tenseal"