Commit graph

12665 commits

Author SHA1 Message Date
Qing Wang
d40fa391a5
[RuntimeEnv][Java] Support runtime env jars for job. (#24725)
This PR supports specifying the  jars(or zip packages) for a job, which are used for all workers for this job.

You can specify jars or zips in the config file of your job:
```yml
ray {
  job {
    runtime-env: {
         "jars": [
            "https://my_host/a.jar",
            "https://my_host/b.jar"
         ]
    }
  }
}
```
or via system properties:
```java
System.setProperty("ray.job.runtime-env.jars.0", "https://my_host/a.jar");
System.setProperty("ray.job.runtime-env.jars.1", "https://my_host/a.jar");
Ray.init();
// all workers of this job will add a.jar and b.jar into the classpath.
```
2022-05-16 15:07:02 +08:00
Jiajun Yao
863943a540
Add perf alert for shuffle tests (#24798)
Add perf alert for shuffle tests so we can catch #24740 earlier.
2022-05-15 21:50:18 -07:00
Yi Cheng
6df45f0978
[core][1/2] Resubscribe when GCS restarts for raylet. (#24628)
## Why are these changes needed?

<!-- Please give a short summary of the change and the problem this solves. -->
This PR fixes the path to resubscribe to GCS when GCS restarts.

When GCS restarts, it'll lose all subscription information since everything is stored in memory. Then in the runtime, we need to tell GCS what's currently being subscribed.

The previous method:
- We'll have a thread in core worker/raylet to check whether the GCS restarted or not.
- If it restarted, we'll send resubscribe request to GCS.

However, this is not working in these cases:
- GCS restarts happen so fast so the checker in raylet/core worker missed them.
- GCS doesn't restart, but just being lag due to network issues then, the resubscribe is not necessary.

Actually, GCS knows when a resubscribe is needed: when it restarts. So the PR here is to send a resubscribe request from GCS -> Raylet and Raylet will do the resubscription.

There are two parts for this to work:

- [x] raylet send resubscription
- [ ] raylet ask core worker to send resubscription
2022-05-15 18:25:58 -07:00
Eric Liang
3f5d870541
[minor] Use np.searchsorted to speed up random access dataset (#24825) 2022-05-15 18:10:17 -07:00
Ofey Chan
c6c72a6f89
[Doc] [Core] Enhance actor queue doc code (#24532)
Why are these changes needed?
Current documentation code in Message passing using Ray Queue can be enhanced, for better demonstration of the message queue.

It creates 10 tasks but only 2 consumers, and each consumer consumes one task then exit. Therefore, the output is a bit vague:

(consumer pid=1022727) got work 0
(consumer pid=1022595) got work 1
So I make consumer working until the queue is empty. The output shows consumer 1 and 2 working in parallel:

(consumer pid=1030876) consumer 0 got work 0
(consumer pid=1030876) consumer 0 got work 1
(consumer pid=1030876) consumer 0 got work 3
(consumer pid=1030876) consumer 0 got work 5
(consumer pid=1030876) consumer 0 got work 7
(consumer pid=1030876) consumer 0 got work 9
(consumer pid=1030949) consumer 1 got work 2
(consumer pid=1030949) consumer 1 got work 4
(consumer pid=1030949) consumer 1 got work 6
(consumer pid=1030949) consumer 1 got work 8
P.S. Also fix a typo in doc.
2022-05-15 17:38:21 -07:00
Kai Fricke
3f9eea00af
[ci/linkcheck] Fix broken gym envs link (#24817)
These are currently broken in CI.
2022-05-15 18:59:31 +01:00
Artur Niederfahrenhorst
b1bc435adc
[RLlib] Policy Server/Client metrics reporting fix (#24783) 2022-05-15 17:25:25 +02:00
Steven Morad
6321c3a85c
[RLlib] Simple-Q TrainerConfig (#24583) 2022-05-15 17:24:01 +02:00
Steven Morad
5c96e7223b
[RLlib] SimpleQ (minor cleanups) and DQN TrainerConfig objects. (#24584) 2022-05-15 16:14:43 +02:00
Kai Fricke
de69b0d6d6
[train/release] Fix horovod user test master app config (#24734) 2022-05-14 21:20:45 -07:00
Eric Liang
9381dd174e
[docs] Fix broken code example in docstring for DataParallelTrainer args 2022-05-14 20:48:45 -07:00
Yi Cheng
684e395c5d
Revert "Revert "[core] Move reconnection to RPC layer for GCS client."" (#24764)
* Revert "Revert "[core] Move reconnection to RPC layer for GCS client. (#24330)" (#24762)"

This reverts commit 30f370bf1f.
2022-05-14 20:35:40 -07:00
Clark Zinzow
8e8deaeafd
[Datasets] Add example protocol for reading canned in-package example data. (#24800)
Providing easy-access datasets is table stakes for a good Getting Started UX, but even with good in-package data, it can be difficult to make these paths accessible to the user. This PR adds an "example://" protocol that will resolve passed paths directly to our canned in-package example data.
2022-05-14 11:11:24 -07:00
Kai Yang
f5c6c7d28f
[Core] Allow failing new tasks immediately while the actor is restarting (#22818)
Currently, when an actor has `max_restarts` > 0 and has crashed, the actor will enter RESTARTING state and then ALIVE. Imagine this scenario: an online service provides HTTP service and the proxy actor receives requests, forwards them to worker actors, and replies to clients with the execution results from worker actors.

```
                                                        -> Worker A (actor)
                                                       /
                                                      /
HTTP requests -------> Proxy (actor with HTTP server) ---> Worker B (actor)
                                                      \
                                                       \
                                                        -> ...
```

For each HTTP request, the proxy picks one worker (e.g. worker A) based on some algorithm, sends the request to it, and calls `ray.get()` to wait for the result. If for some reason the picked worker crashed, Ray will restart the actor, and `ray.get()` will throw an error. The proxy may pick another worker (e.g. worker B) and re-send the request to it. This is OK.

But new requests keep coming. The proxy may pick worker A again. But because worker A is still in RESTARTING state, it's not ready to serve requests. `ray.get()` on subsequent requests sent to worker A will hang until worker A is back online (ALIVE state). The proxy won't be able to reschedule these requests to another worker because currently there's no way to know if worker A is alive or not before sending a request. We can't say worker A is not alive just based on whether `ray.get()` hangs either.

To solve this issue, we change the semantics of `max_task_retries`.

* When max_task_retries is 0 (which is the default value), if the callee actor is in the RESTARTING state, subsequently submitted tasks will fail immediately with a RayActorError. Users can catch the RayActorError and implement their own fallback strategies to improve service availability and mitigate service outages.
* When max_task_retries is not 0, subsequently submitted tasks will be queued on the caller side and we only send them to the callee when the callee actor is back to the ALIVE state.

TODO

- [x] Add test cases.
- [ ] Update docs.
- [x] API change review.
2022-05-14 10:48:47 +08:00
Richard Liaw
41de6acd10
[air] fix-docs (#24792)
Signed-off-by: Richard Liaw <rliaw@berkeley.edu>
2022-05-13 15:58:31 -07:00
Clark Zinzow
761cfb9238
[Datasets] Add more example data. (#24795)
This PR adds more example data for ongoing feature guide work. In addition to adding the new datasets, this also puts all example data under examples/data in order to separate it from the example code.
2022-05-13 15:07:49 -07:00
Simon Mo
9f23affdc0
[Hotfix] Unbreak lint in master (#24794) 2022-05-13 15:05:05 -07:00
Yi Cheng
68384ec745
[ci] Add flag for staging tests and disable the unstable one. (#24745)
This PR tries to add a prefix for the staging ci test. This is useful to separate staging tests from stable tests in https://flakey-tests.ray.io/
2022-05-13 13:48:14 -07:00
Jun Gong
bc3a1d35cf
[RLlib] Introduce new policy base classes. (#24742) 2022-05-13 21:48:30 +02:00
Chen Shen
2be45fed5e
Revert "[dataset] Use polars for sorting (#24523)" (#24781)
This reverts commit c62e00e.

See if reverts this resolve linux://python/ray/tests:test_actor_advanced failure.
2022-05-13 12:09:12 -07:00
Chen Shen
cc21979998
Revert "[Datasets] Add documentation for bulk parquet read API and file metadata providers. (#24354)" (#24785)
This reverts commit e2ee2140f9.
2022-05-13 11:18:30 -07:00
Jian Xiao
ba500133af
lower the utilization threshold in many tasks scheduling test by 5% (#24758)
Fix the failure to unbreak nightly and unblock 1.13 release.

The root cause is the upgrade of GRPC to 1.45.2 made it slightly slow; this is an acceptable regression which is needed to make this upgrade.

Co-authored-by: Ubuntu <ubuntu@ip-172-31-32-136.us-west-2.compute.internal>
2022-05-13 10:44:58 -07:00
Jian Xiao
030b99b544
Add a classic yet small-sized ML dataset for demo/documentation/testing (#24592)
To facilitate easy demo/documentation/testing with realistic, small-sized yet ML-familiar data. Have it as a source file with code will make it self-contained, i.e. after user "pip install" Ray, they are all set to run it.

IRIS is a great fit: super classic ML dataset, simple schema, only 150 rows.
2022-05-13 10:25:44 -07:00
Sven Mika
8fe3fd8f7b
[RLlib] QMix TrainerConfig objects. (#24775) 2022-05-13 18:50:28 +02:00
kourosh hakhamaneshi
ffcbb30552
[RLlib] Move from agents to algorithms - CQL, MARWIL, AlphaStar, MAML, Dreamer, MBMPO. (#24739) 2022-05-13 18:43:36 +02:00
Archit Kulkarni
738da639d9
[runtime env] Add FAQ for runtime_env (#24412)
Adds some frequently asked user questions to the docs.

Co-authored-by: shrekris-anyscale <92341594+shrekris-anyscale@users.noreply.github.com>
2022-05-13 11:03:58 -05:00
Archit Kulkarni
b0f5073b31
[runtime env] Use asyncio lock to prevent concurrent virtualenv creation (#24564) 2022-05-13 10:59:32 -05:00
Jian Xiao
f02a469d36
Drop python 3.6 from Windows build (#24756)
Fix the wheel build failure
2022-05-13 08:50:10 -07:00
Chen Shen
9b1154dce4
fix inter (#24761) 2022-05-13 08:18:22 -07:00
Kai Fricke
06ef672699
[ci/docs] Fix broken linkcheck URL (#24777)
The hyperband blogpost URL is broken, link to other blog post
2022-05-13 15:58:36 +01:00
Kai Fricke
a92ce9721c
[air] Example to run tuning and analyze results (#24602)
This is a notebook showing how to tune an xgboost model and analyze the results.

Also adds a `get_dataframe()` method to `ResultsGrid` to fetch the trial results.

Depends on #24483 for toctree.
2022-05-13 15:22:36 +01:00
Max Pumperla
cd5218f831
[docs] Tune examples better navigation, minor fixes (#24733)
Replaces #24225 and adds example navigation

Signed-off-by: Max Pumperla <max.pumperla@googlemail.com>
2022-05-13 14:39:18 +01:00
Kai Fricke
9e21e392ee
[air/doc] Add examples doc structure (#24770)
Add the basic toc/structure for Ray AIR examples
2022-05-13 11:56:34 +01:00
Richard Liaw
ce5a27e31b
[docs] Add initial AIR documentation (#24483)
Co-authored-by: Kai Fricke <krfricke@users.noreply.github.com>
Co-authored-by: Eric Liang <ekhliang@gmail.com>
2022-05-13 01:29:59 -07:00
Chen Shen
30f370bf1f
Revert "[core] Move reconnection to RPC layer for GCS client. (#24330)" (#24762)
This reverts commit c427bc54e7.
2022-05-13 00:07:21 -07:00
Chen Shen
82cdb0d8f1
fix lint (#24755)
There is a linter failure caused by previous revert #24741. fix in this PR.
2022-05-12 23:22:57 -07:00
Qing Wang
2627c7b5bc
[Core] Use async post instead of PostBlocking for concurrency group executor. (#24293)
Aiming to:
1. addressing the bug about concurrency group, see #19593
2. improving the stability of the ray call latency perf in online applications.

we're proposing using async post instead of `PostBlocking` in threadpool.

Note that since we have already had back pressure in the caller side, I believe this change is safe to merge and it doesn't break any behavior.
2022-05-13 11:30:52 +08:00
Qing Wang
b7cc601024
[Ray Collective] Add prefixes for original key to isolate gloo info in different jobs and different groups. (#24290)
This PR uses the job id and group name as the prefix for storing meta information, aiming to provide the isolate ability for different jobs and different groups.

Before this PR, we can't use 2 groups in 1 Ray cluster, and we can not rerun a collective job once the last one is failed at initializing.
2022-05-13 10:06:16 +08:00
Qing Wang
3208cfc167
[Runtime env][Java] Add unit tests for specifying jars for tasks. (#24712)
It seems that we have already supported specifying java jars for normal tasks, this PR only needs to add unit tests for that.
2022-05-13 09:46:20 +08:00
Stephanie Wang
c62e00ed6d
[dataset] Use polars for sorting (#24523)
Polars is significantly faster than the current pyarrow-based sort. This PR uses polars for the internal sort implementation if available. No API changes needed.

On my laptop, this makes sorting 1GB about 2x faster:

without polars

$ python release/nightly_tests/dataset/sort.py --partition-size=1e7 --num-partitions=100
Dataset size: 100 partitions, 0.01GB partition size, 1.0GB total
Finished in 50.23415923118591
...
Stage 2 sort: executed in 38.59s

        Substage 0 sort_map: 100/100 blocks executed
        * Remote wall time: 864.21ms min, 1.94s max, 1.4s mean, 140.39s total
        * Remote cpu time: 634.07ms min, 825.47ms max, 719.87ms mean, 71.99s total
        * Output num rows: 1250000 min, 1250000 max, 1250000 mean, 125000000 total
        * Output size bytes: 10000000 min, 10000000 max, 10000000 mean, 1000000000 total
        * Tasks per node: 100 min, 100 max, 100 mean; 1 nodes used

        Substage 1 sort_reduce: 100/100 blocks executed
        * Remote wall time: 125.66ms min, 2.3s max, 1.09s mean, 109.26s total
        * Remote cpu time: 96.17ms min, 1.34s max, 725.43ms mean, 72.54s total
        * Output num rows: 178073 min, 2313038 max, 1250000 mean, 125000000 total
        * Output size bytes: 1446844 min, 18793434 max, 10156250 mean, 1015625046 total
        * Tasks per node: 100 min, 100 max, 100 mean; 1 nodes used

with polars

$ python release/nightly_tests/dataset/sort.py --partition-size=1e7 --num-partitions=100
Dataset size: 100 partitions, 0.01GB partition size, 1.0GB total
Finished in 24.097432136535645
...
Stage 2 sort: executed in 14.02s

        Substage 0 sort_map: 100/100 blocks executed
        * Remote wall time: 165.15ms min, 595.46ms max, 398.01ms mean, 39.8s total
        * Remote cpu time: 349.75ms min, 423.81ms max, 383.29ms mean, 38.33s total
        * Output num rows: 1250000 min, 1250000 max, 1250000 mean, 125000000 total
        * Output size bytes: 10000000 min, 10000000 max, 10000000 mean, 1000000000 total
        * Tasks per node: 100 min, 100 max, 100 mean; 1 nodes used

        Substage 1 sort_reduce: 100/100 blocks executed
        * Remote wall time: 21.21ms min, 472.34ms max, 232.1ms mean, 23.21s total
        * Remote cpu time: 29.81ms min, 460.67ms max, 238.1ms mean, 23.81s total
        * Output num rows: 114079 min, 2591410 max, 1250000 mean, 125000000 total
        * Output size bytes: 912632 min, 20731280 max, 10000000 mean, 1000000000 total
        * Tasks per node: 100 min, 100 max, 100 mean; 1 nodes used

Related issue number

Closes #23612.
2022-05-12 18:35:50 -07:00
Jiajun Yao
8f36e32438
Make sure ray.init() works after AutoscalingCluster.start() (#24613)
Some tests relying on AutoScalingCluster are flaky because ray.init() after AutoscalingCluster.start() is not guaranteed to work. Sometimes, it cannot find any running ray instances.
2022-05-12 17:22:07 -07:00
Jian Xiao
c9f31af27f
[CI] Fix Windows wheel build (#24748) 2022-05-12 16:23:50 -07:00
Chen Shen
02042e1305
[Core] Revert "[Core] Batch PinObjectIDs requests from Raylet client (#24322)" and "[Core] rename PinObjectIDs to PinObjectID (#24451)" (#24741)
we noticed performance regression for nightly test shuffle_1tb_5000_partitions. concretely the test previously takes 1h10m to finish but now it takes more than 2h30minutes.

after investigation we believe mostly likely 5a82640 caused the regression.

here is the run before 5a82640: https://console.anyscale.com/o/anyscale-internal/projects/prj_SVFGM5yBqK6DHCfLtRMryXHM/clusters/ses_1ejykCYq9BnkC5v8ZJjrqc2b?command-history-section=command_history
here is the run after 5a82640:
https://console.anyscale.com/o/anyscale-internal/projects/prj_SVFGM5yBqK6DHCfLtRMryXHM/clusters/ses_Lr5N8jVRdHCWJWYA2SRaUkzZ?command-history-section=command_history
2022-05-12 16:17:40 -07:00
Jiajun Yao
0a0c52e351
[Doc] Improve doc for task locality aware scheduling (#24717) 2022-05-12 13:42:48 -07:00
Steven Morad
ebe6ab0afc
[RLlib] Bandits use TrainerConfig objects. (#24687) 2022-05-12 22:02:15 +02:00
Stephanie Wang
2fd888ac9d
[core] Skip windows test for adjusting worker OOM score (#24744)
Fixes CI failure introduced in #24623.
2022-05-12 13:01:50 -07:00
Patrick Ames
e2ee2140f9
[Datasets] Add documentation for bulk parquet read API and file metadata providers. (#24354)
API doc updates for #23179 and #24094. All data docs related to #23179 should be up-to-date once this PR and #24203 are merged.
2022-05-12 10:19:33 -07:00
Max Pumperla
42e877d2f7
[docs] full results on enter, fixes #24519 (#24722)
Signed-off-by: Max Pumperla <max.pumperla@googlemail.com>
2022-05-12 10:00:35 -07:00
Archit Kulkarni
dae7842ac5
[runtime env] Remove plugin name from internal URI (#24706)
This was a holdover from when local resources for URIs were deleted directly from the runtime env agent, and the URI name itself needed to store the information of which plugin it corresponded to so the appropriate plugin's `delete()` function could be called.  After the URI reference refactor, I don't think this is needed anymore.
2022-05-12 11:40:03 -05:00
Amog Kamsetty
c4bf38daa6
[AIR] Add AIR install extra (#24701)
Closes #23439
2022-05-12 09:25:52 -07:00