-
Notifications
You must be signed in to change notification settings - Fork 985
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FileNotFoundError when using an s3 bucket as the model_dir with HuggingFace model server #3423
Labels
Comments
terrytangyuan
added a commit
to terrytangyuan/kserve
that referenced
this issue
Feb 9, 2024
… loaded. Fixes kserve#3423 Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
Thanks for the detailed report. I sent a fix in #3424. |
Thanks for the fix @terrytangyuan ! |
9 tasks
tjandy98
pushed a commit
to tjandy98/kserve
that referenced
this issue
Apr 10, 2024
… loaded. Fixes kserve#3423 (kserve#3424) Signed-off-by: Yuan Tang <terrytangyuan@gmail.com> Signed-off-by: tjandy98 <3953059+tjandy98@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
/kind bug
First of all, I'd like to say thank you for the work on KServe! It's been delightful so far playing around with KServe. But we found a small bug while testing out the HuggingFace model server (which we're aware is a very new addition as well).
What steps did you take and what happened:
model_dir
(I suspect this might happen for anything that's not a local dir)FileNotFoundError
right afterLogs:
What did you expect to happen:
I expected that this would work, as the model was successfully downloaded and loaded. But I did find a tmp workaround below and I think I know where the issue is!
What's the InferenceService yaml:
Anything else you would like to add:
A temporary workaround I found is to supply the
model_id
argument. It can have any value, as themodel_dir
will override it anyway during loading:kserve/python/huggingfaceserver/huggingfaceserver/model.py
Lines 91 to 94 in 5172dc8
I have verified that this workaround works (expand to see logs).
I think the issue is here:
kserve/python/huggingfaceserver/huggingfaceserver/__main__.py
Lines 63 to 72 in 5172dc8
model.load()
will succeed, so we jump to line 68args.model_id
, which is empty, so we go inside the if blockHuggingfaceModelRepository
withmodel_dir
, which is pointing to an s3 bucket and not a local directory, thus causing theFileNotFoundError
model_id
, so that the else block is executed instead (because the model did load succesfully, so doingkserve.ModelServer().start([model] if model.ready else [])
won't be a problem)Environment:
kubectl version
): v1.27.9-eks-5e0fdde/etc/os-release
): Ubuntu 22.04.3 LTSThe text was updated successfully, but these errors were encountered: