Skip to content

Commit

Permalink
code formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
  • Loading branch information
alex-jw-brooks committed Jan 17, 2024
1 parent 40a24e0 commit dfba0af
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions examples/runtime/dump_protos.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
"""

# Standard
from inspect import signature
from pathlib import Path
from shutil import rmtree
import json
import os
import shutil
import sys
import tempfile
from inspect import signature

# Third Party
from common import PROTO_EXPORT_DIR, RUNTIME_CONFIG
Expand All @@ -45,11 +45,13 @@ def export_protos():
# grpc service dumper kwargs depend on the version of caikit we are using
grpc_service_dumper_kwargs = {
"output_dir": PROTO_EXPORT_DIR,
"write_modules_file": True
"write_modules_file": True,
}
# Only keep things in the signature, e.g., old versions don't take write_modules_file
expected_grpc_params = signature(dump_grpc_services).parameters
grpc_service_dumper_kwargs = {k:v for k, v in grpc_service_dumper_kwargs.items() if k in expected_grpc_params}
grpc_service_dumper_kwargs = {
k: v for k, v in grpc_service_dumper_kwargs.items() if k in expected_grpc_params
}
dump_grpc_services(**grpc_service_dumper_kwargs)
# Then export HTTP services...
dump_http_services(output_dir=PROTO_EXPORT_DIR)
Expand Down

0 comments on commit dfba0af

Please sign in to comment.