Commit graph

12657 commits

Author SHA1 Message Date
Balaji Veeramani
da5cf93d97
Create .git-blame-ignore-revs for black formatting (#25118) 2022-05-23 21:55:57 -07:00
Zhe Zhang
873c44d984
[Docs] Add "Examples" block to Ray Data landing page, and consistently use bold font (#24994) 2022-05-23 21:22:00 -07:00
Qing Wang
4026b38b09
[Java] Remove RayRuntimeInternal class (#25016)
Due to we have already removed the multiple workers in one process, remove RayRuntimeInternal for purpose.
2022-05-24 09:22:48 +08:00
Yi Cheng
7cf4233858
[core] Resubscribe GCS in python when GCS restarts. (#24887)
This is a follow-up PRs of https://github.com/ray-project/ray/pull/24813 and https://github.com/ray-project/ray/pull/24628

Unlike the change in cpp layer, where the resubscription is done by GCS broadcast a request to raylet/core_worker and the client-side do the resubscription, in the python layer, we detect the failure in the client-side.

In case of a failure, the protocol is:

1. call subscribe
2. if timeout when doing resubscribe, throw an exception and this will crash the system. This is ok because when GCS has been down for a time longer than expected, we expect the ray cluster to be down.
3. continue to poll once subscribe ok.

However, there is an extreme case where things might be broken: the client might miss detecting a failure.

This could happen if the long-polling has been returned and the python layer is doing its own work. And before it sends another long-polling, GCS restarts and recovered. 

Here we are not going to take care of this case because:
1. usually GCS is going to take several seconds to be up and the python layer's work is simply pushing data into a queue (sync version). For the async version, it's only used in Dashboard which is not a critical component.
2. pubsub in python layer is not doing critical work: it handles logs/errors for ray job;
3. for the dashboard, it can just restart to fix the issue.


A known issue here is that we might miss logs in case of GCS failure due to the following reasons:

- py's pubsub is only doing best effort publishing. If it failed too many times, it'll skip publishing the message (lose messages from producer side)
- if message is pushed to GCS, but the worker hasn't done resubscription yet, the pushed message will be lost (lose messages from consumer side)

We think it's reasonable and valid behavior given that the logs are not defined to be a critical component and we'd like to simplify the design of pubsub in GCS.

Another things is `run_functions_on_all_workers`. We'll plan to stop using it within ray core and deprecate it in the longer term. But it won't cause a problem for the current cases because:

1. It's only set in driver and we don't support creating a new driver when GCS is down.
2. When GCS is down, we don't support starting new ray workers.

And `run_functions_on_all_workers` is only used when we initialize driver/workers.
2022-05-23 13:06:33 -07:00
Antoni Baum
36b1b4ce0c
Fix filelock in _delete_path (#25093) 2022-05-23 20:58:02 +01:00
Balaji Veeramani
50c31b8466
[Data] Add partitioning classes to Data API reference (#24203) 2022-05-23 09:34:41 -07:00
shrekris-anyscale
b9fb902a4b
Revert "[serve] Use soft constraint for placing controller on the head node (#24934)" (#25050)
This reverts commit 737d16328c.
2022-05-23 11:31:23 -05:00
Sven Mika
37799751df
[Serve + RLlib] Fix serve tutorial_rllib for Win. PyGame needs to be installed as of gym==0.23. (#25080) 2022-05-23 17:43:35 +02:00
Guyang Song
1bc91a4129
[doc] Add info about eager_install to runtime_env FAQ (#25008) 2022-05-23 10:26:57 -05:00
Archit Kulkarni
a67c8a0739
[runtime_env] Add temporary URI reference to prevent URI deletion before job starts (#24719)
Packages are uploaded to the GCS for `runtime_env`.  These packages are garbage collected when their refcount becomes zero.

The problem is the reference doesn't get incremented until the job starts, which happens after the package is uploaded.  It's possible for the package's refcount to go to zero in between the upload and when the job starts, causing the package to be deleted before it's needed by the job.  It's likely the cause of https://github.com/ray-project/ray/issues/23423.

We can't just increment the refcount at the time of upload, because if the script is killed before the job is started (e.g. via Ctrl-C) then the reference will never be decremented and the package will never be deleted.

The solution in this PR is to increment the refcount at the time of upload, but automatically decrement after a configurable timeout (default 30s).  This should be enough time for the job to start.  When the job starts, it increments the refcount as usual and decrements it when the job finishes or is killed.

Co-authored-by: Edward Oakes <ed.nmi.oakes@gmail.com>
2022-05-23 10:25:04 -05:00
mwtian
50d49a2d7a
[Core] use higher niceness for workers (#24928)
Looking at past failures of dataset_shuffle_push_based_random_shuffle_1tb and when running it on my own, I noticed that raylets are killed because GCS was not able to respond to it in time. It seems at the beginning of the run, there is a huge CPU spike which starved GCS out of CPU. With the same spirit of adjusting workers to higher OOM scores, we can give workers higher niceness so they yield CPU to GCS, Raylet and other user processes.

I ran dataset_shuffle_push_based_random_shuffle_1tb a few time which no longer sees raylet death because of GCS CPU starvation. But there are other issues making the test fail which I will continue to investigate.
2022-05-23 08:12:51 -07:00
Kai Fricke
bcf77f38ee
[ci] Add second bazel mirror (#24913)
Builds are currently failing because `mirror.bazel.build`'s SSL certificate expired. This PR adds another bazel mirror to avoid this problem.

Builds are still failing because https://github.com/jupp0r/prometheus-cpp explicitly lists `mirror.bazel.build`.
2022-05-23 12:01:40 +01:00
Sven Mika
ec89fe5203
[RLlib] APEX-DQN and R2D2 config objects. (#25067) 2022-05-23 12:15:45 +02:00
Guyang Song
c6edfdd2a0
[script] expose options of xxx_port in 'ray start' command (#24919) 2022-05-23 17:18:09 +08:00
Eric Liang
d57cdd19ac
[tune] Fix stray extra log from runtime_env setup (#25071)
commit 40774ac219
Author: Qing Wang <kingchin1218@gmail.com>
Date:   Tue May 17 11:33:59 2022 +0800

    Minor changes for Java runtime env. (#24840)

Introduced an extra log message that spams stdout when running with Tune. Move this log line to debug and add an e2e test check.
2022-05-23 09:54:24 +01:00
Sven Mika
dea9b86a16
[RLlib] MAML config objects. (#25066) 2022-05-23 10:14:24 +02:00
Sven Mika
baf8c2fa1e
[RLlib] TD3 config objects. (#25065) 2022-05-23 10:07:13 +02:00
Sven Mika
09886d7ab8
[RLlib] Upgrade gym 0.23 (#24171) 2022-05-23 08:18:44 +02:00
Jialing He
c03d0432f3
[core] Fix Object Manager owner address after AssignOwner (#25021)
When assigning an owner for an object (different from the current worker), such as:
```python
ray.put(vaule, _owner = ACTORHANDLE)
```
Object Manager holds the wrong owner's address and updates location info to the wrong worker, making `ray.get` slow. the current master will get Timeout in this new test case.
2022-05-23 13:34:40 +08:00
mwtian
ec04b96eab
[Doc] update instructions to using Ray docker images #25053
Ray builds docker images for all supported Python versions, but the instruction only mentions Python 3.7, which can confuse users.
2022-05-22 16:30:40 -07:00
Jian Xiao
9dd30d5f77
Proofread the some datasets docs (#25068)
Co-authored-by: Ubuntu <ubuntu@ip-172-31-32-136.us-west-2.compute.internal>
2022-05-22 12:11:51 -07:00
Artur Niederfahrenhorst
cd16dc4dae
[RLlib] Fix estimated buffer size in replay buffers. (#24848) 2022-05-22 21:03:23 +02:00
Steven Morad
501d932449
[RLlib] SAC, RNNSAC, and CQL TrainerConfig objects (#25059) 2022-05-22 19:58:47 +02:00
Sven Mika
44773e810b
[RLlib] DD-PPO Config objects. (#25028) 2022-05-22 13:05:24 +02:00
SangBin Cho
ec653e3196
[Nightly test] Move two line downloads to one line. (#25061)
It fixes the mysterious error when all cluster env build is failing when pip uninstall / pip install is written in 2 lines. The root cause will be fixed later
2022-05-22 00:07:03 -07:00
Eric Liang
55d039af32
Annotate datasources and add API annotation check script (#24999)
Why are these changes needed?
Add API stability annotations for datasource classes, and add a linter to check all data classes have appropriate annotations.
2022-05-21 15:05:07 -07:00
Kai Fricke
d57ba750f5
[docs/air] Move upload example to docs (#25022) 2022-05-21 12:16:33 -07:00
Rohan Potdar
5a70b732e8
[RLlib] MARWIL and BC Config. (#24853) 2022-05-21 12:50:20 +02:00
Jian Xiao
ad842ec9ab
Revamp the Transforming Datasets user guide (#25033) 2022-05-20 19:25:06 -07:00
Jian Xiao
e5838c4700
Fix range_arrow(), which is replaced by range_table() (#25036) 2022-05-20 19:24:49 -07:00
Yi Cheng
b95c50caa2
[core][syncer][6.1] Buffering long-polling for efficiency. (#24884)
Compared with pushing based model, long-polling is slower because to send a message, you need to wait until you receive the polling requests. This PR improves this by sending X polling requests so that at most there can be 10 requests flying in the middle and this can improve the perf. Tested with `many_nodes_actor_tests` and no regression:

```
Actor launch time: 1.6540390349998688 (5000 actors)
Actor ready time: 13.953653221999957 (5000 actors)
Total time: 15.607692256999826 (5000 actors)
```

1. [X]  Deprecate old code path for publish node resource change
2. [X]  Move poller and broadcaster into RaySyncer
3. [X]  Deprecate the old pg reporting code path
4. [X]  Remove syncer from gcs cluster resource manager and encapsulate everything in syncer module.
5. [X]  Versioning the report
6. [ ]  Introduce Reporter/Receiver API in the prototype and adaptor rayler and gcs with that.
7. [ ]  Experiment with protocol & communication layer change.
2022-05-20 18:26:05 -07:00
Yi Cheng
e3f854e34d
[flakey] Disable redis tests for test_plugin_timeout shortly. (#25045)
This test is not running well in Redis mode. Given that the other tests are ok, I'd like to only disable this one instead of revert the whole commit to making sure the other tests don't have regression.

`linux://python/ray/tests:test_runtime_env_plugin::test_plugin_timeout`
2022-05-20 17:31:46 -07:00
ZhuSenlin
bed660b085
[Core] Lazy subscribe to actor's state (#24600)
Now the status of subscribing to Actors in Actor Manager is eager mode, that is to say, when worker A passes List<ActorHandler> as an input parameter to another worker B, worker B will immediately subscribe to the status of all Actors in this list when constructing, even if worker B has not yet used these actors.

Assuming that a graph job has 1000 actors, and each actor has a List of the graph, then this job has nearly 100w subscription relationships. When the job goes offline, the 1000 actor processes will be killed, the redis-server will instantly receive the disconnect event from the 1000 actor processes, each event will trigger 1000 unsubscribexxx operations in the freeClient, causing the redis-server to get stuck.

We suggest to change this eager mode to lazy mode, and only initiate subscription when `SubmitActorTask`, which can reduce many unnecessary subscription relationships.

The microbenchmark  (Left is this PR,  Right is master branch)
![image](https://user-images.githubusercontent.com/2016670/168011321-b64b06a2-20bd-4b35-aa69-0b84e7f4c12e.png)
2022-05-20 15:35:48 -07:00
Chen Shen
8960afa69c
[Core][Python 3.10] fix get_module in the interactive mode. #25032
in python3.10, it fixed a bug that a interactively defined class was tagged with a wrong type during inspection; which now throws OSError. detailed pr python/cpython#27171

we need to handle this case properly in otherwise ray actor definition will throw in interactive mode. please refer to #25026 for repo.
2022-05-20 12:58:15 -07:00
Lucas Alava Peña
2a7ebd4dcf
[RLlib] Fix minor typos in docs (#24845) 2022-05-20 12:19:49 -07:00
Edward Oakes
cb7bcbd651
[job submission] Fix address defaulting behavior (#24970)
Per the discussion in https://github.com/ray-project/ray/issues/24858:

- If an address without a port is provided, don't append a port.
- Default to `http://localhost:8265` if nothing is provided.
2022-05-20 14:10:36 -05:00
Peyton Murray
85fe5346c8
[Core] Fix initization order of GcsServerAddressUpdater members (#25002) 2022-05-20 12:02:55 -07:00
Clark Zinzow
9ea5a8ec4b
Revert "Revert "[Datasets] [Tensor Story - 1/2] Automatically provide tensor views to UDFs and infer tensor blocks for pure-tensor datasets."" (#25031)
Fixes the check ingest utility to handle non-Pandas native batches.
2022-05-20 11:47:29 -07:00
Clark Zinzow
2c8fac369a
Note that explicit resource allocation is experimental, fix typos (#25038) 2022-05-20 11:36:08 -07:00
Clark Zinzow
b52f225a4e
[Datasets] Skip flaky pipelining memory release test (#25009)
This pipelining memory release test is flaky; it was skipped in this Polars PR, which was then reverted.
2022-05-20 11:14:22 -07:00
mwtian
916c6796da
Revert "[core] Fix bugs in data locality (#24698)" (#25035)
This reverts commit eaec96d175.
2022-05-20 10:57:25 -07:00
Simon Mo
3513aa20d8
[Serve][Doc] Split core-apis to key concepts and user guide (#24713) 2022-05-20 10:56:34 -07:00
Chong-Li
5bb46ca8c0
[Enable gcs actor scheduler 2/n] Report pending actor info in gcs (#24595)
This PR tries to fix some features of the gcs actor scheduler, which include:

1. Report pending actor info in gcs such that `HandleGetAllResourceUsage` is able to export the whole thing (including worker nodes and gcs). Otherwise, external features, i.e., autoscaler, can not work properly.
2. In `ClusterResourceScheduler`, actors that can not find available nodes (by gcs scheduler) should stay in the pending queue of `ClusterTaskManager`.
3. If using gcs scheduler, the PG's wildcard resources have to be updated **incrementally** when committing bundles.

In the next PR, we will fix all remaining trivia issues and enable gcs scheduler to pass the entire testing pipeline.

Co-authored-by: Chong-Li <lc300133@antgroup.com>
2022-05-20 09:56:24 -07:00
Antoni Baum
a357b7cf95
[tune] File lock for syncing (#24978)
Adds file locking to prevent parallel file system operations to Tune/AIR syncing functions.

Co-authored-by: Kai Fricke <krfricke@users.noreply.github.com>
2022-05-20 17:11:14 +01:00
Kai Fricke
f215c8c988
[tune] Move wandb logging directory into trial logdir (#25020)
Weights and biases creates a wandb directory to collect intermediate logs and artifacts before uploading them. This directory should be in the respective trial directories. This also means we can re-enable auto resuming.
2022-05-20 17:02:42 +01:00
Kai Fricke
fbfb134b8c
Revert "[Datasets] [Tensor Story - 1/2] Automatically provide tensor views to UDFs and infer tensor blocks for pure-tensor datasets. (#24812)" (#25017)
This reverts commit 841f7c81ff.

Reverts #24812

Broke e.g. ML tests: https://buildkite.com/ray-project/ray-builders-branch/builds/7667#55e7473e-f6a8-4d72-a875-cd68acf8b0c4
2022-05-20 15:37:40 +01:00
Kai Fricke
e76efffec6
[air/docs] Move RL examples to docs (#24962)
Following #24959, this PR moves the RL examples (online/offline/serving) into the Ray ML docs. It also splits the online and offline parts.
2022-05-20 14:55:01 +01:00
Jun Gong
d5a6d46049
[RLlib] Migrate MAML, MB-MPO, MARWIL, and BC to use Policy sub-classing implementation. (#24914) 2022-05-20 14:10:59 +02:00
Jim Thompson
a2c8fe2101
[tune] FIX: Failure in create_scheduler() with pb2 scheduler (#24897)
When `create_scheduler("pb2", ....)` is run a `TuneError` exception is raised.  See referenced issue below for details.

In addition to the fix, introduced a new test (`ray/tune/tests/test_api.py::ShimCreationTest.testCreateAllSchedulers`) to confirm that `tune.create_scheduler()` will work with all documented schedulers.  

Note: `tesCreateAllTestSchedulers` is a superset of what is covered in `testCreateScheduer`.  It may be reasonable to retire the later test.
2022-05-20 12:47:38 +01:00
Kai Fricke
3e053c85ee
[RLlib] Fix broken links from agent -> algo conversion. (#25014) 2022-05-20 11:37:11 +02:00