Search code examples
razure-machine-learning-service

conda dependencies file r model in azure machine learning


I understand what the entry script/scoring script is and does. See here as an example. As I struggle to expose my deployed model via code as described here (see also here), I am trying to use the UI ml.azure.com instead. I am a bit puzzled by the mandatory dependency: conda dependencies file:

enter image description here

I have an R model but clearly this is a Python thing. What shall I use in this case?


Solution

  • conda is actually not just a Python thing, you might be thinking of pip?

    Conda is a package & environment manager for nearly any kind of package, provided that it has been uploaded to anaconda. So you can use anaconda (and conda environment files) for R projects.

    The trouble is that the azuremlsdk CRAN package is not hosted as an anaconda package, but is probably needed for the scoring service. Worth using a file like below to see what it works.

    If it doesn't work, then I agree that this UI needs to generalized to better support R model deployment scenarios.

    It is also possible to add the azuremlsdk CRAN package to anaconda, but that requires some extra work, but ideally you shouldn't have to require this much manual effort.

    environment.yml

    Here's an example conda dependencies file for R.

    name: scoring_environment
    channels:
      - defaults
    dependencies:
      - r-base=3.6.1
      - r-essentials=3.6.0
      # whatever other dependencies you have
      - r-tidyverse=1.2.1
      - r-caret=6.0_83