chore: rebase from template
Browse files- handler.py +0 -5
handler.py
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
import time
|
2 |
from typing import Dict, List, Any
|
3 |
import numpy as np
|
4 |
from concrete.ml.deployment import FHEModelServer
|
@@ -74,11 +73,7 @@ class EndpointHandler:
|
|
74 |
evaluation_keys = self.key_database[uid]
|
75 |
|
76 |
# Run CML prediction
|
77 |
-
duration = -time.time()
|
78 |
encrypted_prediction = self.fhemodel_server.run(encrypted_inputs, evaluation_keys)
|
79 |
-
duration += time.time()
|
80 |
-
|
81 |
-
print(f"Duration {duration=} seconds")
|
82 |
|
83 |
return to_json(encrypted_prediction)
|
84 |
|
|
|
|
|
1 |
from typing import Dict, List, Any
|
2 |
import numpy as np
|
3 |
from concrete.ml.deployment import FHEModelServer
|
|
|
73 |
evaluation_keys = self.key_database[uid]
|
74 |
|
75 |
# Run CML prediction
|
|
|
76 |
encrypted_prediction = self.fhemodel_server.run(encrypted_inputs, evaluation_keys)
|
|
|
|
|
|
|
77 |
|
78 |
return to_json(encrypted_prediction)
|
79 |
|