Skip to content

Commit

Permalink
Fixing PR review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
SachinVarghese committed Sep 2, 2021
1 parent 1282947 commit 6ba0aec
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 1 addition & 3 deletions components/seldon-request-logger/app/log_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,12 @@ def extract_request_id(headers):
request_id = headers.get(CLOUD_EVENT_ID)
return request_id

def build_index_name(headers, prefix = None, suffix = True, name_override = None):
def build_index_name(headers, prefix = "inference", suffix = True, name_override = None):
# use a fixed index name if user chooses to do so
index_name = os.getenv("INDEX_NAME")
if index_name:
return index_name

if prefix is None:
prefix = "inference"
# Adding seldon_environment (dev/test/staging/prod) to index_name if defined as a environment variable
seldon_environment = os.getenv("SELDON_ENVIRONMENT")
if seldon_environment:
Expand Down
2 changes: 0 additions & 2 deletions components/seldon-request-logger/app/log_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ def fetch_metadata(namespace, serving_engine, inferenceservice_name, predictor_n

if runtime_metadata is not None and runtime_metadata and \
runtime_metadata.runtime_metadata is not None and runtime_metadata.runtime_metadata:
# print(runtime_metadata.runtime_metadata)
if len(runtime_metadata.runtime_metadata) == 0:
print('no runtime metadata for '+namespace+'/'+inferenceservice_name)
return None
Expand All @@ -206,7 +205,6 @@ def fetch_metadata(namespace, serving_engine, inferenceservice_name, predictor_n
return None

print('prediction schema for '+namespace+'/'+inferenceservice_name)
# print(model_metadata.models[0].prediction_schema)
if model_metadata.models[0].prediction_schema:
return model_metadata.models[0].prediction_schema.to_dict()
else:
Expand Down

0 comments on commit 6ba0aec

Please sign in to comment.