1

I have a python script that is written in different files (one for importing, one for calculations, et cetera). These are all in the same folder, and when I need a function from another function I do something like

import file_import
file_import.do_something_usefull()

where, of course, in the file_import there is a function do_something_usefull() that, uhm, does something usefull. How can I accomplish the same in Azure?

Dan Ciborowski - MSFT
  • 6,807
  • 10
  • 53
  • 88
Mathias711
  • 6,568
  • 4
  • 41
  • 58
  • you must tell in which service you want to use it - AWS, Automation, etc.. – vincent Mar 08 '16 at 15:05
  • I have seriously no idea what you mean by that. It is the Machine Learning environment. Is that sufficient? – Mathias711 Mar 08 '16 at 15:07
  • Yes, I guess. Maybe you should explain more what you tried within Azure Machine Learning, and what issue you have encountered ? – vincent Mar 08 '16 at 15:21
  • I've got something like [this](http://imgur.com/HKdiB5u). I do not see an option to upload a python script or module to include it in there. – Mathias711 Mar 08 '16 at 15:24

2 Answers2

2

I found it out myself. It is documenten on Microsoft's site here.

The steps, very short, are:

  1. Include all the python you want in a .zip
  2. Upload that zip as a dataset
  3. Drag the dataset as the third option parameter in the 'execute python'-block (example below)

Example dragging zip to Python script

  1. execute said function by importing import Hello (the name of the file, not the zip) and running Hello.do_something_usefull()
Mathias711
  • 6,568
  • 4
  • 41
  • 58
1

As reference, there is a similiar answered thread you can refer to, please see Access Azure blog storage from within an Azure ML experiment.

Community
  • 1
  • 1
Peter Pan
  • 23,476
  • 4
  • 25
  • 43