This message was deleted.
# ask-for-help
s
This message was deleted.
đź‘€ 1
l
That's strange, are you sure
MY_SERVICE
is set?
g
yep, also i’ve defined a fallback to make sure that in case it isn’t i’ll still have a value, but i get an exception for invalid naming and when i printed the svc_nane it was an empty string
also on the build i do see that the env var is passed correctly. it happens only when the application is starting
l
That's really strange. I'm going to reproduce this one. Thanks for reporting!
c
Hi @Gil Leibovitz, how do you print the service name in startup?
Note that although service name can be dynamic, the “Bento” name is taking from the Service name, upon the
bentoml build
time. So if you do
MY_SERVICE=abc bentoml build
, you will get a Bento named
abc
with a version attach to it.
May I ask what’s the use case for dynamic service name? There might be other ways to achieve it if you could share more
g
i was running some load tests to check different GPU types performance. so i ran the same application backed with different GPUs. in order to differentiate between each flavor, i wanted to give it a different service name so it’ll be reflected on prometheus \ grafana
@Chaoyu reg the service name, i’m a bit confused where it’s being determined. isnt it happening upon the Service class initialization?
Copy code
svc = bentoml.Service("name_determined_here", runners=[some runners])
also reg the build - if i won’t mention any service name upon bentoml build. how the service name is given to the bento?