bentoml / BentoML

The easiest way to serve AI apps and models - Build Model Inference APIs, Job queues, LLM apps, Multi-model pipelines, and more!
https://bentoml.com
Apache License 2.0
7.17k stars 792 forks source link

Bentoml configuration file set but not working #1799

Closed vibss2397 closed 2 years ago

vibss2397 commented 3 years ago

Describe the bug Hi, I have tried setting the config file as environment variable to run bentoml but I am not sure if bentoml is reading from the config file. none of the commands for bentoml use the config i have set

To Reproduce

Steps to reproduce the issue:

  1. Download bentoml version 0.13.1
  2. set config.yml as:
    yatai:
    remote:
    url: <my remote url>:50051
  3. export $BENTOML_CONFIG=~/config.yml
  4. bentoml list / bentoml serve
  5. BENTOML_CONFIG=~/config.yml bentoml list / serve

Neither 4 nor 5 work

Expected behavior It should display the services present in my remote URL

Environment:

Additional context Am I missing something or is there anything extra that needs to happen?

vibss2397 commented 3 years ago

More importantly, is there a way to deploy lambda functions/ec2 instances directly from yatai-url without having to save it in a local directory first and then deploying it

dbuades commented 2 years ago

Same problem here, did you ever made the config work for you @vibss2397 ?

parano commented 2 years ago

Hi @dbuades are you trying to set up Yatai or setting other configurations?

dbuades commented 2 years ago

Hi @parano thanks for the quick answer! I just found the error, our config ends in .yaml and there is this line that checks that the file ends in .yml. We renamed our config from .yaml to .yml and it is now working as expected.

You could maybe change this line to also accept .yaml or I can open a small PR if you want.

parano commented 2 years ago

@dbuades thanks for looking into this, yes it should definitely accept .yaml extension as well, would be happy to accept a PR if you could make a fix.

vibss2397 commented 2 years ago

hi @dbuades, does step 4 or step 5 work for you? also which version are you using right now?

parano commented 2 years ago

@vibss2397 did you run into any issues applying configs? it should work in the latest 0.13.x versions

parano commented 2 years ago

Hi @parano thanks for the quick answer! I just found the error, our config ends in .yaml and there is this line that checks that the file ends in .yml. We renamed our config from .yaml to .yml and it is now working as expected.

You could maybe change this line to also accept .yaml or I can open a small PR if you want.

This issue has been fixed in the upcoming BentoML 1.0, where config file can use either .yml or yaml as its extension.

@vibss2397 the configuration for Yatai actually does not work in BentoML 0.13, you still need to specify --yatai-url argument when running Yatai related operations such as push/pull. However this will be changed in BentoML 1.0, where a global Yatai config is managed by BentoML, when user run bentoml yatai login command. BentoML 1.0 is around the corner and the new Yatai project will be released soon.

doxg commented 2 years ago

Greetings! I have been trying to set URL of bentoml service to certain url (to connect it with front-end). I have been facing same problem, I couldn't set configurations. @dbuades, in step 3, it says " export $BENTOML_CONFIG=~/config.yml ". Can you please describe how is it done? Windows terminal doesn't recognize neither export nor BENTOML_CONFIG commands. Any help would be appreciated. Best Regards, Dastan.