question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error while using Apex

See original GitHub issue

Hi, I am trying to do mixed precision training, but I have countered a problem that seems to be related to the LayerNorm implementation of Apex. I have the following error msg while running the example (same error for my other code).

Traceback (most recent call last): File "run_lm_finetuning.py", line 648, in <module> main() File "run_lm_finetuning.py", line 529, in main model = BertForPreTraining.from_pretrained(args.bert_model) File "/home/chenyang/anaconda3/envs/pytorch10/lib/python3.6/site-packages/pytorch_pretrained_bert/modeling.py", line 506, in from_pretrained model = cls(config, *inputs, **kwargs) File "/home/chenyang/anaconda3/envs/pytorch10/lib/python3.6/site-packages/pytorch_pretrained_bert/modeling.py", line 689, in __init__ self.bert = BertModel(config) File "/home/chenyang/anaconda3/envs/pytorch10/lib/python3.6/site-packages/pytorch_pretrained_bert/modeling.py", line 600, in __init__ self.embeddings = BertEmbeddings(config) File "/home/chenyang/anaconda3/envs/pytorch10/lib/python3.6/site-packages/pytorch_pretrained_bert/modeling.py", line 183, in __init__ self.LayerNorm = BertLayerNorm(config.hidden_size, eps=1e-12) File "/home/chenyang/anaconda3/envs/pytorch10/lib/python3.6/site-packages/apex-0.1-py3.6.egg/apex/normalization/fused_layer_norm.py", line 126, in __init__ File "/home/chenyang/anaconda3/envs/pytorch10/lib/python3.6/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 994, in _gcd_import File "<frozen importlib._bootstrap>", line 971, in _find_and_load File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked ModuleNotFoundError: No module named 'fused_layer_norm_cuda'

I am wondering if it is related to the version of Apex, so may I know which Apex checkpoint you used.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
thomwolfcommented, Feb 6, 2019

Hi @chenyangh, You need to install apex with the C++ and CUDA extensions:

git clone https://github.com/NVIDIA/apex.git
cd apex
python setup.py install --cuda_ext --cpp_ext
0reactions
duxiecommented, Dec 13, 2019

@kbulutozler You can change pytorch docker image version to pytorch/pytorch:1.3-cuda10.1-cudnn7-devel

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix Apex Legends error codes - EA Help
If you run into error codes when playing Apex Legends, try a few of these fixes to get back into the game.
Read more >
Apex Errors: 9 Common Errors And How To Resolve Them
1. Attempt to de-reference a null object · 2. List has no rows for assignment to sObject · 3. List index out of...
Read more >
Help with display of error message - Salesforce Stack Exchange
On record creation and update, I need to check if this 'Account number' is present in another object (Background Check__c). If present, I...
Read more >
Returning Errors from an Apex Server-Side Controller
When your Apex controller code experiences an error, two things can happen. You can use a catch block and handle the error in...
Read more >
Errors in Salesforce - MST Solutions
Errors in Salesforce · 1. Since Apex runs on a multi-tenant platform, the Apex runtime engine strictly enforces limits to ensure code doesn't...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found