Giter Club home page Giter Club logo

ml-server-text-classification's Introduction

Text Classification

Classify text (such as news messages) into groups by subject.

Deploy to Azure on SQL Server

Deploy to Azure (SQL Server)

More samples and information

Discover more examples at Microsoft Machine Learning Server

For all documentation, visit the Text Classification website.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

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.

ml-server-text-classification's People

Contributors

jeroenterheerdt avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar msftgits avatar sdgilley avatar v-robwhi avatar

Stargazers

 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

ml-server-text-classification's Issues

Error: *** Exception: 'Exception of type 'System.OutOfMemoryException' was thrown.'

Use NewsSQLPy
GO
	exec [dbo].[train_model] @model_key = 'LR';

Msg 39004, Level 16, State 20, Line 52
A 'Python' script error occurred during execution of 'sp_execute_external_script' with HRESULT 0x80004004.
Msg 39019, Level 16, State 2, Line 52
An external script error occurred:

Error in execution. Check the output for more information.
Traceback (most recent call last):
File "", line 5, in
File "C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\ExtensibilityData\MSSQLSERVER01\2F2E0B6D-096B-4A5D-AFB9-8D8346BCB091\sqlindb.py", line 201, in transform
train_threads = 4)
File "C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\PYTHON_SERVICES\lib\site-packages\microsoftml\modules\logistic_regression.py", line 441, in rx_logistic_regression
compute_context=compute_context)
File "C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\PYTHON_SERVICES\lib\site-packages\microsoftml\modules\ensemble.py", line 170, in fit
return super().fit(**self.data_args)
File "C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\PYTHON_SERVICES\lib\site-packages\microsoftml\modules\base_learner.py", line 231, in fit
telemetry_info=telemetry_info)

Msg 39019, Level 16, State 2, Line 52
An external script error occurred:
File "C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\PYTHON_SERVICES\lib\site-packages\microsoftml\utils\entrypoints.py", line 150, in run
ret = tlc_bridge(maml_code=maml_code, analysis_type="RunGraph", **kargs)
File "C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\PYTHON_SERVICES\lib\site-packages\revoscalepy\utils\RxFunctionUtils.py", line 8, in wrapper
return func(*args,**kwds)
File "C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\PYTHON_SERVICES\lib\site-packages\microsoftml\utils\tlc_bridge.py", line 178, in tlc_bridge
obj["params"] = call_parameters
TypeError: 'str' object does not support item assignment

SqlSatelliteCall error: Error in execution. Check the output for more information.
STDOUT message(s) from external script:
Rows Read: 20, Total Rows Processed: 20, Total Chunk Time: 0.033 seconds
RxInSqlServer Compute Context:

connection_string: "Driver=SQL Server;Server=R90GTU6N;Database=NewsSQLPy;Trusted_Connection=true;"
num_tasks: 1
execution_timeout_seconds: 0
wait: True
console_output: False
auto_cleanup: True
packages_to_load: []
description: "sqlserver"
version: "1.0"
TlcBridge error: Error: *** Exception: 'Exception of type 'System.OutOfMemoryException' was thrown.'
Error in processing machine learning request.Traceback (most recent call last):
File "", line 2, in
File "C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\PYTHON_SERVICES\lib\site-packages\revoscalepy\computecontext\RxInSqlServer.py", line 643, in rx_sql_satellite_pool_call
exec(inputfile.read())
File "", line 29, in

STDOUT message(s) from external script:
File "C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\PYTHON_SERVICES\lib\site-packages\revoscalepy\computecontext\RxInSqlServer.py", line 838, in rx_remote_call
results = rx_resumeexecution(state_file = inputfile)
File "C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\PYTHON_SERVICES\lib\site-packages\revoscalepy\computecontext\RxInSqlServer.py", line 125, in rx_resumeexecution
return _state"function"
File "C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\PYTHON_SERVICES\lib\site-packages\revoscalepy\RxSerializable.py", line 358, in rx_native_call
ret = px_call(functionname, params)
RuntimeError: revoscalepy function failed.
====== R90GTU6N ( process 0 ) has started run at 2018-04-27 16:15:51 Eastern Daylight Time ======

Elapsed time to compute low/high values and/or factor levels: 1.076 secs.

Not adding a normalizer.
Beginning read for block: 1

STDOUT message(s) from external script:
Rows Read: 11296, Read Time: 0.182, Transform Time: 0
Beginning read for block: 2
Beginning read for block: 1
Rows Read: 11296, Read Time: 0.14, Transform Time: 0
Beginning read for block: 2
Elapsed time: 00:00:23.2983978
Error: *** Exception: 'Exception of type 'System.OutOfMemoryException' was thrown.'
Error in processing machine learning request.
TlcBridge function failed. Please see the console output for more information.

SqlSatelliteCall function failed. Please see the console output for more information.
Traceback (most recent call last):
File "C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\PYTHON_SERVICES\lib\site-packages\revoscalepy\computecontext\RxInSqlServer.py", line 587, in rx_sql_satellite_call
rx_native_call("SqlSatelliteCall", params)
File "C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\PYTHON_SERVICES\lib\site-packages\revoscalepy\RxSerializable.py", line 358, in rx_native_call

STDOUT message(s) from external script:
ret = px_call(functionname, params)
RuntimeError: revoscalepy function failed.

* Will Not Deploy *

Greetings.

I am trying to deploy this example, but keep receiving the following error:

"code": "InvalidTemplateDeployment",
"details": [
{
"code": "InvalidParameter",
"target": "imageReference",
"message": "The following list of images referenced from the deployment template are not found: Publisher: microsoft-ads, Offer: windows-data-science-vm, Sku: windows2016, Version: 03.25.19. Please refer to https://docs.microsoft.com/en-us/azure/virtual-machines/windows/cli-ps-findimage for instructions on finding available images."
}
],
"message": "The template deployment 'Microsoft.Template-20210513135625' is not valid according to the validation procedure. The tracking id is '7429020f-2a9b-4136-bed3-ff93372445e5'. See inner errors for details."
}

Can someone please assist or point me in the correct direction as to how to address this issue?

Thank you.

Parameter name: value' ... text classification Newsgroups20

Here's the output I'm getting:

RxInSqlServer Compute Context:

connection_string: "DRIVER=SQL Server;SERVER=localhost;DATABASE=TextClassification_Py;TRUSTED_CONNECTION=Yes"
num_tasks: 1
execution_timeout_seconds: 0
wait: True
console_output: False
auto_cleanup: True
packages_to_load: []
description: "sqlserver"
version: "1.0"

TlcBridge error: Error: *** Exception: 'Value cannot be null.

Parameter name: value'
Error in processing machine learning request.Traceback (most recent call last):
File "", line 2, in
File "C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\PYTHON_SERVICES\lib\site-packages\revoscalepy\computecontext\RxInSqlServer.py", line 462, in rx_sql_satellite_pool_call
exec(inputfile.read())
File "", line 29, in
File "C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\PYTHON_SERVICES\lib\site-packages\revoscalepy\computecontext\RxInSqlServer.py", line 871, in rx_remote_call
results = rx_resumeexecution(state_file = inputfile)
File "C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\PYTHON_SERVICES\lib\site-packages\revoscalepy\computecontext\RxInSqlServer.py", line 552, in rx_resumeexecution
return _state"function"
File "C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\PYTHON_SERVICES\lib...

Backend Qt5Agg is interactive backend. Turning interactive mode on.
TypeError("'str' object does not support item assignment",)
Stack trace:

File "c:\users\hmeneses\documents\ml-server-text-classification\python\textclassification.py", line 126, in
train_threads = 1

When I debugged this in Visual Studio I got the following as well:

RxInSqlServer Compute Context:

connection_string: "DRIVER=SQL Server;SERVER=localhost;DATABASE=TextClassification_Py;TRUSTED_CONNECTION=Yes"
num_tasks: 1
execution_timeout_seconds: 0
wait: True
console_output: False
auto_cleanup: True
packages_to_load: []
description: "sqlserver"
version: "1.0"

TlcBridge error: The file or directory 'work\sample-ds1.xdf' cannot be found.Traceback (most recent call last):
File "", line 2, in
File "C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\PYTHON_SERVICES\lib\site-packages\revoscalepy\computecontext\RxInSqlServer.py", line 462, in rx_sql_satellite_pool_call
exec(inputfile.read())
File "", line 29, in
File "C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\PYTHON_SERVICES\lib\site-packages\revoscalepy\computecontext\RxInSqlServer.py", line 871, in rx_remote_call
results = rx_resumeexecution(state_file = inputfile)
File "C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\PYTHON_SERVICES\lib\site-packages\revoscalepy\computecontext\RxInSqlServer.py", line 552, in rx_resumeexecution
return _state"function"
File "C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\PYTHON_SERVICES\lib\site-packages\revoscalepy\RxSerializable.py", line 29...

Unable to retrieve sqlServerArgs
TlcBridge error: Unable to retrieve sqlServerArgs
TlcBridge function failed. Please see the console output for more information.

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.