Closed hiro-o918 closed 3 years ago
$python -c “import time;print(hash(time.sleep))”
6917529027924698041
$python -c “import time;print(hash(time.sleep))”
6917529027918942137
Wow. I didn't know this behaviour :0 We're sorry for overlooking for this problem.
And thanks for your trying for introducing the new feature to gokart, again!
Thank you for the report! This behavior is very surprising to me, too.
We'll revert the PR and yank PyPI release.
I found
serialized_task_definition_check
(introduced by #205) option creates different hashes if a task depends on imported object.To reproduce the bug, run this scripts many times.
I really apologize for the PR (#205), and if you do not mind, please revert the PR or drop the tag.
Hashing tasks (or any classes) is a harder problem than I thought, because classes depends on some packages and the packages also. So your workaround with version tags is very reasonable for the issue I mentioned in the PR
I think
inspect.getsource
can be a solution for this since we do not need serialized task but just hash values. However, I do not have a good idea to retrieve codes recursively to reflect all the dependencies.Anyway, the current implementation is invalid and I am sorry again for the inconvenience