Skip to content

Commit

Permalink
fix: fix path parsing and default in hybrid serving
Browse files Browse the repository at this point in the history
  • Loading branch information
fd0r committed Sep 22, 2023
1 parent dd16433 commit afd049a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions use_case_examples/hybrid_model/serve_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ def underscore_str_to_tuple(tup):
"--path-to-models",
dest="path_to_models",
type=Path,
default=FILE_FOLDER / Path("user_keys"),
default=FILE_FOLDER / Path("compiled_models"),
)
parser.add_argument(
"--path-to-keys",
dest="path_to_keys",
type=Path,
default=FILE_FOLDER / Path("compiled_models"),
default=FILE_FOLDER / Path("user_keys"),
)
args = parser.parse_args()
app = FastAPI(debug=False)
Expand All @@ -61,6 +61,8 @@ def underscore_str_to_tuple(tup):
# We build the following mapping:
# model_name -> module_name -> input_shape -> some information
for model_path in MODELS_PATH.iterdir(): # Model
if not model_path.is_dir():
continue
model_name = model_path.name
MODULES[model_name] = defaultdict(dict)
for module_path in model_path.iterdir(): # Module
Expand Down

0 comments on commit afd049a

Please sign in to comment.