Open
Description
I have tried to implement this example using R:
https://github.com/Azure/azureml-examples/tree/main/cli/jobs/single-step/r/iris
When I run az ml job create -f job.yml --web
I get an error:
Warning message:
no DISPLAY variable so Tk is not available
[1] "data folder...\n"
[1] "/mnt/batch/tasks/shared/LS_root/jobs/main/azureml/4c5d2468-209c-4480-b444-cf0eefa0ce74/wd/iris_uri/iris.csv"
[1] "first 6 rows...\n"
Error in file(file, "rt") : cannot open the connection
Calls: read.csv -> read.table -> file
In addition: Warning message:
In file(file, "rt") :
cannot open file '/mnt/batch/tasks/shared/LS_root/jobs/main/azureml/4c5d2468-209c-4480-b444-cf0eefa0ce74/wd/iris_uri/iris.csv': Transport endpoint is not connected
Execution halted
[2022-02-15T15:02:42.032356] Command finished with return code 1
It can't open the file. The prblem is obviously in this line in train.R:
print("first 6 rows...\n")
iris <- read.csv(file_name)
print(head(iris))
I have left all files as they are in the example. So, the job,yml file is
$schema: https://azuremlschemas.azureedge.net/latest/commandJob.schema.json
command: >
Rscript train.R
--data_folder ${{inputs.iris}}
code:
local_path: src
inputs:
iris:
file: https://azuremlexamples.blob.core.windows.net/datasets/iris.csv
environment:
build:
local_path: docker-context
compute: azureml:cpu-cluster
display_name: r-iris-example
experiment_name: r-iris-example
description: Train an R model on the Iris dataset.
Here is full driver log:
2022/02/15 15:02:38 Didn't get JobInfoJson from env, now read from file
2022/02/15 15:02:38 Suceeded read JobInfoJson from file
2022/02/15 15:02:38 Starting App Insight Logger for task: runTaskLet
2022/02/15 15:02:38 Version: 3.0.01853.0004 Branch: .SourceBranch Commit: df26c27
2022/02/15 15:02:38 Attempt 1 of http call to http://10.0.0.5:16384/sendlogstoartifacts/info
2022/02/15 15:02:38 Send process info logs to master server succeeded
2022/02/15 15:02:38 Attempt 1 of http call to http://10.0.0.5:16384/sendlogstoartifacts/status
2022/02/15 15:02:38 Send process info logs to master server succeeded
[2022-02-15T15:02:38.626603] Entering context manager injector.
[2022-02-15T15:02:39.059276] context_manager_injector.py Command line Options: Namespace(inject=['ProjectPythonPath:context_managers.ProjectPythonPath', 'Dataset:context_managers.Datasets', 'RunHistory:context_managers.RunHistory', 'TrackUserError:context_managers.TrackUserError'], invocation=['Rscript train.R --data_folder /mnt/batch/tasks/shared/LS_root/jobs/main/azureml/4c5d2468-209c-4480-b444-cf0eefa0ce74/wd/iris_uri/iris.csv\n'])
Script type = COMMAND
[2022-02-15T15:02:39.063076] Command=Rscript train.R --data_folder /mnt/batch/tasks/shared/LS_root/jobs/main/azureml/4c5d2468-209c-4480-b444-cf0eefa0ce74/wd/iris_uri/iris.csv
[2022-02-15T15:02:39.063371] Entering Run History Context Manager.
/usr/local/lib/python3.6/dist-packages/azureml/history/_tracking.py:186: FutureWarning: MLflow support for Python 3.6 is deprecated and will be dropped in an upcoming release. At that point, existing Python 3.6 workflows that use MLflow will continue to work without modification, but Python 3.6 users will no longer get access to the latest MLflow features and bugfixes. We recommend that you upgrade to Python 3.7 or newer.
import mlflow
[2022-02-15T15:02:40.232090] Command Working Directory=/mnt/batch/tasks/shared/LS_root/jobs/main/azureml/4c5d2468-209c-4480-b444-cf0eefa0ce74/wd/azureml/4c5d2468-209c-4480-b444-cf0eefa0ce74
[2022-02-15T15:02:40.232307] Starting Linux command : Rscript train.R --data_folder /mnt/batch/tasks/shared/LS_root/jobs/main/azureml/4c5d2468-209c-4480-b444-cf0eefa0ce74/wd/iris_uri/iris.csv
Loading required package: tcltk
Attaching package: ‘tcltk2’
The following object is masked from ‘package:httr’:
config
Warning message:
no DISPLAY variable so Tk is not available
[1] "data folder...\n"
[1] "/mnt/batch/tasks/shared/LS_root/jobs/main/azureml/4c5d2468-209c-4480-b444-cf0eefa0ce74/wd/iris_uri/iris.csv"
[1] "first 6 rows...\n"
Error in file(file, "rt") : cannot open the connection
Calls: read.csv -> read.table -> file
In addition: Warning message:
In file(file, "rt") :
cannot open file '/mnt/batch/tasks/shared/LS_root/jobs/main/azureml/4c5d2468-209c-4480-b444-cf0eefa0ce74/wd/iris_uri/iris.csv': Transport endpoint is not connected
Execution halted
[2022-02-15T15:02:42.032356] Command finished with return code 1
[2022-02-15T15:02:42.033150] The experiment failed with exit code: 1. Finalizing run...
Cleaning up all outstanding Run operations, waiting 900.0 seconds
1 items cleaning up...
Cleanup took 0.05904269218444824 seconds
Traceback (most recent call last):
File "/mnt/batch/tasks/shared/LS_root/jobs/main/azureml/4c5d2468-209c-4480-b444-cf0eefa0ce74/wd/azureml/4c5d2468-209c-4480-b444-cf0eefa0ce74/azureml-setup/context_manager_injector.py", line 452, in <module>
execute_with_context(cm_objects, options.invocation)
File "/mnt/batch/tasks/shared/LS_root/jobs/main/azureml/4c5d2468-209c-4480-b444-cf0eefa0ce74/wd/azureml/4c5d2468-209c-4480-b444-cf0eefa0ce74/azureml-setup/context_manager_injector.py", line 236, in execute_with_context
process_return_code(signedReturnCode)
File "/mnt/batch/tasks/shared/LS_root/jobs/main/azureml/4c5d2468-209c-4480-b444-cf0eefa0ce74/wd/azureml/4c5d2468-209c-4480-b444-cf0eefa0ce74/azureml-setup/context_manager_injector.py", line 353, in process_return_code
sys.exit(returnCode)
SystemExit: 1
[2022-02-15T15:02:42.251457] Finished context manager injector with SystemExit exception.
2022/02/15 15:02:43 Skipping parsing control script error. Reason: Error json file doesn't exist. This most likely means that no errors were written to the file. File path: /mnt/batch/tasks/workitems/ca6cd200-9008-4897-bdad-caff210727fa/job-1/4c5d2468-209c-4480-b_ab601abc-3011-498f-bc7e-d4a897bd51bf/wd/runTaskLetTask_error.json
2022/02/15 15:02:43 Wrapper cmd failed with err: exit status 1
2022/02/15 15:02:43 Attempt 1 of http call to http://10.0.0.5:16384/sendlogstoartifacts/status
2022/02/15 15:02:43 Send process info logs to master server succeeded
2022/02/15 15:02:43 mpirun not found, trying job with default values: MPI publisher: open ; version:
2022/02/15 15:02:43 Not exporting to RunHistory as the exporter is either stopped or there is no data.
Stopped: false
OriginalData: 3
FilteredData: 0.
2022/02/15 15:02:43 Process Exiting with Code: 1
2022/02/15 15:02:43 All App Insights Logs was sent successfully or the close timeout of 10 was reached