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

Import error when launching run script #95

Open
ALaks96 opened this issue Feb 10, 2021 · 1 comment
Open

Import error when launching run script #95

ALaks96 opened this issue Feb 10, 2021 · 1 comment

Comments

@ALaks96
Copy link
Contributor

ALaks96 commented Feb 10, 2021

Describe the bug
Run is scheduled in Experiment in azure ML, docker builds image correctly, but when executing train.py script we get the following error:

  File "train.py", line 15, in <module>
    from arcus.ml.images import *
  File "/azureml-envs/azureml_c8679ff754035121fa7879f8b571ce9a/lib/python3.6/site-packages/arcus/ml/images/io.py", line 8, in <module>
    from cv2 import imread, imdecode, IMREAD_COLOR
  File "/azureml-envs/azureml_c8679ff754035121fa7879f8b571ce9a/lib/python3.6/site-packages/cv2/__init__.py", line 5, in <module>
    from .cv2 import *
ImportError: libGL.so.1: cannot open shared object file: No such file or directory

Seems as though a lib is to be added to the build.

To Reproduce
Run a default arcus training script with any train.py script

from arcus.azureml.environment.aml_environment import AzureMLEnvironment

work_env = AzureMLEnvironment.Create(config_file="../.azureml/config.json")

training_name = 'your_training_name'
trainer = work_env.start_experiment(training_name)
trainer.setup_training(training_name, overwrite=False)

dataset_name = 'your_dataset_name'

arguments = {
    '--epochs': 75,
    '--batch_size': 256,
    '--es_patience': 20,
    '--train_test_split_ratio': 0.08
}
trainer.start_training(training_name, estimator_type='tensorflow', 
                       input_datasets = [dataset_name], 
                       compute_target='your_instance', gpu_compute=True, script_parameters = arguments)

Expected behavior
Should launch training as if it were on local, but in the cloud within a run in an experiment.

@SamVanhoutte
Copy link
Contributor

This is related to the requirements.txt file that should be updated.
Things to do:

  • include the right cv dependency in the pip package of arcus
  • update the requirements.txt in the training resources

Working file :

pip==20.3.1
arcus-azureml>=1.1.2.2a2020061514
arcus-ml>=1.0.11.1
opencv-python==3.3.0.9
azureml-telemetry
azureml-widgets
tensorflow
azureml-dataprep
azureml-train
numpy
pandas
azureml-core
tqdm
joblib
scikit-learn
matplotlib
azureml-core
tqdm
scikit-learn
seaborn
scikit-image
inference-schema

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants