none
Deploying Web Service Using ML Studio RRS feed

  • Question

  • Hello,

    I would like to know if there is any possibility to have the same Web Service whenever I deploy a new model. This is because, for every delpoy, web service changes and connection to down stream application is breaking. If there is any option of deploying models without changing web service, please let me know.

    Thanks!
    Friday, September 27, 2019 2:31 PM

All replies

  • Hello,

    You can deploy or update a web service to use the new model. 

    To update your web services' .learner file you can try to the following steps with your web service. 

    1. Get the web service configuration using a powershell command and verify the details.

    Example:

    $wsd = Get-AzMlWebService -Name 'RetrainSamplePre.2016.8.17.0.3.51.237' -ResourceGroupName 'Default-MachineLearning-SouthCentralUS'

    2. Export the webservice details to modify the trained model with a new model.

    Example:

    Export-AzMlWebService -WebService $wsd -OutputFile "C:\temp\mlservice_export.json"

    3. Update the reference to the ilearner blob. Locate the "locationinfo" node with the URI of the ilearner blob and update it to the new file.

    "asset3": {
        "name": "Retrain Sample [trained model]",
        "type": "Resource",
        "locationInfo": {
          "uri": "https://mltestaccount.blob.core.windows.net/azuremlassetscontainer/baca7bca650f46218633552c0bcbba0e.ilearner"
        },
        "outputPorts": {
          "Results dataset": {
            "type": "Dataset"
          }
        }
      },

    4. Import the JSON to web service definition object 

    $wsd = Import-AzMlWebService -InputFile "C:\temp\mlservice_export.json"

    5. Update the web service

    Update-AzMlWebService -Name 'RetrainSamplePre.2016.8.17.0.3.51.237' -ResourceGroupName 'Default-MachineLearning-SouthCentralUS'-ServiceUpdates $wsd 

    All steps are also mentioned here for reference.

    Hope this helps!!

    -----------------------------------------------------------------------------------------------------------
    If you found this post helpful, please give it a "Helpful" vote. 
    Please remember to mark the replies as answers if they help. 

    Monday, September 30, 2019 8:45 AM
    Moderator