Code Monkey home page Code Monkey logo

imdb_infer's Introduction

Imdb_infer

Imdb_infer is a nlp ai project for deploy to torch model server.

Project Articture

torchserve user guide

Repo

Before you create your model prediction API on torch server.you should prepare three files : imdb_handler,trained Model,Model handler. And run torch-model-archiver to packaging three files to "*.mar" file.Finally, put TorchServe in the .mar file and deploy it after registration! If you want to know more,please follow this link!

  • imdb_handler : use to handle data to model's input format for server recieved request. Need text process fun in text module

  • Trained Model : the model file for get request predictions.

  • Model handler : The maintain model compute arcticture.

Built with

  • pytorch
  • GCP Vertex api
  • torchserve

Getting started

Prerequisites

  • Trained model
  • Google cloud sdk(Vertex Ai service)
  • pytorch
  • Docker

Installation

  1. clone this repository

    git clone https://github.com/yinghao1019/imdb_infer.git
  2. Install Docker

  3. prepare google service account credentials

  4. Prepare your repo in Google cloud artifact registry.

  5. modified Environment variable in Dockerfile & put your credential in project

Usage

  1. Before create your model service,confirm you already have model instance file. If not,run this command to donwload

    python ./imdb_infer/downloads.py
  2. And then in order to deploy to Vertex Ai endpoint for serve predicition, Run command to build your custom container image.

    docker build -t="${your image name}" .
  3. Run your image and use curl to test server.

    docker run -d -p 8080:8080 -p 8081:8081 -p 8082:8082 ${your image name}
    curl http://localhost:8080/ping
  4. set up docker access artifact premisson and upload to cloud repo by following this documentation

Learn More

If you don't have trained model,you can click this project link to see how to training. Training model with Vertex Ai

Contact

Ying Hao [email protected] Project link : https://github.com/yinghao1019/imdb_prac

imdb_infer's People

Watchers

James Cloos avatar Howard Hung avatar

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.