Lesson 1: Receiving Warning While Running Sample Code on Kaggle

Hi everybody,

I am using Kaggle to run the sample codes provided in the Practical Deep Learning course, however the run is not completed at all, and I get a warning message that a multi-threaded run cannot be executed due to compatibility issues.

Code I am trying to run:

from fastai.text.all import *

dls = TextDataLoaders.from_folder(untar_data(URLs.IMDB), valid=‘test’)
learn = text_classifier_learner(dls, AWD_LSTM, drop_mult=0.5, metrics=accuracy)
learn.fine_tune(4, 1e-2)

Warning message received on Kaggle:

/opt/conda/lib/python3.10/multiprocessing/popen_fork.py:66: RuntimeWarning: os.fork() was called. os.fork() is incompatible with multithreaded code, and JAX is multithreaded, so this will likely lead to a deadlock.
self.pid = os.fork()

And it takes ages for the code to run, if the run is completed at all.

I am really curious as to what the issue here is and how it can possibly be resolved.

Best,

BY

I ran that code in Kaggle (in this notebook) and did not get that warning. It took the T4 GPU 7 minutes to train 1 epoch, the P100 GPU 4 minutes and the CPU over 3 hours. How long was it taking your model to train?

1 Like

Hi Vbakshi – with your help I figured out what was wrong: I selected from the Accelerator menu the option GPU T4 x2, and now it runs much faster!

Thank you for your response.

Best,

BY

1 Like