mirror of
https://github.com/fauxpilot/fauxpilot.git
synced 2025-07-06 21:11:53 -07:00
Use os.path.join to get the model name in case the org_name is empty (#222)
This commit is contained in:
parent
788edd44f2
commit
65cdc13897
1 changed files with 2 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
|||
import json
|
||||
import os
|
||||
|
||||
import torch
|
||||
import triton_python_backend_utils as pb_utils
|
||||
|
@ -25,7 +26,7 @@ class TritonPythonModel:
|
|||
def initialize(self, args):
|
||||
self.model_config = model_config = json.loads(args["model_config"])
|
||||
org_name = model_config["parameters"].get("org_name", {"string_value": "Salesforce"})["string_value"]
|
||||
model_name = org_name + "/" + model_config["parameters"]["model_name"]["string_value"]
|
||||
model_name = os.path.join(org_name, model_config["parameters"]["model_name"]["string_value"])
|
||||
|
||||
def get_bool(x):
|
||||
return model_config["parameters"][x]["string_value"].lower() in ["1", "true"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue