Giter Club home page Giter Club logo

ml-server-python-samples's Introduction

Microsoft Machine Learning Python Samples with ML Server

Discover more examples at Microsoft Machine Learning Server

In these examples, we will demonstrate how to develop and deploy end-to-end advanced analytics Python solutions with ]ML Server](https://docs.microsoft.com/en-us/machine-learning-server/what-is-machine-learning-server). The samples provided here are created in Python. Samples in R are available in the ML Server R Templates repository.

Although these samples have not been written for SQL Server ML Services, they can be deployed in the same manner as the R Templates that are provided in the repository linked above.

Available Samples

Category Sample Code Documentation
Basic Use a regression to predict wine quality with RevoscalePy Code
Basic Use a regression to predict wine quality with microsoftml Code
Basic Doing feature selection using mutual information Code
Basic Implementing binary classification Code
Basic Binary classification Notebook Documentation
Basic Implementing multi-class classification Code
Basic Working with categorical features Code
Basic Using formulas Code
Basic Using a loss function Code
Basic Working with input schemas Code
Basic Classifying images using image featurization Code
Basic Finding similar images using image featurization Code
Advanced Tuning model hyperparameters using a grid search Code
Advanced Implementing sentiment analysis Code
Advanced Implementing text featurization Code
Operationalization Deploy Python model as a web service Notebook Documentation
Operationalization Integrate a real-time web service into an application Notebook Documentation
Operationalization Consuming web services synchronously Notebook Documentation
Operationalization Consuming web services asynchronously Notebook Documentation

Contributing

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Legal Notices

Microsoft and any contributors grant you a license to the Microsoft documentation and other content in this repository under the Creative Commons Attribution 4.0 International Public License, see the LICENSE file, and grant you a license to any code in the repository under the MIT License, see the LICENSE-CODE file.

Microsoft, Windows, Microsoft Azure and/or other Microsoft products and services referenced in the documentation may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries. The licenses for this project do not grant you rights to use any Microsoft names, logos, or trademarks. Microsoft's general trademark guidelines can be found at http://go.microsoft.com/fwlink/?LinkID=254653.

Privacy information can be found at https://privacy.microsoft.com/en-us/

Microsoft and any contributors reserve all others rights, whether under their respective copyrights, patents, or trademarks, whether by implication, estoppel or otherwise.

ml-server-python-samples's People

Contributors

efratshabtai avatar j-martens avatar jeroenterheerdt avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar msftgits avatar sdgilley avatar sdpython avatar swells avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ml-server-python-samples's Issues

The Python service only return one char when call ml-server service

here is the code:

from azureml.deploy import DeployClient
from azureml.deploy.server import MLServer
import pandas as pd

HOST = 'http://MyML-ServerHost:12800'
context = ('admin', 'myPassword')
client = DeployClient(HOST, use=MLServer, auth=context)

def runHelloWorld(par1, par2):
listPars = ["HelloWorld",par1,par2]
resStr = ','.join(listPars)
return resStr

opts = {
'version': 'v1.0.0',
'description': 'Service description.',
'code_fn': runHelloWorld,
'inputs': {"par1": str,"par2":str},
'outputs': {"resStr": str},
'alias': 'runHelloWorld'
}

service = client.redeploy_service('runHelloWorld',**opts)

res = service.runHelloWorld("abc", "def")
answer = res.output('resStr')
print(res)
print(answer)

The real result is:

api: /api/runHelloWorld/v1.0.0 error: console_output: outputs: {'resStr': 'H'} raw_outputs: {'resStr': 'H'} artifacts: {} H

The expect result is:

HelloWorld,abc,def

The Question:

where is wrong with my python code??? why only return one char with this service??? please help me to see it, Thank you.

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.