Commit graph

12969 commits

Author SHA1 Message Date
Antoni Baum
9085ea23ab
[AIR] Improve BatchPredictor performance & disk usage (#25101)
This PR attempts to improve `BatchPredictor` performance with directory checkpoints by avoiding unnecessary filesystem operations.

In order to achieve that, the `Checkpoint` class is changed to always use a canonical path for the temporary directory if the Checkpoint has been created form an object ref. The directory is filelocked to prevent concurrent writes.

Tests have been addded.

Co-authored-by: Kai Fricke <krfricke@users.noreply.github.com>
2022-06-01 21:45:39 +02:00
Simon Mo
61099faa58
[CI] Fix dashboard tests broken due to dep version upgrade (#25357) 2022-06-01 12:14:49 -07:00
Sihan Wang
4ad75056eb
[Serve][Doc] Add http endpoint for dag pattern doc (#25243) 2022-06-01 11:30:42 -07:00
Eric Liang
905258dbc1
Clean up docstyle in python modules and add LINT rule (#25272) 2022-06-01 11:27:54 -07:00
Jiao
97190e4574
[Deployment Graph] Remove _execute_impl and json serde code for DeploymentNode IR (#25331) 2022-06-01 11:26:56 -07:00
Eric Liang
517f78e2b8
[minor] Add a job submission hook by env var (#25343) 2022-06-01 11:15:43 -07:00
Yi Cheng
8c70f02652
[build] Fix the install-bazel.sh (#25251)
install-bazel.sh is broken due to the path is not correctly set. This PR fixed it.
2022-06-01 10:52:31 -07:00
SangBin Cho
ca75570f51
Revert "Revert "Revert "[dataset] Use polars for sorting (#24523)" (#24781)" (#25173)" (#25341)
This reverts commit 61676f26d3.
2022-06-01 10:49:12 -07:00
Chen Shen
49b8bbfd5e
[Core] Fix node affinity strategy when resource is empty (#25344)
Why are these changes needed?
Today, Ray scheduler always pick a random node if the resource requirement is empty, regardless of scheduling policy/strategy.

However, for node affinity scheduling policy, we should not pick random policy but try to stick to the node affinity constraints.
2022-06-01 10:38:48 -07:00
Zhe Zhang
52774e8460
Use bold font consistently on landing page (#25318) 2022-06-01 11:44:46 -04:00
code-review-doctor
d05f847778
[tune] Missing f prefix on f-strings fix (#24154)
Fix issue probably-meant-fstring found at https://codereview.doctor
2022-06-01 16:57:45 +02:00
siavash119
21f1e8a5c6
[Core] Use newly pushed actor for existing pending tasks (#24980)
Newly pushed actors will never be used with existing pending submits, so the worker will not be used to speed up existing tasks. If _return_actor is called at the end of push instead, the actor is pushed to _idle_actors and immediately used if there are pending submits.
2022-06-01 07:51:02 -07:00
SangBin Cho
44483a6c99
[Test][Windows] Skip test metrics.py in Windows (#25287)
Skip the flaky test_metrics on Windows
2022-06-01 05:37:29 -07:00
SangBin Cho
3385d19cbb
Revert "use an agent-id rather than the process PID (#24968)" (#25342)
This reverts commit 02f220b755.

<!-- Thank you for your contribution! Please review https://github.com/ray-project/ray/blob/master/CONTRIBUTING.rst before opening a pull request. -->

<!-- Please add a reviewer to the assignee section when you create a PR. If you don't have the access to it, we will shortly find a reviewer and assign them to your PR. -->

## Why are these changes needed?

Looks like this commit makes `test_ray_shutdown` way more flaky.  cc @mattip for further investigation after revert
<img width="760" alt="Screen Shot 2022-05-31 at 11 14 48 PM" src="https://user-images.githubusercontent.com/18510752/171339737-f48e6e90-391a-4235-bfac-a0aa0e563eb7.png">


## Related issue number

<!-- For example: "Closes #1234" -->

## Checks

- [ ] I've run `scripts/format.sh` to lint the changes in this PR.
- [ ] I've included any doc changes needed for https://docs.ray.io/en/master/.
- [ ] I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
- Testing Strategy
   - [ ] Unit tests
   - [ ] Release tests
   - [ ] This PR is not tested :(
2022-06-01 05:35:30 -07:00
Sven Mika
18c03f8d93
[RLlib] A2C + A3C move to algorithms folder and re-name into A2C/A3C (from ...Trainer). (#25314) 2022-06-01 09:29:16 +02:00
valtab
288a81b42e
[Train]fix train callback nested recusive calling issue (#25015)
Move  initialization for `callback.results_preprocessor` property to `callback.start_training()` method which only be called once while training start, currently initialization is triggered per message.
2022-05-31 20:09:01 -07:00
Eric Liang
acf0da63b6
[data] [API] Remove unnecessary public argument in fully_executed() (#25267) 2022-05-31 16:48:35 -07:00
Eric Liang
5545bc5f45
[data] Fix pipeline pre-repeat caching, and improve the documentation (#25265)
Currently the canonical way to cache a pipeline and repeat it: ds.fully_executed().repeat() crashes. Add a test, fix the docs and stats printing here.
2022-05-31 16:01:00 -07:00
shrekris-anyscale
7754645c83
Revert "[Serve] Deploy Serve deployment graphs via REST API (#25073)" (#25330)
This reverts commit 47709b3300.
2022-05-31 15:37:55 -07:00
Naka Masato
897cb5d778
[Serve][Doc] Update batch.md to fix typo(#25270) 2022-05-31 15:04:18 -07:00
shrekris-anyscale
47709b3300
[Serve] Deploy Serve deployment graphs via REST API (#25073) 2022-05-31 10:57:08 -07:00
Eric Liang
00a9dfb5d5
[data] [API] Add max_epoch argument to iter_epochs() for AIR 2022-05-31 10:53:49 -07:00
Philipp Moritz
f61997d90b
Fix typing of gcs_utils.py and add check to CI (#25285) 2022-05-31 10:45:42 -07:00
SangBin Cho
a2e33e1226
[Core] add-better-error-msg-on-node-failure (#25269)
This enhances the error message printed to the driver when the node is unexpectedly failed
2022-05-31 08:11:14 -07:00
Eric Liang
c93e37aba5
[Datasets] Fix byte size calculation for non-trivial tensors (#25264)
The range datasource was incorrectly calculating tensor sizes if the dimensions != (1,).

Broken out from https://github.com/ray-project/ray/pull/25167/files
2022-05-31 07:30:41 -07:00
Eric Liang
65f908ea31
[Datasets] Dataset pipeline window by bytes fails when read fusion disabled (#25266)
This fixes AttributeError: 'list' object has no attribute 'schema' when read fusion is flag disabled and pipelines are windowed by bytes.

Broken out from https://github.com/ray-project/ray/pull/25167/files
2022-05-31 07:23:23 -07:00
Sven Mika
a0ab4db58a
[RLlib] Make Kai (krfricke) RLlib code owner. (#25315) 2022-05-31 15:08:26 +02:00
Kai Fricke
1ed8bd0345
[release/xgboost/lightgbm] Fix app config dependency install overwriting ray (#25307)
This line:

```
pip3 install -U --force-reinstall xgboost xgboost_ray lightgbm_ray petastorm
```

also re-installs the dependencies of these packages, and the `--force-reinstall` means we overwrite existing ones. This leads us to re-install the latest ray release, overwriting the wheels to be tested:

```
[INFO] 5/31/2022, 12:12:16 AM: Successfully installed ... ray-1.12.1 ...
[INFO] 5/31/2022, 12:12:17 AM: * Executed RUN pip3 install -U --force-reinstall xgboost xgboost_ray petastorm  (ff6ae9f9)
```

Instead, we should use `--no-deps` to avoid re-installing dependencies. Also, the wheels sanity check is moved to after installing additional packages in order to catch these errors earlier.
2022-05-31 13:46:17 +02:00
Pamphile Roy
2da2cb8cdf
Point to latest contributing doc (#25149)
Pointing to the latest documentation for contributor is important as the workflow is always evolving. E.g. the installation instructions for bazel are not representatives of the current state on release vs master. Hence, I propose to update contribution links in the documentation to point to the latest state on master.
2022-05-31 10:13:20 +02:00
Sven Mika
94557e3095
[RLlib] Apex-DDPG TrainerConfig objects. (#25279) 2022-05-30 19:45:38 +02:00
Sven Mika
c5edd82c63
[RLlib] MB-MPO TrainerConfig objects. (#25278) 2022-05-30 17:33:01 +02:00
SangBin Cho
c9cec443dd
[State Observability] Improve existing state output (#25184)
NOTE: This is not the official API improvement. But this will help dogfooding the feature before finalizing the output.

This PR improves the output state/metadata of existing state APIs.
2022-05-30 07:25:28 -07:00
Sven Mika
f75ede1b81
[RLlib] MA-DDPG TrainerConfig objects. (#25255) 2022-05-30 15:38:24 +02:00
Sven Mika
30f6fc340b
[RLlib] AlphaZero TrainerConfig objects. (#25256) 2022-05-30 15:37:58 +02:00
Sven Mika
d95009a3ac
[RLlib] Vectorized envs: Gracefully handle sub-environments failing by restarting them (if configured so). (#24967) 2022-05-28 10:50:03 +02:00
Sven Mika
ab6c3027e5
[RLlib] A2/3C policy sub-classing schema. (#25078) 2022-05-28 09:54:47 +02:00
Stephanie Wang
009df65a57
[core] Fix bug in spilling objects that have empty data field (#25192)
Ray sometimes stores errors as the object value in shared memory. These objects have no data since the error is stored in the metadata field. #25085 describes a bug where these objects fail to spill because the IO worker assumes that the data field must be non-empty. This would cause head-of-line blocking for any other objects to spill and cause the whole job to hang. This PR fixes the issue by spilling these objects anyway.
Related issue number

Closes #25085.
2022-05-27 17:18:45 -07:00
Balaji Veeramani
f9e7b55123
[AIR] Add Torch image example (#24618) 2022-05-27 16:47:21 -07:00
Balaji Veeramani
fb22bc5ae3
[AIR] Fix bug where TensorflowPredictor.predict creates extra axis (#25199) 2022-05-27 13:46:12 -07:00
Edward Oakes
4ad55f640d
[runtime_env] Clarify in docs that python and ray versions must match cluster (#25245)
Follow up from a few users who were confused by this.
2022-05-27 14:24:48 -05:00
Stephanie Wang
61676f26d3
Revert "Revert "[dataset] Use polars for sorting (#24523)" (#24781)" (#25173)
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-27 10:43:51 -07:00
Jiao
820cf4fdca
[Deployment Graph] Simplify our use of DeploymentSchema (#25202) 2022-05-27 10:35:32 -07:00
Balaji Veeramani
692335440b
[AIR] Directly convert TorchPredictor ndarray inputs to tensors (#25190)
If you pass a multidimensional input to `TorchPredictor.predict`, AIR errors. For more information about the error, see #25194.

Co-authored-by: Amog Kamsetty <amogkamsetty@yahoo.com>
2022-05-27 09:46:47 -07:00
Sven Mika
163fa81976
[RLlib] Discussion 6060 and 5120: auto-infer different agents' spaces in multi-agent env. (#24649) 2022-05-27 14:56:24 +02:00
Rohan Potdar
ab81c8e9ca
[RLlib]: Rename input_evaluation to off_policy_estimation_methods. (#25107) 2022-05-27 13:14:54 +02:00
Yi Cheng
0bc04f263e
[core] Remove gcs addr updater in core worker. (#24747)
Since we are using domain name resolution to get the new address of GCS, gcs addr updator is not necessary any more. This PR removed that.
2022-05-26 23:38:19 -07:00
Matti Picus
02f220b755
use an agent-id rather than the process PID (#24968)
When using ray inside a virtualenv on windows, python.exe as reported by sys.executable is a PEP397 launcher to the actual python as reported by os.getpid():

>>> import sys, os, psutil
>>> >>> print(sys.executable)
C:\temp\issue24361\Scripts\python.exe
>>> os.getpid()
2208
>>> child = psutil.Process(2208)
>>> child.cmdline()
['C:\\oss\\CPython38\\python.exe']
>>> child.parent().cmdline()
['C:\\temp\\issue24361\\Scripts\\python.exe']
>>> child.parent().pid
6424
When the agent_manager launches the agent process via Process::Process(), it gets the PID of the launcher process (6424), which is what is expected as an ID when registering the agent in the gRPC callback. But inside agent.py, the child process reports the PID via os.getpid(), which is 2208, and this is the wrong PID to register the agent.

The solution proposed here is another version of #24905 that creates a int agent_id = rand(); before starting the python process, and passes the agent_id to the process.
2022-05-26 22:10:35 -07:00
shrekris-anyscale
3234fd3db4
[CI] Bump Bazel version to 4.2.2 (#24242) 2022-05-26 17:09:40 -07:00
Balaji Veeramani
f623c607f2
[AIR] Build model in TensorflowPredictor.predict (#25136)
`TensorflowPredictor.predict` doesn't work right now. For more information, see #25125.

Co-authored-by: Amog Kamsetty <amogkamsetty@yahoo.com>
2022-05-26 16:42:09 -07:00
Antoni Baum
087e356613
[CI] Make certain AIR tests run (#25229)
Fixes certain AIR tests not running and fixes broken tests.
2022-05-26 15:49:39 -07:00