Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
shmisra opened this issue Sep 7, 2023 · 0 comments

Comments

@shmisra
Copy link

shmisra commented Sep 7, 2023

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?

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

No branches or pull requests

1 participant