Mathias711
Mathias711

Reputation: 6668

Is it possible to import python scripts in Azure?

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?

Upvotes: 1

Views: 1556

Answers (2)

Peter Pan
Peter Pan

Reputation: 24148

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

Upvotes: 1

Mathias711
Mathias711

Reputation: 6668

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()

Upvotes: 2

Related Questions