Skip to content

Commit

Permalink
fix: relax python version restrictions (#853)
Browse files Browse the repository at this point in the history
Co-authored-by: James Marsh <james.marsh@optalysys.com>
  • Loading branch information
andrei-stoian-zama and jdmarsh authored Sep 3, 2024
1 parent 945aead commit 040c308
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/concrete/ml/deployment/fhe_client_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def check_concrete_versions(zip_path: Path):
"""

with zipfile.ZipFile(zip_path) as zip_file:
is_mlir = "circuit.mlir" in zip_file.namelist()
with zip_file.open("versions.json", mode="r") as file:
versions = json.load(file)

Expand Down Expand Up @@ -91,14 +92,15 @@ def check_concrete_versions(zip_path: Path):
+ "\n".join(f"{error[0]}: {error[1]} != {error[2]}" for error in errors)
)

# Raise an error if the Python version do not match the one currently installed
if not versions["python"].startswith(
f"{sys.version_info.major}.{sys.version_info.minor}"
): # pragma: no cover
raise ValueError(
"Not the same Python version between the compiler and the server."
f"{versions['python']} != {sys.version_info.major}.{sys.version_info.minor}"
)
if not is_mlir:
# Raise an error if the Python version do not match the one currently installed
if not versions["python"].startswith(
f"{sys.version_info.major}.{sys.version_info.minor}"
): # pragma: no cover
raise ValueError(
"Not the same Python version between the compiler and the server."
f"{versions['python']} != {sys.version_info.major}.{sys.version_info.minor}"
)


class FHEModelServer:
Expand Down

0 comments on commit 040c308

Please sign in to comment.