Hello people :wave: I have a question regarding Be...
# ask-for-help
m
Hello people 👋 I have a question regarding BentoML - recently I have encountered a problem that I didn't have before. Following the quickstart guide when building & serving the service locally I get a log entry that is akin to this
DEBUG: Tracking Error: No cloud context default found
when I pass the
--debug
flag. Now the problem happens when I try to build/serve/containerize a service that I wrote I get almost the same but this time as an error
Error: [bentos] build failed: No cloud context default found
which bricks the CLI command, I can bypass this for serving by passing the
--development
flag but this doesn't feel like a proper solution because I can't containerize anything or use the full extent of the framework. Suggestions are appreciated 🙇
x
‌‌It looks like you are not logged into bentocloud, you need to execute
bentoml cloud login
to log in to bentocloud.
m
I was under the impression I did not need to login to bentocloud to use bentoml hence the quickstart guide working out of the box without doing
bentoml cloud login
- am I wrong in that assumption? 🙂
c
Hi @Martin, your understanding is correct, you shouldn’t need to login for running
serve
,
build
or
containerize
locally. Login is only needed for push/pull Bentos or managing/scaling deployments with BentoCloud.
@Frost Ming could you help look into this issue?
@Martin did you invoke any BentoCloud APIs in your service definition code? or is it just standard quickstart guide?
m
I don't believe I have - I have stored a model via the Model store & then loaded it with as a
BentoModel
- I've also done some depends - I can send minimal code that probably won't wor kbut can help get you the gist? 🙂 Also thank you for the help - it is very appreciated
c
yes it would be great if you can share some minimal code for us to troubleshoot! thank you!
m
This is my barebones service that I threw up - the models are fastai torch image learners that I have pre-trained with a separate repo & I'm just trying to do some local inference with some static images I have locally
The
Bentofile.yaml
is quite simple.
The requirements it is referencing are these - I don't have them pinned because I use
pipenv
for virtual environments so I rely on that for local testing & I dump them into the
requirements.txt
later on
f
It’s possible to call the cloud API when the model does not exist in the local model store, can you confirm that?
m
I commented out the class model references and it seems to have did the trick - thank you very much for the guidance 🙇 Is there any way to only use the local modelstore like a
local
flag somewhere because I am unsure how to get the bento in that case to package the model file? 🤔
c
I think this is due to a recent behavior we introduced: If a referenced model is not found in the local model store, BentoML tries to pull the model information from BentoCloud @Martin for your use case, simply make sure the model exist in the local model store should work! @Frost Ming we probably want to avoid showing the login / cloud context error in this case?
f
To ensure the model exists in local store, simply change the
BentoModel()
to
bentoml.models.get()
, although there will be a warning message since we don’t recommending doing so