Comments (1)
hi I think This seem to be an intentional feature of bentoml.
there is no way to check if mlflow model use gpu in bentoml
you can see the more detail in below link
https://github.com/bentoml/BentoML/blob/main/src/bentoml/_internal/frameworks/mlflow.py#L246
# https://github.com/bentoml/BentoML/blob/main/src/bentoml/_internal/frameworks/mlflow.py#L246
class MLflowPyfuncRunnable(bentoml.Runnable):
# The only case that multi-threading may not be supported is when user define a
# custom python_function MLflow model with pure python code, but there's no way
# of telling that from the MLflow model metadata. It should be a very rare case,
# because most custom python_function models are likely numpy code or model
# inference with pre/post-processing code.
SUPPORTED_RESOURCES = ("cpu", )
SUPPORTS_CPU_MULTI_THREADING = True
...
have you try this?
class TestSentenceBert(_sbert_runnable): # override
SUPPORTED_RESOURCES = ("gpu",) # <--- need to add "gpu" force to find gpu
SUPPORTS_CPU_MULTI_THREADING = True
def __init__(self):
super().__init__()
@bentoml.Runnable.method(batchable=True, batch_dim=0)
def predict(self, sentences: List[str]):
output = super().predict(sentences)
return output
from bentoml.
Related Issues (20)
- bug: bentoml batch not work HOT 1
- feature: add http api server's uvicorn option
- bug: bentoml serve error pynvml.nvml.NVMLError_DriverNotLoaded: Driver Not Loaded
- bug: i find paddle.py ,but i can't use it HOT 1
- bug: AttributeError: type object 'GrpcClient' has no attribute '_create_channel'
- bug: module 'socket' has no attribute 'AF_UNIX'
- bug: ‘bentoml containerize’ got a problem
- bug: module 'bentoml' has no attribute 'build' HOT 3
- bug: Can't connect to bentoml API using websocket
- Bug: 'bentoml containerize' doesn't include models in the image
- bug: Cannot use pydantic models with namedtuples
- bug: SSL does not work
- bug: bentoml.transformers.save_model doesn't work with WhisperFeatureExtractor
- minor bug: Swagger docs.json not correctly specified for list[PydanticModel] Output
- bug: pydantic/pathlib patching causes `LookupError: <ContextVar name='request_directory' at 0x172a18860>` HOT 1
- bug: ModuleNotFoundError: No module named 'bentoml.frameworks'
- bug: Cannot specify Numpy DType and Shape with Pydantic as deletion contains a bug.
- bug: Cannot install Development environment using pdm HOT 2
- feature: support bentoml.depends.from_url("http://already.deployed-bento.com:3000")
- feature: Make Adaptative Batching algorithm customizable
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bentoml.