Skip to content

Commit

Permalink
[Dashboard] add memray to requirements.txt (ray-project#44315)
Browse files Browse the repository at this point in the history
memray is used by the memory profiler but it's currently missing in ray requirements. We will see this error if we try to get the memory profiling from a running actor.

Signed-off-by: bhuang <[email protected]>
  • Loading branch information
brycehuang30 authored Apr 1, 2024
1 parent 76c96be commit 47637f0
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dashboard/modules/reporter/profile_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,9 @@ async def detach_profiler(
cmd.append("--verbose")
cmd.append(str(pid))

if await _can_passwordless_sudo():
cmd = ["sudo", "-n"] + cmd

process = await asyncio.create_subprocess_exec(
*cmd,
stdout=subprocess.PIPE,
Expand Down
1 change: 1 addition & 0 deletions dashboard/optional_deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import opencensus # noqa: F401

import prometheus_client # noqa: F401
import memray # noqa: F401

import aiohttp # noqa: F401
import aiohttp.web # noqa: F401
Expand Down
1 change: 1 addition & 0 deletions python/ray/tests/test_minimal_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def test_module_import_with_various_non_minimal_deps(pydantic_version: str):
"aiohttp_cors",
"pydantic",
"grpc",
"memray",
]
for i in range(len(optional_modules)):
for install_modules in itertools.combinations(optional_modules, i):
Expand Down
1 change: 1 addition & 0 deletions python/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ pandas>=1.3
pydantic!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,<3 # Serve users can use pydantic<2
py-spy>=0.2.0
watchfiles
memray
1 change: 1 addition & 0 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ def get_packages(self):
"prometheus_client >= 0.7.1",
"smart_open",
"virtualenv >=20.0.24, !=20.21.1", # For pip runtime env.
"memray",
],
"client": [
# The Ray client needs a specific range of gRPC to work:
Expand Down

0 comments on commit 47637f0

Please sign in to comment.