forked from ray-project/ray
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[core] fix depth of threaded task (ray-project#30902)
Signed-off-by: Clarence Ng <[email protected]> AIR's runs training on a separate RunnerThread that is implemented with threading.Thread. The current task spec and depth is thread-local, which breaks when a different thread such as the RunnerThread is the one that is starting the task. The RunnerThread starts the training worker and dataset. Without this fix, the depth is incorrectly set to 1. With the fix it is correctly set to 2. Program this fixes: https://gist.github.com/clarng/50094104476080d1b2d04bded4e370b3 Going forward we should re-evaluate whether the worker context should be thread-local or whether we should clean this up and use something that is thread-safe
- Loading branch information
Showing
3 changed files
with
37 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters