Azure / MachineLearningNotebooks

Python notebooks with ML and deep learning examples with Azure Machine Learning Python SDK | Microsoft
https://docs.microsoft.com/azure/machine-learning/service/
MIT License
4.01k stars 2.49k forks source link

`import segment.val as validate # for end-of-epoch mAP` #1859

Open V4A001 opened 1 year ago

V4A001 commented 1 year ago

I get next errors on my run: run_config = ScriptRunConfig( source_directory=".",#Path(script_path).parent, script="./segment/train.py", #Path(script_path).name, arguments=script_args, compute_target=compute_target, environment=env, ) although my directory structure looks oké. I am not a super Python person: import segment.val as validate # for end-of-epoch mAP or do I miss a package in the requirements.txt. But cv2 is in it:

`# Base ---------------------------------------- matplotlib>=3.2.2 numpy>=1.18.5 opencv-python>=4.6.0 Pillow>=7.1.2 PyYAML>=5.3.1 requests>=2.23.0 scipy>=1.4.1 torch>=1.7.0 torchvision>=0.8.1 tqdm>=4.64.0 protobuf<=3.21.6

Logging -------------------------------------

tensorboard>=2.4.1

wandb

clearml

Plotting ------------------------------------

pandas>=1.1.4 seaborn>=0.11.0

Tracking .....................................

filterpy scikit-image

Export --------------------------------------

coremltools>=5.2 # CoreML export

onnx>=1.9.0 # ONNX export

onnx-simplifier>=0.4.1 # ONNX simplifier

nvidia-pyindex # TensorRT export

nvidia-tensorrt # TensorRT export

scikit-learn==0.19.2 # CoreML quantization

tensorflow>=2.4.1 # TFLite export (or tensorflow-cpu, tensorflow-aarch64)

tensorflowjs>=3.9.0 # TF.js export

openvino-dev # OpenVINO export

Extras --------------------------------------

ipython # interactive notebook psutil # system utilization thop>=0.1.1 # FLOPs computation

albumentations>=1.0.3

pycocotools>=2.0 # COCO mAP

roboflow`

Or do I miss a working directory?

image image

Traceback (most recent call last): File "train.py", line 44, in import segment.val as validate # for end-of-epoch mAP ModuleNotFoundError: No module named 'segment'

Traceback (most recent call last): File "segment/train.py", line 44, in import segment.val as validate # for end-of-epoch mAP File "/mnt/azureml/cr/j/038732ec4736416c9d3985f32d11572c/exe/wd/segment/val.py", line 41, in from models.common import DetectMultiBackend File "/mnt/azureml/cr/j/038732ec4736416c9d3985f32d11572c/exe/wd/models/common.py", line 14, in import cv2 File "/azureml-envs/azureml_37b427d4607dba96894af18d84031ec3/lib/python3.8/site-packages/cv2/init.py", line 181, in bootstrap() File "/azureml-envs/azureml_37b427d4607dba96894af18d84031ec3/lib/python3.8/site-packages/cv2/init.py", line 153, in bootstrap native_module = importlib.import_module("cv2") File "/azureml-envs/azureml_37b427d4607dba96894af18d84031ec3/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) ImportError: libGL.so.1: cannot open shared object file: No such file or directory