Isaac-Flath / fastblog

Apache License 2.0
5 stars 0 forks source link

Python Concurrency | Isaac’s Blog #5

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Python Concurrency | Isaac’s Blog

Python Concurrency for Data Science

https://isaac-flath.github.io/fastblog/fastcore/fastai/2021/04/01/PythonConcurrency.html

gudata commented 2 years ago

Thank you for the great article!

If you want to copy/paste the img_paths make sure to have more than 128 elements in img_paths.

img_paths = ['/Users/isaac.flath/.fastai/data/imagenette2-320/train/n03394916/ILSVRC2012_val_00046669.JPEG',
 '/Users/isaac.flath/.fastai/data/imagenette2-320/train/n03394916/n03394916_58454.JPEG',
 '/Users/isaac.flath/.fastai/data/imagenette2-320/train/n03394916/n03394916_32588.JPEG']

img_paths = img_paths * 1000

That way the #range will work

for i in range(int(len(img_paths)/128)):
   ...