Skip to content

Commit

Permalink
Update to work with caikit 0.25.x
Browse files Browse the repository at this point in the history
Signed-off-by: markstur <[email protected]>
  • Loading branch information
markstur committed Dec 13, 2023
1 parent 9261035 commit 55eb697
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
6 changes: 2 additions & 4 deletions caikit_huggingface_demo/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def _get_module_models(model_manager=None) -> dict:
"""
if model_manager:
model_modules = {
k: v.module().metadata["module_id"]
k: v.model().MODULE_ID
for (k, v) in model_manager.loaded_models.items()
}
else:
Expand Down Expand Up @@ -146,9 +146,7 @@ def main() -> int:

if backend:
print("▶️ Starting the backend Caikit inference server...")
with RuntimeGRPCServer(
inference_service=inference_service, training_service=None
) as backend:
with RuntimeGRPCServer() as backend:
if frontend:
start_frontend(backend, inference_service) # and wait for termination
else:
Expand Down
4 changes: 2 additions & 2 deletions caikit_huggingface_demo/client/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ def get_frontend(
reflection_db = ProtoReflectionDescriptorDatabase(channel)
desc_pool = DescriptorPool(reflection_db)
services = [
x for x in reflection_db.get_services() if x.startswith("caikit.runtime.")
]
x for x in reflection_db.get_services() if x.startswith("caikit.runtime.") and not (
x.startswith("caikit.runtime.training") or x.startswith("caikit.runtime.training"))]
if len(services) != 1:
print(f"Error: Expected 1 caikit.runtime service, but found {len(services)}.")
service_name = services[0]
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
caikit[all]==0.10.1
caikit[all]==0.25.0
requests==2.31.0
Pillow==9.5.0
click==8.1.3
Expand Down

0 comments on commit 55eb697

Please sign in to comment.