apex icon indicating copy to clipboard operation
apex copied to clipboard

pipeline_parallel - ModuleNotFoundError: No module named 'amp_C'

Open MatthieuCed opened this issue 3 years ago • 19 comments

Hi,

I was using apex and everything worked well until this week when I get the following error:

---> 39 from apex import amp
---> 20 from . import transformer
----> 3 from apex.transformer import pipeline_parallel
----> 1 from apex.transformer.pipeline_parallel.schedules import get_forward_backward_func
----> 4 from apex.transformer.pipeline_parallel.utils import get_num_microbatches
---> 23 import amp_C

ModuleNotFoundError: No module named 'amp_C'

I saw this error occurs in other scenarios (https://github.com/NVIDIA/apex/issues/865), but not at the same place. Do you know how to solve it (PS: I'm running the code in Google colab). Thanks,

MatthieuCed avatar Nov 01 '21 14:11 MatthieuCed

I have the same issue in pipeline_parallels, same stack trace and everything

I am on the Python-only build of apex

jmusiel avatar Nov 01 '21 21:11 jmusiel

I have the same issue. The workaround that worked for me is to use the version prior to the last commit here: https://github.com/NVIDIA/apex/tree/3303b3e7174383312a3468ef390060c26e640cb1

As you can see on the commit history the pipeline_parallels was added on October 27th here: https://github.com/NVIDIA/apex/pull/1202 I don't know what the issue might be but I hope the woraround works for you aswell.

lunasara avatar Nov 02 '21 08:11 lunasara

I have the same issue. The workaround that worked for me is to use the version prior to the last commit here: https://github.com/NVIDIA/apex/tree/3303b3e7174383312a3468ef390060c26e640cb1

Yes this worked for me as well, thank you!

jmusiel avatar Nov 02 '21 22:11 jmusiel

I have the same issue. The workaround that worked for me is to use the version prior to the last commit here: https://github.com/NVIDIA/apex/tree/3303b3e7174383312a3468ef390060c26e640cb1

As you can see on the commit history the pipeline_parallels was added on October 27th here: #1202 I don't know what the issue might be but I hope the woraround works for you aswell.

How to use the prior version of apex? Are the install commands still below:

git clone https://github.com/NVIDIA/apex cd apex pip install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./

Haoqing-Wang avatar Nov 03 '21 16:11 Haoqing-Wang

How to use the prior version of apex? Are the install commands still below:

git clone https://github.com/NVIDIA/apex cd apex pip install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./

I didn't try it. In my case I simply added the apex directory to the system path using the commands below and it worked for me.

import sys
sys.path.append("/workspace/apex")

lunasara avatar Nov 04 '21 07:11 lunasara

Sorry for having been bothering you, I wrote a patch #1211. Could some of you try https://github.com/NVIDIA/apex/commit/25bfcb914796c7955956fc1e39839e7efed997d5 and let me know if the issue is solved or not?

crcrpar avatar Nov 10 '21 06:11 crcrpar

Sorry for having been bothering you, I wrote a patch #1211. Could some of you try 25bfcb9 and let me know if the issue is solved or not?

not solved for me

yt605155624 avatar Nov 12 '21 06:11 yt605155624

the problem doesn't seem to be solved yet

xhwengnthu avatar Jan 18 '22 07:01 xhwengnthu

Not solved for me either

eonglints avatar Feb 17 '22 14:02 eonglints

not solved either

PhdShi avatar Aug 19 '22 03:08 PhdShi

Not solved either

BraveSeeker avatar May 09 '23 12:05 BraveSeeker

To check if "amp_C" is really installed, add a print statement in setup.py arround the place that adding "amp_C" targets. I've seem sometimes using pip install ... command will NOT trigger these targets, and I have to use command in python setup.py install --cuda_ext like form.

Dixeran avatar Aug 01 '23 09:08 Dixeran

To check if "amp_C" is really installed, add a print statement in setup.py arround the place that adding "amp_C" targets. I've seem sometimes using pip install ... command will NOT trigger these targets, and I have to use command in python setup.py install --cuda_ext like form.

Really Awesome!

hitsz-qfy avatar Sep 01 '23 01:09 hitsz-qfy

How to use the prior version of apex? Are the install commands still below:

git clone https://github.com/NVIDIA/apex cd apex pip install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./

I didn't try it. In my case I simply added the apex directory to the system path using the commands below and it worked for me.

import sys
sys.path.append("/workspace/apex")

@lunasara, could explain what's "/workspace/apex"? thanks in advance!!

rocke2020 avatar Dec 06 '23 14:12 rocke2020

您好,     邮件已收到。

hitsz-qfy avatar Dec 06 '23 14:12 hitsz-qfy