mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-08 19:44:57 -05:00
chore: use consistent name of key_cache in config
This commit is contained in:
@@ -51,8 +51,8 @@ class Circuit:
|
||||
keyset_cache_directory = None
|
||||
if self.configuration.use_insecure_key_cache:
|
||||
assert_that(self.configuration.enable_unsafe_features)
|
||||
assert_that(self.configuration.insecure_keycache_location is not None)
|
||||
keyset_cache_directory = self.configuration.insecure_keycache_location
|
||||
assert_that(self.configuration.insecure_key_cache_location is not None)
|
||||
keyset_cache_directory = self.configuration.insecure_key_cache_location
|
||||
|
||||
self.client = Client(self.server.client_specs, keyset_cache_directory)
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ class Configuration:
|
||||
auto_parallelize: bool
|
||||
jit: bool
|
||||
p_error: float
|
||||
insecure_keycache_location: Optional[str]
|
||||
insecure_key_cache_location: Optional[str]
|
||||
|
||||
# pylint: enable=too-many-instance-attributes
|
||||
|
||||
@@ -47,7 +47,7 @@ class Configuration:
|
||||
"Virtual compilation is not allowed without enabling unsafe features"
|
||||
)
|
||||
|
||||
if self.use_insecure_key_cache and self.insecure_keycache_location is None:
|
||||
if self.use_insecure_key_cache and self.insecure_key_cache_location is None:
|
||||
raise RuntimeError(
|
||||
"Insecure key cache cannot be enabled without specifying its location"
|
||||
)
|
||||
@@ -63,7 +63,7 @@ class Configuration:
|
||||
enable_unsafe_features: bool = False,
|
||||
virtual: bool = False,
|
||||
use_insecure_key_cache: bool = False,
|
||||
insecure_keycache_location: Optional[Union[Path, str]] = None,
|
||||
insecure_key_cache_location: Optional[Union[Path, str]] = None,
|
||||
loop_parallelize: bool = True,
|
||||
dataflow_parallelize: bool = False,
|
||||
auto_parallelize: bool = False,
|
||||
@@ -77,8 +77,8 @@ class Configuration:
|
||||
self.enable_unsafe_features = enable_unsafe_features
|
||||
self.virtual = virtual
|
||||
self.use_insecure_key_cache = use_insecure_key_cache
|
||||
self.insecure_keycache_location = (
|
||||
str(insecure_keycache_location) if insecure_keycache_location is not None else None
|
||||
self.insecure_key_cache_location = (
|
||||
str(insecure_key_cache_location) if insecure_key_cache_location is not None else None
|
||||
)
|
||||
self.loop_parallelize = loop_parallelize
|
||||
self.dataflow_parallelize = dataflow_parallelize
|
||||
|
||||
@@ -201,8 +201,8 @@ def test_client_server_api(helpers):
|
||||
client_specs = ClientSpecs.unserialize(serialized_client_specs)
|
||||
|
||||
clients = [
|
||||
Client(client_specs, configuration.insecure_keycache_location),
|
||||
Client.load(client_path, configuration.insecure_keycache_location),
|
||||
Client(client_specs, configuration.insecure_key_cache_location),
|
||||
Client.load(client_path, configuration.insecure_key_cache_location),
|
||||
]
|
||||
|
||||
for client in clients:
|
||||
|
||||
@@ -19,7 +19,7 @@ from concrete.numpy.compilation import Configuration
|
||||
{
|
||||
"enable_unsafe_features": True,
|
||||
"use_insecure_key_cache": True,
|
||||
"insecure_keycache_location": None,
|
||||
"insecure_key_cache_location": None,
|
||||
},
|
||||
RuntimeError,
|
||||
"Insecure key cache cannot be enabled without specifying its location",
|
||||
|
||||
@@ -110,7 +110,7 @@ class Helpers:
|
||||
dataflow_parallelize=False,
|
||||
auto_parallelize=False,
|
||||
jit=True,
|
||||
insecure_keycache_location=INSECURE_KEY_CACHE_LOCATION,
|
||||
insecure_key_cache_location=INSECURE_KEY_CACHE_LOCATION,
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user