added miniray support for legacy codedir#59
Draft
MarkNDeaconu wants to merge 28 commits into
Draft
Conversation
Bugfix: Check for pending model loads before re-attempting
Added warning for empty queue. Notice for people that have not pulled master and are on the wrong queue.
PYTHONPYCACHEPREFIX redirects all bytecode reads/writes to a per-node dir under /var/cache/miniray, so imports never write to the codedir which can cause issues on nfs when using an older linux kernel (torvalds/linux@99bc9f2). Each job gets its own subdir so tasks sharing a venv share the cache, and cleanup_venvs deletes the local subdir when the venv is evicted. Task processes run as TASK_UID so they can write to the user-owned pycache dirs. PYTHONDONTWRITEBYTECODE is slower in comparison since recompiling happens per task. (2.5x more time compared to warm cache for torch + pandas + numpy import)
https://docs.python.org/3/library/os.html#os.waitpid "options is an OR combination of flags. If it contains WNOHANG and there are no matching children in the requested state, (0, 0) is returned." pid, returncode = os.waitpid(self.proc.pid, os.WNOHANG) returns (0,0) from a task that has not terminated. On a timeout error the returncode is set to 0 for each task, leaving them as zombies. poll() is a better alternative since it returns None when the task has not terminated : https://docs.python.org/3/library/subprocess.html#subprocess.Popen.poll
Contributor
Author
|
We decided not to go this direction. Leaving the pr for a bit in case it comes up |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.