hi-ml icon indicating copy to clipboard operation
hi-ml copied to clipboard

Missing argument in `elevate_this.py` during dev setup

Open peterhessey opened this issue 2 years ago • 0 comments

In the hi-ml dev docs an instruction is given to run python elevate_this.py --message='Hello World' --azureml in order to cache credentials. However this command fails to run with the following error:

Traceback (most recent call last):
  File "hi-ml-azure/src/health_azure/examples/elevate_this.py", line 39, in <module>
    main()
  File "hi-ml-azure/src/health_azure/examples/elevate_this.py", line 29, in main
    wait_for_completion_show_output=True)
  File "/home/phessey/miniconda3/envs/himl/lib/python3.7/site-packages/health_azure/himl.py", line 474, in submit_to_azure_if_needed
    output_datasets=cleaned_output_datasets
  File "/home/phessey/miniconda3/envs/himl/lib/python3.7/site-packages/health_azure/himl.py", line 146, in create_run_configuration
    raise ValueError("One of the two arguments 'aml_environment_name' or 'conda_environment_file' must be given.")

Attempting to add the argument conda_environment_file="hi-ml/environment.yml" to the submit_to_azure_if_needed() call on line 26 of elevate_this.py doesn't rectify the problem, giving the following error in 20_image_build.txt:

ERROR: Could not open requirements file: [Errno 2] No such file or directory: '/azureml-environment-setup/../hi-ml-azure/run_requirements.txt'

peterhessey avatar May 19 '22 10:05 peterhessey