Azure / MachineLearningNotebooks

Python notebooks with ML and deep learning examples with Azure Machine Learning Python SDK | Microsoft
https://docs.microsoft.com/azure/machine-learning/service/
MIT License
4.07k stars 2.52k forks source link

model.predict_proba is not working in scoring script for classification #1950

Open imhemantjangra4 opened 10 months ago

imhemantjangra4 commented 10 months ago

This is run function. But My output of test data is class only not probabilities. @input_schema('data', PandasParameterType(input_sample)) @output_schema(NumpyParameterType(output_sample)) def run(data): result=model.predict_proba(data) return result.tolist()

My deployement Function for reference deployment = ManagedOnlineDeployment( name=deployment_name, endpoint_name=online_endpoint_name, model=registered_model.id, instance_type="Standard_F4s_v2", instance_count=1, code_configuration=CodeConfiguration( code="./artifact_downloads/outputs", scoring_script="scoring_script.py", ), liveness_probe=ProbeSettings( failure_threshold=30, success_threshold=1, timeout=2, period=10, initial_delay=2000, ), readiness_probe=ProbeSettings( failure_threshold=10, success_threshold=1, timeout=10, period=10, initial_delay=2000, ), )