Commit graph

13189 commits

Author SHA1 Message Date
Dmitri Gekhtman
66ea76da1b
[kuberay] Logging-related autoscaler stability improvement.
The autoscaler container writes logs to a directory set up by the Ray container.
This PR moves the logic that sets up autoscaler logging so that it is done after the Ray container is ready.

This PR also changes things so that the autoscaler process exits after hitting 5 total exceptions. Kubernetes will then restart the autoscaler. The idea here is to ensure the autoscaler is able to restart cleanly in long-running deployments of Ray.
2022-06-29 13:18:13 -07:00
Avnish Narayan
1f9282a496
[RLlib, Offline] Make the dataset and json readers batchable (#26055)
Make the dataset and json readers batchable.
2022-06-29 11:52:40 -07:00
Simon Mo
5043cc1a82
[Java] Bump jna to 5.8.0 to compile on M1 macs (#26180) 2022-06-29 11:47:07 -07:00
shrekris-anyscale
6e800cc2df
[Serve] Disable test_serve_head.py on OSX (#26178)
`test_serve_head.py` has been very flaky recently on OSX, so this change disables it there.
2022-06-29 11:21:53 -07:00
Kai Fricke
f9e787115f
[ci/release/core] Run many_nodes test on staging (#26164)
This moves many_nodes to anyscale staging.
2022-06-29 11:07:32 -07:00
xwjiang2010
e85247b5dd
[tune] fix stacktrace. (#26135)
explicitly pass in `exc_info` to `logger.exception` when it's outside of try-catch blob.
2022-06-29 11:06:43 -07:00
Artur Niederfahrenhorst
ecd6047e39
Revert "[RLlib] Small Ape-X deflake. (#26078)" (#26191)
This reverts commit 11a549d4bd.
2022-06-29 10:25:47 -07:00
Philipp Moritz
224ec2e45a
Add typing_extensions requirement to core requirements (#26169)
Since https://github.com/ray-project/ray/pull/25999 we need typing_extensions. It is a very light requirement (no transitive dependencies and small package) so that should be ok.

Considered alternative: Make it optional -- but that would make the typing code more brittle, and prevent us from using more typing in the future.
2022-06-29 09:37:02 -07:00
matthewdeng
4a21dc31ae
[air] update DummyTrainer to handle DatasetPipelines (#26175)
1. Update `DummyTrainer` to take `num_epochs` instead of `runtime_seconds`.
    1. Ray Train expects equal number of calls to `train.report()`. Different workers may run at different speeds and terminate after different epoch numbers, which causes an error.
2. Add `generate_epochs` to support `DatasetPipeline` when `use_stream_api` is True.
3. Update `__main__` code to support testing different configurations.
2022-06-29 09:32:57 -07:00
Antoni Baum
dc7ed086a5
[AIR] More checkpoint configurability, Result extension (#25943)
This PR:
* Allows the user to set `keep_checkpoints_num` and `checkpoint_score_attr` in `RunConfig` using the `CheckpointStrategy` dataclass
* Adds two new fields to the `Result` object - `best_checkpoints` - a list of saved best checkpoints as determined by `CheckpointingConfig`.
2022-06-29 08:23:29 -07:00
Qing Wang
cb77209ce1
[Java] Allow to specify zero CPU as resource. (#26148)
This is aligned to the behavior of Python resources validation.
2022-06-29 22:53:00 +08:00
Qing Wang
a09bf61cea
[Java][Minor] Remove unused class AsyncContext. (#26146)
AsyncContext class has not been in used any longer, it should be removed.
2022-06-29 22:41:59 +08:00
Artur Niederfahrenhorst
11a549d4bd
[RLlib] Small Ape-X deflake. (#26078) 2022-06-29 14:06:42 +02:00
Larry
de0ccc1dfc
add default_actor_lifetime param and add more exception info for cpp worker (#25929) 2022-06-29 18:01:01 +08:00
Sven Mika
2b43713785
[RLlib] Move IMPALA and APPO back to exec plan (for now; due to unresolved learning/performance issues). (#25851) 2022-06-29 08:41:47 +02:00
Tao Wang
49cafc6323
[Cpp worker][Java worker]Support Java call Cpp Actor (#25933) 2022-06-29 14:33:32 +08:00
Alex Wu
a0b6781a64
[docs] ray.remote(object_store_memory) is for actors only (#26161)
We explicitely disallow scheduling tasks based on object store memory, so we should state that in the docs

cc @scottsun94 

```
>>> import ray
>>> @ray.remote(object_store_memory=100)
... def foo():
...  pass
... 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/alex/anyscale/ray/python/ray/worker.py", line 2479, in _make_remote
    ray_option_utils.validate_task_options(options, in_options=False)
  File "/Users/alex/anyscale/ray/python/ray/_private/ray_option_utils.py", line 191, in validate_task_options
    task_options[k].validate(k, v)
  File "/Users/alex/anyscale/ray/python/ray/_private/ray_option_utils.py", line 33, in validate
    raise ValueError(self.error_message_for_value_constraint)
ValueError: Setting 'object_store_memory' is not implemented for tasks
```

Co-authored-by: Alex Wu <alex@anyscale.com>
2022-06-28 20:24:48 -07:00
SangBin Cho
8837a4593f
[State Observability] Truncate data when there are too many entries to return (#26124)
## Why are these changes needed?

This PR adds data truncation when there are more than N number of entries. The policy is as follow;

By default, we return 100 entries at max. Users can adjust this value, but we won't allow to increase more than 10K.

By default, all internal RPCs truncate data if it's > 10K. 

For distributed sources, we query each source with 10K limit and we apply limit again at the end. 

## Related issue number

Closes https://github.com/ray-project/ray/issues/25984#issue-1279280673
Part of https://github.com/ray-project/ray/issues/25718#issue-1268968400
2022-06-28 18:33:57 -07:00
Antoni Baum
128f9e5664
[AIR] Move integration logging callbacks to AIR (#26126)
As the integration logging callbacks are commonly used with AIR Trainers, they should be moved from the tune package to the air package. The old imports will still work, but raise a deprecation warning.
2022-06-28 17:25:19 -07:00
Stephanie Wang
c9be251b7a
Revert "[AIR][Serve] Rename ModelWrapperDeployment -> PredictorDeployment (#25962)" (#26176)
This reverts commit 68692b3464.
2022-06-28 17:07:07 -07:00
SangBin Cho
def02bd4c9
Revert Revert "[Observability] Fix --follow lost connection when it is used for > 30 seconds" #26162 (#26163)
* Revert "Revert "[Observability] Fix --follow lost connection when it is used for > 30 seconds (#26080)" (#26162)"

This reverts commit 3017128d5e.
2022-06-28 16:07:32 -07:00
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