-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Including psutil & setproctitle #7031
Conversation
Can one of the admins verify this patch? |
python/ray/__init__.py
Outdated
setproc_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), | ||
"setproctitle_files") | ||
sys.path.insert(0, setproc_path) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need mess with the import path if we are directly import from ray.thirdparty_files.psutil
python/ray/reporter.py
Outdated
psutil_path = os.path.join( | ||
os.path.abspath(os.path.dirname(__file__)), "psutil_files") | ||
sys.path.insert(0, psutil_path) | ||
|
||
try: | ||
import psutil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make sure to change all occurrence of import psutil
and import setproctitle
to import ray.thirdparty.psutil import psutil
Tested locally, it worked! |
Test FAILed. |
Test FAILed. |
Test FAILed. |
Test FAILed. |
Test FAILed. |
Test PASSed. |
Test FAILed. |
Test FAILed. |
Co-Authored-By: Simon Mo <[email protected]>
Test PASSed. |
ci/travis/install-dependencies.sh
Outdated
@@ -61,3 +61,6 @@ if [[ "$PYTHON" == "3.5" ]] || [[ "$MAC_WHEELS" == "1" ]]; then | |||
source $HOME/.nvm/nvm.sh | |||
nvm install node | |||
fi | |||
|
|||
pip install -q psutil setproctitle \ | |||
--target="$ROOT_DIR/../../python/ray/thirdparty_files" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new line
python/ray/__init__.py
Outdated
@@ -51,6 +51,11 @@ | |||
os.path.abspath(os.path.dirname(__file__)), "pyarrow_files") | |||
sys.path.insert(0, pyarrow_path) | |||
|
|||
psutil_path = os.path.join( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- psutil_path -> thirdparty_path
- Add a comment saying "This is done to make sure we use the bundled version of psutil and setproctitle"
python/ray/exceptions.py
Outdated
import setproctitle | ||
except ImportError: | ||
setproctitle = None | ||
import ray.thirdparty_files.setproctitle as setproctitle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import ray
import setproctitle
Test FAILed. |
…uiring import ray
Test FAILed. |
Test PASSed. |
Test PASSed. |
Test FAILed. |
Why are these changes needed?
Including psutil & setproctitle into the distribution to allow for dashboard to be built automatically.
Related issue number
Checks
scripts/format.sh
to lint the changes in this PR.