fix(task): fix random generators (#1594)

Before this change, each worker would select the same files, resulting in less randomness than expected.
This commit is contained in:
Hervé BREDIN authored and GitHub committed 2024-01-09 13:06:09 +01:00
1 parent eda0c51b13
commit 8f477fada9
5 files changed
+37 -21

No files matched your search

+1 -1
View File
@@ -236,7 +236,7 @@
"\n",
" # create worker-specific random number generator (RNG) to avoid this common bug:\n",
" # tanelp.github.io/posts/a-bug-that-plagues-thousands-of-open-source-ml-projects/\n",
" rng = create_rng_for_worker(self.model.current_epoch)\n",
" rng = create_rng_for_worker(self.model)\n",
"\n",
" # load list and number of classes\n",
" classes = self.specifications.classes\n",