You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey I was trying to use your openscoring-python library to score a simple PMML model infact the exact same model that you have developed in sklearn2pmml library (DecisionTreeIris.pmml). The final aim is to develop a PMML model in R and score it in python using your openscoring library. When I run the code its giving a error in the os.deploy line - No Json Object could be decoded
Could you please help on what is going on here? Thanks !! (Below is the attached code and I am using Jupytr notebook !)
import pandas
result = os.evaluate("Iris", arguments)
print(result)
The text was updated successfully, but these errors were encountered:
vruusmann
changed the title
Hey I was trying to use your openscoring-python library to score a simple PMML model infact the exact same model that you have developed in sklearn2pmml library (DecisionTreeIris.pmml). The next step would be to develop a PMML in R and score it in python using your openscoring library. When I run the code its giving a error in the os.deploy line - No Json Object could be decoded. Could you please help on what is going on here? Thanks !! (Below is the attached code)
The Openscoring.deploy method throws exception "No Json Object could be decoded"
Oct 7, 2017
Hey I was trying to use your openscoring-python library to score a simple PMML model infact the exact same model that you have developed in sklearn2pmml library (DecisionTreeIris.pmml). The final aim is to develop a PMML model in R and score it in python using your openscoring library. When I run the code its giving a error in the os.deploy line - No Json Object could be decoded
Could you please help on what is going on here? Thanks !! (Below is the attached code and I am using Jupytr notebook !)
import pandas
path='/projects/wakari/MT_SNAP_Eligibility/SNAP_Generic_Modules/Module_6_Generic_PMML_Creation/'
iris_df = pandas.read_csv(path + 'iris.csv',header=0)
from sklearn2pmml import PMMLPipeline
from sklearn.tree import DecisionTreeClassifier
iris_pipeline = PMMLPipeline([
("classifier", DecisionTreeClassifier())
])
iris_pipeline.fit(iris_df[iris_df.columns.difference(["Species"])], iris_df["Species"])
from sklearn2pmml import sklearn2pmml
sklearn2pmml(iris_pipeline, "DecisionTreeIris.pmml", with_repr = True)
import openscoring
os = openscoring.Openscoring("http://localhost:8080/openscoring")
kwargs = {"auth" : ("admin", "adminadmin")}
RUNS FINE TILL HERE
os.deploy("Iris", "DecisionTreeIris.pmml", **kwargs)
arguments = {
"Sepal_Length" : 5.1,
"Sepal_Width" : 3.5,
"Petal_Length" : 1.4,
"Petal_Width" : 0.2
}
result = os.evaluate("Iris", arguments)
print(result)
The text was updated successfully, but these errors were encountered: