在两个azureml环境之间共享数据集

时间:2017-02-09 19:28:32

标签: python dataset jupyter azure-machine-learning-studio

一位朋友给我发了一个带有数据集的python3笔记本来验证他的笔记本。

但是当我尝试在我的azureml工作区上使用他的数据集时,我有一个错误,说数据集不存在

他给我发了他的数据集代码:

from azureml import Workspace

ws = Workspace(
    workspace_id='toto',
    authorization_token='titi',
    endpoint='https://studioapi.azureml.net'
)
ds = ws.datasets['mini.csv00']
frame = ds.to_dataframe()

frame

当我尝试使用它时,我有一个:

ndexError                                Traceback (most recent call last)
<ipython-input-7-5f41120e38e4> in <module>()
----> 1 ds = ws.datasets['mini.csv00']
      2 frame = ds.to_dataframe()
      3 
      4 frame

/home/nbuser/anaconda3_23/lib/python3.4/site-packages/azureml/__init__.py in __getitem__(self, index)
    461                     return self._create_dataset(dataset)
    462 
--> 463         raise IndexError('A data set named "{}" does not exist'.format(index))
    464 
    465     def add_from_dataframe(self, dataframe, data_type_id, name, description):

IndexError: A data set named "mini.csv00" does not exist

错误......

但是当我在我的计算机jupyter上尝试它时,它可以工作。 有什么想法吗?

谢谢和问候

1 个答案:

答案 0 :(得分:2)

我猜你在AzureML上使用Jupyter笔记本进行实验。在这种情况下,'mini.csv00'应该在workspace_id='toto'的实验中。

在名为toto的工作空间中创建一个新实验,并首先将数据集放入其中。然后使用“在新笔记本中打开”打开数据集。

enter image description here