Parallelize Python Tasks with Joblib

Поділитися
Вставка
  • Опубліковано 1 жов 2024
  • Today we learn how to parallelize Python tasks using joblib.
    ◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
    📚 Programming Books & Merch 📚
    🐍 The Python Bible Book: www.neuralnine...
    💻 The Algorithm Bible Book: www.neuralnine...
    👕 Programming Merch: www.neuralnine...
    🌐 Social Media & Contact 🌐
    📱 Website: www.neuralnine...
    📷 Instagram: / neuralnine
    🐦 Twitter: / neuralnine
    🤵 LinkedIn: / neuralnine
    📁 GitHub: github.com/Neu...
    🎙 Discord: / discord
    🎵 Outro Music From: www.bensound.com/

КОМЕНТАРІ • 39

  • @tomjohnson8986
    @tomjohnson8986 Рік тому +5

    Straight to the point and clear. Well done. No fluff.

  • @thomasgoodwin2648
    @thomasgoodwin2648 2 роки тому +8

    Careful of your benchmarking. The 1st time you run it single threaded, then after that all multi threaded. However, the 1st time you run it, it actually has to go out to the internet and actually download the images. Running after that is a bit of a cheat since it's likely that from then on, the images will be called up from cache rather than re-DLd.
    Just trying to make the point that when actually benchmarking, you need to average many runs, as initial conditions runs may not be indicative of 'normal' run times.
    It also illustrates a bit of the difficulty in benchmarking network programs.
    Many thanks as always. As usual you take "That's way above my brain limits' and transform it into 'Huh, So it's really just that easy.'

  • @JohnWalz97
    @JohnWalz97 2 роки тому +5

    You should always use 'time.perf_counter' instead of 'time.time()' when you're trying to benchmark code. It's way more accurate.

    • @user-wr4yl7tx3w
      @user-wr4yl7tx3w 2 роки тому +1

      I use %timeit. Is it better as well?

    • @JohnWalz97
      @JohnWalz97 2 роки тому

      @@user-wr4yl7tx3w I think so but not completely sure. Since it's designed for timing code I would assume so but don't quote me on that 😅

  • @bw2
    @bw2 2 роки тому +2

    well-timed video, multiprocessing module was giving me a hard time, I had to selectively scrape files (around 4K files each execution) I think this will be fantastic with HTTPX (drop-in replacement of requests module but with async support)

  • @hamzarashid7579
    @hamzarashid7579 2 роки тому +5

    You could use httpx instead of requests!

    • @alliedeena1141
      @alliedeena1141 2 роки тому

      is it better than requests module?

    • @kezif
      @kezif 2 місяці тому

      @@alliedeena1141depends on what you need

  • @joshuabardwell2294
    @joshuabardwell2294 5 місяців тому

    Why did your runtime change from n_jobs = 8 to -1?

  • @PatrickSteil
    @PatrickSteil 9 місяців тому

    That stupid easy.
    So does colors2 get returned with all the results from each run appended to a list?

  • @gustavobertocco554
    @gustavobertocco554 2 роки тому +2

    Awesome, this is exactly the type of pipeline I was looking for in order to integrate joblib :)

  • @mallikarjunrterdal
    @mallikarjunrterdal 9 місяців тому

    Multi processing with shared memory possible?

  • @splendorman7922
    @splendorman7922 2 роки тому +1

    any advantages over 'unsync' library?

  • @alexanderrubioanasco5352
    @alexanderrubioanasco5352 2 роки тому

    Thanks for share you aknowledge, i have a question,.
    how can i use parallelize if i am training a machine learning model? i use pyspark but, is parallelize better?

  • @giovannigaiardo
    @giovannigaiardo 2 роки тому

    I am enjoying this channel very much. Would anyone recommend a similar one but focused on JavaScript?

  • @unknown-cj8gv
    @unknown-cj8gv 2 роки тому

    You should be show only work and face except others things, this is thing reduce your efforts

  • @RidingWithGerdas
    @RidingWithGerdas Рік тому

    I am currently multithreading my web scraping project, opening multi browsers and clicking many things with Selenium. Would this improve anything in my case?

    • @HalfEatenMushroom
      @HalfEatenMushroom 9 місяців тому

      Hey, I know it's a year later but Joblib is pretty much just a wrapper for either multiprocessing or mumtithreading depending on your specified preference

  • @rahulkumarsingh1716
    @rahulkumarsingh1716 Рік тому

    With every videi , i learn something new! Good Job.

  • @west
    @west Рік тому

    Very useful overview, thank you!

  • @viniciusfriasaleite8016
    @viniciusfriasaleite8016 2 роки тому

    I want to apply parallel computing to the minimax algorithm I implemented on a connect 4 game. It looks like a really good improvement. Thanks for the content

  • @alejandrobravo1221
    @alejandrobravo1221 2 роки тому

    What font family are you using in pycharm?

  • @user-wr4yl7tx3w
    @user-wr4yl7tx3w 2 роки тому

    Is it faster than JAX pmap?

  • @NimaqAlizadeh
    @NimaqAlizadeh 2 роки тому

    👌👌🌹

  • @sarimbinwaseem
    @sarimbinwaseem 2 роки тому

    It is separating the input list and making function parallel..
    I want to speed up a function which is opening a xlsx file which take 22 seconds to open in openpyxl library.. Is thqt possible to speed up?

    • @SageBetko
      @SageBetko 2 роки тому

      Try the read- or write-only optimized modes in openpyxl.

    • @sarimbinwaseem
      @sarimbinwaseem 2 роки тому

      @@SageBetko Thanks.. I'll try.

  • @hopes3211
    @hopes3211 2 роки тому

    Excellent content and easily explained. Awesome 👍

  • @Y.Mahran
    @Y.Mahran 2 роки тому

    Great video.

  • @marcosoliveira8731
    @marcosoliveira8731 2 роки тому

    I´ve learned a great deal here. Thank you.

  • @mdabdullahalhasib2920
    @mdabdullahalhasib2920 Рік тому

    Awesome

  • @atom1833
    @atom1833 2 роки тому

    Intro is amazing

  • @shinrafahell
    @shinrafahell 2 роки тому

    Excellent video!

  • @user-wr4yl7tx3w
    @user-wr4yl7tx3w 2 роки тому

    Great video

  • @shuxiaokai
    @shuxiaokai 2 роки тому

    So cool 🥰🥰🥰

  • @mohammedel2035
    @mohammedel2035 2 роки тому

    Great value as always… Thanks a lot!

  • @joshdheda8776
    @joshdheda8776 Рік тому

    why use a stupid example?

  • @Blendershick
    @Blendershick 11 місяців тому

    Amazing thank you!