Closed menoliu closed 2 years ago
You are right,
The database creation by multiprocessing messes up the order of the dictionary.
Your correction does correct the bug as long as the user writes the -xp
by order. Can you add that to the -xp
command help?
Remove also the list
, no need for that. Use sorted(SLICEDICT_XMERS.keys())
.
Thanks!
p.s. - you are sending this PR from the master
of your fork.
Okay, done. Apologies about the PR from my master, last Friday was a little hectic. Won't happen again :)
No problem with the master
this time. But you will see the commit messages once you update the fork, there will be some "merge" back and forth, and hopefully, there won't be conflicts.
Noticed an issue while working on Graham that chunks of 2, 3, 4, 5 weren't building correctly. It seems that the chunk sizes were being changed after
SLICEDICT_XMERS
were created. (E.g.[1,2,3,4,5]
in the text file for-xp
was changed to something like[1,2,4,5,3]
after processing and the probabilities stayed the same so they were not going to line up as the user intended).I implemented a quickfix where the list of xmers will be sorted from smallest to greatest per user definition for
-xp
. This could probably be done better by implementing a dictionary before hand matching the user defined chunks to probabilities, and after "updates[sic] user defined chunk sizes and probabilities to the ones actually observed", reorganize each chunk's respective probabilities.