Skip to content

danielsc/v2workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AzureML v2 CLI Workshop

Setup before the Workshop

  1. Have an AzureML workspace (or create one at: https://ml.azure.com/)
  2. Install VSCode (get it here: https://code.visualstudio.com/download)
  3. Install the AzureML VSCode Extension (get it here: https://marketplace.visualstudio.com/items?itemName=ms-toolsai.vscode-ai)
  4. Create a new Compute Instance (to make sure you have the latest changes already on the machine).
    Instructions are here -- no need to change any settings; leave everything to defaults.
  5. Once the compute instance has been created, click on the VSCode link

    That should take you to VSCode and log you in to your Compute Instance.
  6. Start a terminal with Terminal / New Terminal and type the following:
    Make sure conda is working
    conda init bash
    

    This will make the CLI output prettier
    az config set core.output=yamlc
    

    This will log your CI into Azure the identity you used to log into the CI
    az login --identity
    

    Test that you are properly logged in:
    az ml compute list -o table
    

    This should give you a list like this:
    Name       Compute type     State    Instance type
    ---------  ---------------  -------  ----------------
    danielsc4  computeinstance  Running  STANDARD_DS12_V2
    
  7. Clone this repo:
    git clone https://github.com/danielsc/v2workshop.git
    
  8. Open the v2workshop folder in VSCode
    image
    image
    This will reload the folder in VSCode
  9. Last, set your Python interpreter by hitting Shift-Ctrl-P (Windows) / Shift-Cmd-P (Mac) and then typing Python: Select Interpreter.


    Now select azureml_py310_sdkv2

    Then start a new Terminal and install Scikit-Learn, etc.
    pip install -r src/requirements.txt 
    

Troubleshooting

Also see reported issues here: https://github.com/danielsc/v2workshop/issues

  1. Cannot find resource group / workspace
    If az ml compute list
    gives you the error resource group could not be found
    Then you need to set your default subscription with

        az account set -s <subscription_id>
    
  2. When trying to Python: Select Interpreter no envrionments are show.
    In some cases, hitting the refresh button on the top right has helped.

  3. When az login --identity does not succeed
    In this case, you will need to log in to the compute instance via jupyter


About

Some Snippets for an AzureML v2 CLI Workshop

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published