tsml-eval icon indicating copy to clipboard operation
tsml-eval copied to clipboard

Discussion on threading HC2 and components

Open TonyBagnall opened this issue 2 years ago • 1 comments

triggered by this https://github.com/sktime/sktime/issues/3788 its worthwhile discussing how we thread prior to proposing improvements.

HC2 seems to do each component sequentially with all the jobs (n_jobs converted in _threads_to_use in BaseClassifier) , in the order STC DrCIF Arsenal TDE

initial observations

  1. I'm not sure how hard it would be to put each component in its own thread, with n_jobs/4 each, but if n_jobs > 4 it might be preferable. Even better would to run a thread pool, since some components will take longer, but its probably hideous.
  2. 3788 is an interaction between n_jobs and contract time. Contract time is split evenly between classifiers, if we did (1) we could give them the same time
  3. Parallel in python is weird, not sure it is actually creating threads or just time slicing by default

I'm going to poke around a bit with n_jobs, see what actual speed up we are getting

TonyBagnall avatar Nov 15 '22 15:11 TonyBagnall

Was this fixed with the swap to prefer="threads? May be worth opening threading issue on the main repo or closing.

MatthewMiddlehurst avatar Jun 28 '23 11:06 MatthewMiddlehurst

Better to discuss threading in aeon IMO. this is stale so closing.

MatthewMiddlehurst avatar Oct 09 '24 11:10 MatthewMiddlehurst