locked
Getting Error in Jupyter Notebook from ML Studio: ValueError: workspace_id not provided and not available via config RRS feed

  • Question

  • Hi. I am taking the Intro to AI course and using Azure ML Studio and I am stuck. I am supposed to run selected the results data set in Python 3 and see it Jupyter Notebook. When I do so, I see the following code:

    from azureml import Workspace
    ws = Workspace()
    experiment = ws.experiments['475141dbfbb146d0838b835a446741df.f-id.6908c863e4f34dc0bfc49fec4905c17a']
    ds = experiment.get_intermediate_dataset(
        node_id='2cfddaa3-cf4e-43aa-bc09-63c68c674454-78',
        port_name='Results dataset',
        data_type_id='GenericCSV'
    )
    frame = ds.to_dataframe()

    When click the cell menu and select Run All, I get the following error:

    ValueError                                Traceback (most recent call last)
    <ipython-input-2-b90c3ba870af> in <module>()
          1 from azureml import Workspace
    ----> 2 ws = Workspace()
          3 experiment = ws.experiments['475141dbfbb146d0838b835a446741df.f-id.6908c863e4f34dc0bfc49fec4905c17a']
          4 ds = experiment.get_intermediate_dataset(
          5     node_id='2cfddaa3-cf4e-43aa-bc09-63c68c674454-78',

    /home/nbuser/anaconda3_23/lib/python3.4/site-packages/azureml/__init__.py in __init__(self, workspace_id, authorization_token, endpoint)
        883         endpoint = https://studio.azureml.net
        884         """
    --> 885         workspace_id, authorization_token, endpoint, management_endpoint = _get_workspace_info(workspace_id, authorization_token, endpoint, None)
        886
        887         _not_none_or_empty('workspace_id', workspace_id)

    /home/nbuser/anaconda3_23/lib/python3.4/site-packages/azureml/__init__.py in _get_workspace_info(workspace_id, authorization_token, endpoint, management_endpoint)
        849
        850         if workspace_id is None:
    --> 851             raise ValueError('workspace_id not provided and not available via config')
        852         if authorization_token is None:
        853             raise ValueError('authorization_token not provided and not available via config')

    ValueError: workspace_id not provided and not available via config

    Friday, September 14, 2018 8:06 PM

Answers

  • Hi,

    be sure to copy and paste in your Notebook the piece of code automatically generated by clicking in "Generate Data Access Code". You can find this button at the bottom of the Datasets screen, and also as an option in the output context menu of the modules in your canvas. Sometimes it might be necessary to connect the module whose output you are interested in, to a "Convert to CSV" module, and choose "Generate ..." from its output menu.

    Take a look to this link:

    Access datasets with Python using the Azure Machine Learning Python client library

    Let me know if you were able to solve it.

    • Marked as answer by rcpj Sunday, September 16, 2018 5:35 PM
    Saturday, September 15, 2018 8:32 PM

All replies

  • Hi,

    be sure to copy and paste in your Notebook the piece of code automatically generated by clicking in "Generate Data Access Code". You can find this button at the bottom of the Datasets screen, and also as an option in the output context menu of the modules in your canvas. Sometimes it might be necessary to connect the module whose output you are interested in, to a "Convert to CSV" module, and choose "Generate ..." from its output menu.

    Take a look to this link:

    Access datasets with Python using the Azure Machine Learning Python client library

    Let me know if you were able to solve it.

    • Marked as answer by rcpj Sunday, September 16, 2018 5:35 PM
    Saturday, September 15, 2018 8:32 PM
  • Hi,

    Yup. I actually found this solution in one of the threads I was reading and it did the trick. 

    Thanks for confirming it.

    Regards,

    rcpj

    Sunday, September 16, 2018 5:35 PM