Commit graph

13318 commits

Author SHA1 Message Date
matthewdeng
68315b34b4
[docs] move troubleshooting section to source development page (#26166) 2022-06-28 16:06:46 -07:00
Archit Kulkarni
21760fd3ba
[runtime env] [CI] Use wait_for_condition in working_dir GC test instead of hardcoded sleep (#25983) 2022-06-28 11:51:29 -07:00
Amog Kamsetty
17766bc8b0
[AIR] Update KerasCallback to work with TensorflowPredictor (#26089)
The KerasCallback saves the model checkpoint as a file. However, for the saved checkpoint to work with TensorflowPredictor, the model weights needs to be saved under the MODEL_KEY in a dict format.
2022-06-28 11:22:42 -07:00
zcin
da5366f5f5
[serve] Set status message if deployment pending for too long (#25861)
If a ray cluster does not have enough resources for a serve deployment, the deployment will be stuck at `updating` status. This change will set the `message` field when allocations/initializations of actors have been pending for too long.

Co-authored-by: shrekris-anyscale <92341594+shrekris-anyscale@users.noreply.github.com>
2022-06-28 11:21:52 -07:00
Simon Mo
68692b3464
[AIR][Serve] Rename ModelWrapperDeployment -> PredictorDeployment (#25962) 2022-06-28 10:26:10 -07:00
Kai Fricke
7091a32fe1
[ci/release] Support running tests on staging (#25889)
This adds "environments" to the release package that can be used to configure some environment variables. These variables will be loaded either by an `--env` argument or a `env` definition in the test definition and can be used to e.g. run release tests on staging.
2022-06-28 10:14:01 -07:00
Stephanie Wang
3017128d5e
Revert "[Observability] Fix --follow lost connection when it is used for > 30 seconds (#26080)" (#26162)
This reverts commit 2d58bd5a50.
2022-06-28 10:04:58 -07:00
SangBin Cho
68336abf13
[State Observability] Support --detail flag. (#26071)
## Why are these changes needed?

This PR adds --detail flag to the list APIs.
2022-06-28 07:56:44 -07:00
simonsays1980
05d3af766c
[RLlib] Added 'episode.hist_data' to the 'atari_metrics' to nsure that custom metrics of the user are kept in postprocessing when using Atari environments. (#25292) 2022-06-28 16:31:57 +02:00
Charles Sun
70f94e6d63
[RLlib] Migrating DDPG to PolicyV2. (#26054) 2022-06-28 15:52:56 +02:00
kourosh hakhamaneshi
f421730b47
[RLlib] Added expectation advantage_type option to CRR. (#26142) 2022-06-28 15:40:09 +02:00
Sven Mika
762cfbdff1
[RLlib] IMPALA and APPO metrics fixes; remove deprecated async_parallel_requests utility. (#26117) 2022-06-28 15:14:37 +02:00
SangBin Cho
2d58bd5a50
[Observability] Fix --follow lost connection when it is used for > 30 seconds (#26080)
## Why are these changes needed?

This PR fixes the issue where --follow lost connection when it is used for > 30 seconds because the gRPC timeout is configured to be 30 seconds, and we don't reset it when --follow is set.

This fixes the issue by setting timeout=None when keepalive==True

## Related issue number

Closes https://github.com/ray-project/ray/issues/25721
2022-06-28 05:48:25 -07:00
SangBin Cho
4b957e99b5
[State Observability] != predicate for filtering. (#26079)
## Why are these changes needed?

This PR implements `!=` predicate for filtering. As a result of this PR, two APIs are changed.

```
--filter key value -> --filter "key=val" or ---filter "key!=val"

list_actors(filters=[(key, val), (key2, val2)]) -> list_actors(filters=[(key, "=", val), (key2, "=", val2)])
```
2022-06-28 05:42:19 -07:00
Artur Niederfahrenhorst
efea87f0cb
[RLlib] SimpleQ PyTorch Multi GPU fix (#26109) 2022-06-28 12:12:56 +02:00
mwtian
513881584d
[Core] install jemalloc in Ray docker and use jemalloc in benchmark release tests (#26112)
There are mysterious memory usage growth in Ray clusters that disappear when running with jemalloc. Before we are able to figure out the root cause, it seems using jemalloc by default can be a good walkaround. Because of its efficiency, using jemalloc by default can be beneficial, but we need to run more benchmarks to verify.
2022-06-27 23:26:56 -07:00
Guyang Song
58bfad84d3
[runtime env] plugin refactor[1/n] (#26077) 2022-06-28 14:09:05 +08:00
Guyang Song
876fef0fcf
[C++ worker] optimize the log of dynamic library loading (#26120) 2022-06-28 14:08:47 +08:00
Qing Wang
8884bfb445
[Java] Support starting named actors in different namespace. (#25995)
Allow you start actors in different namespace instead of the driver namespace.
Usage is simple:
```java
Ray.init(namespace="a");
/// Named actor a will starts in namespace `b`
ActorHandle<A> a = Ray.actor(A::new).setName("myActor", "b").remote();
```

Co-authored-by: Hao Chen <chenh1024@gmail.com>
2022-06-28 13:49:15 +08:00
Ricky Xu
44daf3ecd7
[Core][State Observability] Get API using List endpoints + filtering on ids (#25894)
## Why are these changes needed?
This is a first implementation of GET APIs for

nodes
actors
placement groups
workers
tasks
objects
E.g.

# CLI
(dev) ➜  ray git:(ricky/obs-get) ray get nodes cab26304d105caa6f2100908f7b461ef9ed244984ec30b4b46f953f9
---
node_id: cab26304d105caa6f2100908f7b461ef9ed244984ec30b4b46f953f9
node_ip: 172.31.47.143
node_name: 172.31.47.143
resources_total:
    CPU: 8.0
    memory: 16700517582.0
    node:172.31.47.143: 1.0
    object_store_memory: 8350258790.0
state: ALIVE


# Python 
from ray.experimental.state.api import get_node
from ray.experimental.state.common import NodeState

node :NodeState = get_node(<id>)
print(node)

We currently do not support getting specific resources by id for 'jobs' and 'runtime-envs'

jobs: it is not exposing id to be queried easily yet
runtime envs: it doesn't have an id associated.

TODO:
it uses list endpoints + filtering as for now, future iterations will implement GET-specific endpoints and interaction with raylet/GCS with point query APIs.
Unit testing for state_manager for GET endpoints when implemented.
Getting jobs by id
2022-06-27 17:14:29 -07:00
Dmitri Gekhtman
3af3269b8e
[KubeRay][docs] Warning about kubectl apply, update feature state wording. (#25685)
This PR

Adds a warning about a known issue to the KubeRay section of the Ray docs.
Updates the description of the feature state of KubeRay integration.
Adds some links to the KubeRay docs.
2022-06-27 14:11:00 -07:00
Ruben Berenguel
7f8d3c3dc7
Update installation instructions (#23121)
Currently unqualified `conda install` is installing 1.44.0 whereas `ray` is requiring 1.43.0 in `pip install`, thus the instructions are cancelling themselves out and you end with an unusable installation due to no symbols for `grpcio` in ARM

Co-authored-by: Simon Mo <simon.mo@hey.com>
2022-06-27 13:55:50 -07:00
shrekris-anyscale
66650cdadb
[Serve] Remove serve.start() in run_graph task (#26096) 2022-06-27 09:44:36 -07:00
shrekris-anyscale
607c276e43
[Serve] Add cosmetic improvements to serve build (#25935) 2022-06-27 09:42:20 -07:00
Artur Niederfahrenhorst
64a0eae758
simplexfix (#26122) 2022-06-27 08:25:19 -07:00
Ricky Xu
3d8ca6cf0f
[Core][cli][usability] ray stop prints errors during graceful shutdown (#25686)
Why are these changes needed?
This is to address false alarms on subprocesses exiting when killed by ray stop with SIGTERM.

What has been changed?
Added signal handlers for some of the subprocesses:
dashboard (head)
log monitor
ray client server
Changed the --block semantics and prompt messages.

Related issue number
Closes #25518
2022-06-27 08:14:59 -07:00
Lixin Wei
c4b9e9ffa5
[Java] Add entry to run custom test using bazel (#26073)
Now we can run custom java tests by:

0. `cp testng_custom_template.xml testng_custom.xml`
1. Specify test class/method in `testng_custom.xml`
2. `bazel test //java:custom_test --test_output=streamed`
2022-06-27 11:40:16 +08:00
tomsunelite
db6f8a2f01
Fix java detached actor not working (#26003)
detached java actor is not working(actor will be dead after driver exit) when creating a java actor with ActorLifetime.DETACHED option

Co-authored-by: sunkunjian1 <sunkunjian1@jd.com>
2022-06-27 11:21:06 +08:00
Dmitri Gekhtman
1055eadde0
[Dashboard] Fix dashboard RAM and CPU with cgroups2 (#25710)
Closes #25283.

The dashboard shows inaccurate memory and cpu data when run inside of a docker container, in particular when using cgroups v2. This PR fixes that.
2022-06-26 14:01:26 -07:00
Dmitri Gekhtman
0d5131ba37
[Autoscaler][minor] Improve shutdown handler, add retries to KubeRay config fetch (#25904)
Uses a Monitor attribute in the shutdown handler instead of an args attribute. Necessary because some integrations (including KubeRay) instantiate the Monitor directly rather than running python Monitor.py with arguments.

Adds HTTP retries to Ray CR fetch. Necessary for robustness because Ray CR fetch exceptions are not currently handled during autoscaler initialization.
2022-06-25 11:56:25 -07:00
Kai Fricke
75d08b0632
[tune/structure] Refactor suggest into search package (#26074)
This PR renames the `suggest` package to `search` and alters the layout slightly.

In the new package, the higher-level abstractions are on the top level and the search algorithms have their own subdirectories.

In a future refactor, we can turn algorithms such as PBT into actual `SearchAlgorithm` classes and move them into the `search` package. 

The main reason to keep algorithms and searchers in the same directory is to avoid user confusion - for a user, `Bayesopt` is as much a search algorithm as e.g. `PBT`, so it doesn't make sense to split them up.
2022-06-25 14:55:30 +01:00
Eric Liang
7a29461c40
Add back ray.state in deprecation wrapper; print stack trace on warning (#26086) 2022-06-24 15:59:58 -07:00
clarng
f7d0ad3bb7
Enable isort for base directory (#26085)
Remove base dir : 'python/ray/*.py' from the isort blacklist. This is needed so it will run isort on subdirectories under python/ray, and allow us to start enabling isort for subdirectories
2022-06-24 15:32:51 -07:00
Amog Kamsetty
f71a4680da
[AIR] Add __init__.py to ray.air.callbacks (#26088) 2022-06-24 15:29:28 -07:00
shrekris-anyscale
6092869ff3
[Serve] [Docs] Create end-to-end documentation example for Serve REST API and CLI (#25936) 2022-06-24 14:44:39 -07:00
Antoni Baum
0ec198acc2
[AIR] Remove unnecessary pandas from examples (#26009)
Removes unnecessary pandas usage from AIR examples. Helps ensure users do not follow bad practices.
2022-06-24 14:38:23 -07:00
Clark Zinzow
fcd583688a
[Datasets] [Hotfix] Update ds.to_pandas() limit error to reflect current limit API (#26081)
This PR is a hotfix updating the ds.to_pandas() limit error to reflect the current limit API in to_pandas().
2022-06-24 14:34:40 -07:00
shrekris-anyscale
97a9a20f74
[Serve] [Docs] Add Serve REST API Schema to Serve API Docs (#25786) 2022-06-24 14:06:26 -07:00
Chen Shen
95fe3271ec
[Core][Doc] remove cython section from advanced doc. #26062
the example is removed.
2022-06-24 10:39:45 -07:00
SangBin Cho
ef8461abac
[Core] Fix check failure from incorrect death cause (#26007)
rkooo567
Member
rkooo567 commented 2 days ago
Why are these changes needed?
Fixes the check failure;

  | 2022-06-21 19:14:10,718	WARNING worker.py:1737 -- A worker died or was killed while executing a task by an unexpected system error. To troubleshoot the problem, check the logs for the dead worker. RayTask ID: ffffffffffffffff7cc1d49b6d4812ea954ca19a01000000 Worker ID: 9fb0f63d84689c6a9e5257309a6346170c827aa7f970c0ee45e79a8b Node ID: 2d493b4f39f0c382a5dc28137ba73af78b0327696117e9981bd2425c Worker IP address: 172.18.0.3 Worker port: 35883 Worker PID: 31945 Worker exit type: SYSTEM_ERROR Worker exit detail: Worker unexpectedly exits with a connection error code 2. End of file. There are some potential root causes. (1) The process is killed by SIGKILL by OOM killer due to high memory usage. (2) ray stop --force is called. (3) The worker is crashed unexpectedly due to SIGSEGV or other unexpected errors.
  | (HTTPProxyActor pid=31945) [2022-06-21 19:14:10,710 C 31945 31971] pb_util.h:202:  Check failed: death_cause.context_case() == ContextCase::kActorDiedErrorContext
  | (HTTPProxyActor pid=31945) *** StackTrace Information ***
  | (HTTPProxyActor pid=31945)     ray::SpdLogMessage::Flush()
  | (HTTPProxyActor pid=31945)     ray::RayLog::~RayLog()
  | (HTTPProxyActor pid=31945)     ray::core::CoreWorker::HandleKillActor()
  | (HTTPProxyActor pid=31945)     std::_Function_handler<>::_M_invoke()
  | (HTTPProxyActor pid=31945)     EventTracker::RecordExecution()
  | (HTTPProxyActor pid=31945)     std::_Function_handler<>::_M_invoke()
  | (HTTPProxyActor pid=31945)     boost::asio::detail::completion_handler<>::do_complete()
  | (HTTPProxyActor pid=31945)     boost::asio::detail::scheduler::do_run_one()
  | (HTTPProxyActor pid=31945)     boost::asio::detail::scheduler::run()
  | (HTTPProxyActor pid=31945)     boost::asio::io_context::run()
  | (HTTPProxyActor pid=31945)     ray::core::CoreWorker::RunIOService()
  | (HTTPProxyActor pid=31945)     execute_native_thread_routine
  | (HTTPProxyActor pid=31945)
  | (HTTPProxyActor pid=31982) INFO:     Started server process [31982]
NOTE: This is a temporary fix. The root cause is that there's a path that doesn't properly report the death cause (when this RPC is triggered by gcs_actor_scheduler). This should be addressed separately to improve exit observability.

Since this is intended to be picked for 1.13.1, I only added the minimal fix.
2022-06-24 06:22:33 -07:00
Kai Fricke
012306da68
[hotfix] Fix linkcheck (#26070) 2022-06-24 13:38:01 +01:00
Artur Niederfahrenhorst
bed9083f35
[RLlib] Add timeout to filter synchronization. (#25959) 2022-06-24 14:37:43 +02:00
Kai Fricke
eee866d762
[tune/structure] Introduce logger package (#26049)
This PR splits up logger.py and moves it into its own subpackage. External imports don't have to be changed at all.
2022-06-24 08:46:24 +01:00
Jun Gong
257e67474c
[RLlib] introduce serialization for our custom gym space types. (#25923) 2022-06-23 22:55:57 -07:00
Jun Gong
8c9cac350d
Fix unit test test_check_env.py and est_check_multi_agent.py. (#25993) 2022-06-23 22:55:41 -07:00
Artur Niederfahrenhorst
a3f1323457
[RLlib] Make QMix use the ReplayBufferAPI (#25560) 2022-06-23 22:55:22 -07:00
Chen Shen
ef00917df0
[CI] deflake test_multi_node_3 by increasing its timeout 2022-06-23 22:48:17 -07:00
Simon Mo
5342163b9d
[CI] Use BUILDKITE_JOB_ID for better navigation for flaky tracker (#26021) 2022-06-23 18:07:29 -07:00
Antoni Baum
94492c2b49
[AIR/Docs] Improve user guide gallery (#26016)
Moves logging to examples, reorders to match TOC, adds missing entry.
2022-06-23 17:51:01 -07:00
Sebastián Ramírez
8bde3f5dd7
🎨 Update type annotations to include options in ray.remote() (#25999)
The current type annotations expect and support using:

```Python
@ray.remote
def do_things(x: int, y: float):
    return x * y
```

...without options.

This PR adds type annotations for passing options, as in:

```Python
@ray.remote(num_cpus=3)
def do_more_things(name: str, value: float):
    return f"{name}: {value}"
```

Before:

<img width="687" alt="Screenshot 2022-06-22 at 04 49 11" src="https://user-images.githubusercontent.com/1326112/174999689-80bdc3ce-b437-464f-b05c-7613b3f8f89b.png">

After (autocompletion):

<img width="687" alt="Screenshot 2022-06-22 at 04 50 34" src="https://user-images.githubusercontent.com/1326112/174999899-5062335a-17ee-44a8-ad5c-97335e201e7b.png">

...and no errors:

<img width="687" alt="Screenshot 2022-06-22 at 04 51 15" src="https://user-images.githubusercontent.com/1326112/175000001-0a978871-8835-426f-9e09-5848194639fd.png">
2022-06-23 17:50:25 -07:00