Coder Social home page Coder Social logo

mlflow-redisai's Issues

Enable Redis connection parameters for mlflow cli deployment

Currently, the plugin supports

  • Hostname
  • Port
  • Username
  • Password
  • DB

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

Is this library still working or deprecated?

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']

Support PyTorch deployment

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

Problems connecting redisai container using mlflow-redisai library

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,

[FR] Compatibility with MLflow 2.0

Proposal Summary

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.

Motivation

  • What is the use case for this feature? Provide a richer, more extensible scoring protocol and broaden the deployment client prediction interface beyond dataframe inputs.
  • Why is this use case valuable to support for MLflow RedisAI Deployment plugin users in general? Necessary for compatibility for MLflow 2.0
  • Why is it currently difficult to achieve this use case? Without these changes, the mlflow-redisai plugin will break in MLflow 2.0.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.