Import Reader module or pass Azure storage queried values in Batch Execution (BES) with python for retraining

Rakesh R G 1 Reputation point
2021-02-02T06:37:11.417+00:00

Currently I have a machine learning model and I'm retraining it with Python BES code. I need to pass the input directly to the input parameters. It's accepting only CSV file (Or may be other files). I don't want to use any file. I have fetched the rows from database from python.

Is it possible to directly pass the queried values as input parameters?

I have read about the reader module but I cannot fine anything to use it with python BES code.

Any help is appreciated. Thanks

I have deployed the model through Azure machine learning studio (Classic) and Here is the code where the input payload is passed. I need to pass a python variable or the data returned from the storage table to this and not as CSV. Is it possible to achieve this?

    payload = {
        "Inputs": {
                "input1":
                {
                    "ConnectionString": connection_string,
                    "RelativeLocation": "/" + storage_container_name + "/filename.csv" # Replace this with the location you would like to use for your input file, and valid file extension (usually .csv)
                },
        },

        "Outputs": {
                "output2":
                {
                    "ConnectionString": connection_string,
                    "RelativeLocation": "/" + storage_container_name + "/filename.ilearner" # Replace this with the location you would like to use for your output file, and valid file extension (usually .csv for scoring results, or .ilearner for trained models)
                },
                "output1":
                {
                    "ConnectionString": connection_string,
                    "RelativeLocation": "/" + storage_container_name + "/filename.csv" # Replace this with the location you would like to use for your output file, and valid file extension (usually .csv for scoring results, or .ilearner for trained models)
                },
        },

    "GlobalParameters": {
    }
}
Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
2,690 questions
Azure Batch
Azure Batch
An Azure service that provides cloud-scale job scheduling and compute management.
320 questions
{count} votes

1 answer

Sort by: Most helpful
  1. romungi-MSFT 43,656 Reputation points Microsoft Employee
    2021-02-04T07:15:08.323+00:00

    BES is designed to be an asynchronous service that scores a batch of data records. The input for BES is like data input that Request-Response service(RRS) uses. So, having a file input will allow the web service to read data asynchronously and still be responsive. If your data is not huge you can use RRS for this web service and pass the data as string input.

    If this data is still huge and you would like to use BES you can try to use the option to import data using the Import data module and then create a predictive experiment and deploy it as a web service. A sample scenario is mentioned in the documentation for reference. I hope this helps!!

    0 comments No comments