Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

hi-ml-azure not specified in environment, but needed in azure_util.py #741

Open
1 task done
peterhessey opened this issue Jun 8, 2022 · 1 comment
Open
1 task done
Assignees
Labels
bug Something isn't working

Comments

@peterhessey
Copy link
Contributor

peterhessey commented Jun 8, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Bug summary

When importing any components from InnerEye/Azure/azure_util.py a ModuleNotFoundError is raised if one has not installed the hi-ml-azure package manually using pip.

Code for reproduction

Run in cmd line: 

python -c "from InnerEye.ML.photometric_normalization import PhotometricNormalization

Actual outcome

ModuleNotFoundError

Error messages

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/azureuser/git/InnerEye-DeepLearning/InnerEye/ML/photometric_normalization.py", line 13, in <module>
    from InnerEye.ML.config import PhotometricNormalizationMethod, SegmentationModelBase
  File "/home/azureuser/git/InnerEye-DeepLearning/InnerEye/ML/config.py", line 25, in <module>
    from InnerEye.ML.deep_learning_config import ModelCategory
  File "/home/azureuser/git/InnerEye-DeepLearning/InnerEye/ML/deep_learning_config.py", line 16, in <module>
    from InnerEye.Azure.azure_util import DEFAULT_CROSS_VALIDATION_SPLIT_INDEX, RUN_CONTEXT, is_offline_run_context
  File "/home/azureuser/git/InnerEye-DeepLearning/InnerEye/Azure/azure_util.py", line 16, in <module>
    from health_azure.utils import create_run_recovery_id, get_aml_run_from_run_id
ModuleNotFoundError: No module named 'health_azure'

Expected outcome

Successful import

System info

No response

AB#6103

@peterhessey peterhessey added the bug Something isn't working label Jun 8, 2022
@peterhessey peterhessey self-assigned this Jun 8, 2022
@kh296
Copy link
Collaborator

kh296 commented Jun 21, 2022

I think that the problem here is that the conda environment creation doesn't include setup of any of the packages that come with the InnerEye repository. With a suitable setup.py file, adding - -e . as the final pip dependency could be a solution.

On Mac, with the current setup.py, and in the InnerEye environment, the command:

pip install -e .

results in the error:

ERROR: Could not find a version that satisfies the requirement cucim==21.10.1 (from innereye==0.0.1) (from versions: none)
ERROR: No matching distribution found for cucim==21.10.1 (from innereye==0.0.1)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

2 participants