AzureML | FileNotFoundError When Running Script

NAIR, Jayanth 20 Reputation points
2023-07-11T18:59:09.0666667+00:00

Hello,

I am trying to run a script with AzureML and Ray on AML. My problem involves training several compute targets reading from a common data file. The dataset is part of my working directory locally and I have verified that it does get uploaded to the experiment workspace. I have also separately uploaded it using

def_blob_store = ws.get_default_datastore()
def_blob_store.upload_files(files = ['./data/Pendulum_example/enormous.zip'],
                       target_path = '.',
                       overwrite = True,
                       show_progress = True)

However, when I run my job, I get the following error. Not sure why, because it seems other yaml files from the same folder are being read.

FileNotFoundError: File not found: enormous.zip
Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
3,108 questions
{count} votes

Accepted answer
  1. romungi-MSFT 48,526 Reputation points Microsoft Employee
    2023-07-12T06:22:31.7866667+00:00

    @NAIR, Jayanth Looking at the reference for this method, it requires the absolute path of the file to be uploaded instead of relative path. Please see this page from reference. Try using the absolute path to check if it works as expected.

    Also, the note mentions that this method is deprecated and will no longer be supported. Recommend to use FileDatasetFactory.upload_directory instead.

    From the reference.

    fileslist[str] Required A list of absolute paths of files to upload.

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.