redisai / mlflow-redisai Goto Github PK
View Code? Open in Web Editor NEWRedisAI integration for MLFlow
Home Page: https://redisai.io
License: Apache License 2.0
RedisAI integration for MLFlow
Home Page: https://redisai.io
License: Apache License 2.0
Currently, the plugin supports
through the connection URI or through environmental variables. However, there are more options possible in the base client and we might need to support them for broader use cases
For me when running - mlflow deployments create -t redisai -m model-uri --name redis-key
is giving below error -
Traceback (most recent call last): File "/home/ubuntu/anaconda3/bin/mlflow", line 8, in <module> sys.exit(cli()) File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/click/core.py", line 764, in __call__ return self.main(*args, **kwargs) File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/mlflow/deployments/cli.py", line 145, in create_deployment deployment = client.create_deployment(name, model_uri, flavor, config=config_dict) File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/mlflow_redisai/__init__.py", line 122, in create_deployment flavor = get_preferred_deployment_flavor(model_config) File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/mlflow_redisai/utils.py", line 78, in get_preferred_deployment_flavor error_code=RESOURCE_DOES_NOT_EXIST) mlflow.exceptions.MlflowException: The specified model does not contain any of the supported flavors for deployment. The model contains the following flavors: dict_keys(['python_function']). Supported flavors: ['torchscript', 'tensorflow']
MLFlow currently doesn't support saving torchscript model which is required for implementing pytorch deployment on RedisAI through the plugin.
Development of pytorch support in MLFlow core can be tracked here mlflow/mlflow#2263
Hi,
I want to deploy a model with mlflow and jupyter to redisai. The specifics of my project is that I need mlflow, jupyter notebook, and redis in different docker containers.
This is the docker-compose file
version: '3'
services:
notebook:
image: jupyter/base-notebook
ports:
- "8888:8888"
depends_on:
- mlflow
- redisai
environment:
MLFLOW_TRACKING_URI: 'http://mlflow:5000'
REDISAI_TRACKING_URI: 'https://redisai:6379'
volumes:
- /home/jpardo/Documents/MLops/data/mlruns:/home/jovyan/mlruns
mlflow:
image: burakince/mlflow
expose:
- "5000"
ports:
- "5000:5000"
volumes:
- /home/jpardo/Documents/MLops/data/mlruns:/mlflow/mlruns
redisai:
image: redislabs/redisai
expose:
- "6379"
ports:
- "6379:6379"
I have installed inside de notebook container mlflow_redisai and mlflow libraries.
mlflow==2.10.2
mlflow-redisai==0.1.0
When inside the notebook container I run
from mlflow.deployments import get_deploy_client
REDISAI_TRACKING_URI = os.getenv("REDISAI_TRACKING_URI")
redisai = get_deploy_client(REDISAI_TRACKING_URI)
the error from the redisai container is
Possible SECURITY ATTACK detected. It looks like somebody is sending POST or Host: commands to Redis. This is likely due to an attacker attempting to use Cross Protocol Scripting to compromise your Redis instance. Connection aborted.
So the problem is, Why I cannot connect to the redisai container with the mlflow-redisai library? On the contrary I have no problems connecting the notebook container with the mlflow container.
Thanks for any help,
In MLflow 2.0 (scheduled for release on Nov. 14), we will be making small modifications to the MLflow Model Server's RESTful scoring protocol (documented here: https://output.circle-artifacts.com/output/job/bb07270e-1101-421c-901c-01e72bc7b6df/artifacts/0/docs/build/html/models.html#deploy-mlflow-models) and the MLflow Deployment Client predict()
API (documented here: https://output.circle-artifacts.com/output/job/bb07270e-1101-421c-901c-01e72bc7b6df/artifacts/0/docs/build/html/python_api/mlflow.deployments.html#mlflow.deployments.BaseDeploymentClient.predict).
For compatibility with MLflow 2.0, the mlflow-redisai
plugin will need to be updated to conform to the new scoring protocol and Deployment Client interface. The MLflow maintainers are happy to assist with this process, and we apologize for the short notice.
mlflow-redisai
plugin will break in MLflow 2.0.A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.