Skip to content

Trying to convert m4a to wav format using Python code from an AML pipeline. When run from an AML pipeline on a Compute Cluster it fails stating: ImportError: cannot import name 'FFProbe' from partially initialized module 'ffprobe' #23

@shmisra

Description

@shmisra

I have an issue - The below code works fine when run locally on a Compute Instance (NC6 GPU Series Compute).

#!/usr/bin/env python

from ffprobe import FFProbe
from pydub import AudioSegment

mp4a_version = AudioSegment.from_file("format_test.m4a", "m4a")
dst_name = "test.wav"

exprt_file = mp4a_version.export(dst_name, format='wav')**

When run on a AML pipeline on a Compute Cluster (NC6 series GPU series Compute), it throws an error stating -

ImportError: cannot import name 'FFProbe' from partially initialized module 'ffprobe' (most likely due to a circular import) (/opt/conda/envs/ptca/lib/python3.8/site-packages/ffprobe/init.py)

Please note that the pipeline runs on a curated environment with the following configuration -

Docker

This environment is an alias for

https://github.com/Azure/azureml-assets/tree/main/assets/training/general/environments/acpt-pytorch-1.13-cuda11.7

FROM mcr.microsoft.com/azureml/curated/acpt-pytorch-1.13-cuda11.7:latest

Install pip dependencies

COPY requirements.txt .
RUN pip install -r requirements.txt --no-cache-dir

requirements.txt

azureml-core
matplotlib
ffmpeg-python
pydub

The curated environment builds fine without errors, BUT, the pipeline still fails with - ImportError: cannot import name 'FFProbe' from partially initialized module 'ffprobe'

How to FIX this?
Any specific version of ffprobe we should PIN with this image "mcr.microsoft.com/azureml/curated/acpt-pytorch-1.13-cuda11.7:latest" ?
Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions