Log if handler service is using default or custom functions implementation #114
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
Description of changes:
Currently, when there is no
model_fn
function implemented by the user (or when the handler service fails to load such implementation), the defaultload
function is being used to load the model.Because it's not clear from the logs when that default function is being used, this makes things difficult for users to debug when they were expecting their own implementations to be used.
E.g.: let's say I write a
inference.py
script with amodel_fn
. For some reason, this function is not being picked up by the handler service. This reason could be:model_fn
model_artifacts_v2.tar.gz
, but the root folder in this archive is namedmodel_artifacts
and notmodel_artifacts_v2
Because the default
load
function is being used in that case, the logs would display an error such as:Which make things confusing as the user thinks they need to set a env variable to fix the issue, whereas the problem is related to the custom implementation not being used.
This PR adds some logs to tell the user which implementation are being used for each function.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.