How to get files under Code tab in a job using AzureML python SDK

150 Views Asked by At

I'm trying to access the files/artifacts located in the code tab under an AzureML job. When using the azureml.core.run.Run class, the only methods suitable could be get_file_names() and download_files but they only list files under the Outputs + logs tab.

Is there a workaround to do this?

enter image description here

2

There are 2 best solutions below

0
On

From Designer we can export the code. For Automl we could see the image as show below. you can use the run.download_files.

enter image description here

0
On

The code tab should contain your working directory, with the main.py and so on. In your scripts you should be able to access the files normally with the path "./path/to/file/file.txt". If you have created an .amlignore, the files it contains will not be uploaded with the run command.