Commit graph

12476 commits

Author SHA1 Message Date
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
Edward Oakes
fb71743935
[serve] Convert "End-to-end Tutorial" to "Getting Started" (#24690) 2022-05-12 08:44:43 -07:00
Jiajun Yao
628f886af4
Don't show usage stats prompt in dashboard if prompt is disabled (#24700) 2022-05-12 07:55:28 -07:00
Max Pumperla
6a6c58b5b4
[RLlib] Config objects for DDPG and SimpleQ. (#24339) 2022-05-12 16:12:42 +02:00
mwtian
a55f853006
[GCS] ask user to run sudo lsof when there is a port conflict #24612
Otherwise, users may not be able to find processes occupying a port (e.g. 6379) running under different users. One example is https://discuss.ray.io/t/ray-start-head-unable-to-connect-to-gcs/5619/9
2022-05-12 04:46:06 -07:00
Antoni Baum
8af1cc1ba1
[Tune] Fix Jupyter reporter with older IPython (#24695)
Fixes `JupyterNotebookReporter` not working with older IPython versions (eg. 5.5.0, installed on Google Colab).
2022-05-12 12:27:35 +01:00
Kai Fricke
b0fa9d6766
[air] Example for Comet ML (#24603)
After #24459, this PR will add similar support for model artifact saving and an example for experiment tracking with Ray AIR for Comet ML.
2022-05-12 12:12:30 +01:00
Kai Fricke
fef1586922
[air/tune] Add get_dataframe() method to result grid, fix config flattening (#24686)
Adds `get_dataframe()` method to pass through experiment analysis to result grid. Also fixes config dictionary returns which previously did not flatten the dict (even though the docstring suggested it would)
2022-05-12 10:02:19 +01:00
Jian Xiao
5f347a6d70
Ubreak the windows wheel building (#24699)
Unbreak the windows wheel building.
2022-05-12 00:23:56 -07:00
Guilherme
bb0bcbace0
[docs] Fix example in ray-get-loop.rst (#24609) 2022-05-12 00:05:57 -07:00
Qing Wang
259661042c
[runtime env] [java] Support jars in runtime env for Java (#24170)
This PR supports setting the jars for an actor in Ray API. The API looks like:
```java
class A {
    public boolean findClass(String className) {
      try {
        Class.forName(className);
      } catch (ClassNotFoundException e) {
        return false;
      }
      return true;
    }
}

RuntimeEnv runtimeEnv = new RuntimeEnv.Builder()
    .addJars(ImmutableList.of("https://github.com/ray-project/test_packages/raw/main/raw_resources/java-1.0-SNAPSHOT.jar"))
    .build();
ActorHandle<A> actor1 = Ray.actor(A::new).setRuntimeEnv(runtimeEnv).remote();
boolean ret = actor1.task(A::findClass, "io.testpackages.Foo").remote().get();
System.out.println(ret); // true
```
2022-05-12 09:34:40 +08:00
Yi Cheng
c427bc54e7
[core] Move reconnection to RPC layer for GCS client. (#24330)
This PR support reconnection of the GCS client in gRPC channel layer. Previously this is implemented in the application layer:

- Health check is in the application layer by starting a new channel.
- Monitor the GCS address change and do resubscribe.
- Always retry the failed request and do reconnection in case of a failure.

However, there are several issues with this approach:

- We need service to discover for GCS address change. 
- Monitor is too heavy since it always creates a channel.
- Reconnection is a blocking call that prevents the code from running.

This new approach moves the reconnection to gRPC layer directly to fix these issues.

- DNS name resolution is done by gRPC so we don't need to write this.
- Health check is done by checking the channel state.
- Queue the failed call and retry once GCS is up so that it's not a blocking call.
2022-05-11 16:27:22 -07:00
Sihan Wang
c5bfe1d694
[Serve] Add deployment graph cookbook (#24524) 2022-05-11 16:24:55 -07:00
Stephanie Wang
6ea825c294
[core] Adjust worker OOM scores to prioritize the raylet during memory pressure (#24623)
Under heap memory pressure, the raylet is often killed by the OS OOM killer. This is bad because it can cause whole system crashes and it is difficult to find the error afterwards. This PR adjusts the OOM score for any workers that the raylet spawns so that the OOM killer will hopefully prioritize killing those instead of the raylet.
2022-05-11 15:32:23 -07:00
Antoni Baum
47edb497c5
[data] More informative exceptions in block impl (#24665) 2022-05-11 14:53:40 -07:00
Archit Kulkarni
93d61b6d48
[runtime_env] Add debug prints to serve:test_runtime_env which is flaky (#24670) 2022-05-11 16:03:46 -05:00
Sebastián Ramírez
2842b074bb
📝 Update structure in development docs (#24377)
This is a small update for the structure of the docs about building Ray from source.

My idea was to isolate steps that are shared and then steps required per platform/system. Also consolidating the instructions to clone with git, install, directory structure, etc.

I'm still figuring out the building steps (installing the dependencies for docs in an M1), but I wanted to start the draft right away.
2022-05-11 15:47:54 -05:00
Chris K. W
11650b56e2
[client] Chunk ClientTask's (#24555)
Adds support for chunking large schedule calls. Needed to support ray.remote calls with more than 2GiB of arguments.

Deprecates the args and kwargs fields of ClientTask and replaces them with a data field that contains a tuple of the serialized args and kwargs fields, which can be chunked and reassembled more easily using the same logic as PutRequest's.
2022-05-11 13:37:52 -07:00
YoelShoshan
5a43b075bc
Add screen custom log file support (#24461)
A simple way to redirect remote job output to a custom file is extremely useful.
Especially if it does not require any code changes for the user, and especially if it captures all output and not limited only to python logging.

When the PR will be merged, the user will be able to do the following (for example):

ray submit some_cluster_config.yaml example_runnable_script.py --screen --extra-screen-args "-Logfile /gpfs/usr/someone/ray/output_log.txt"
which will, in addition to creating the screen session, also output (continuously) to custom text file.
It allows additional flexibility, for example, the user will be able to choose custom screen session name etc.
2022-05-11 12:16:47 -07:00
Dmitri Gekhtman
c6d3ffb133
[KubeRay][NodeProvider] Ignore pods with deletionTimestamp. (#24590)
Closes #24514 by filtering out pods with metadata.deletionTimestamp set in the KuberayNodeProvider.

Adds some e2e test logic to confirm reasonable behavior when Ray worker pod termination hangs.

Also, a bit of code cleanup -- defining constants, adding to doc strings, etc.
2022-05-11 10:49:34 -07:00
Makan Arastuie
5e23d9e298
[Tune] Bug fix - HEBOSearch - accept iterables as a config search space (#24678)
HEBOSearch algorithm currently fails if the config search space contains a categorical parameter where each category is an iterable.

For instance, choosing the hidden layers of a NN:
` hyperparam_search_space = {'hidden_sizes': tune.choice([[512, 256, 128], [1024, 512, 256]])}`

This is due to the creation of the Pandas DataFrame with HEBO suggested parameters, without explicitly telling Pandas that the hyper-parameter suggestion is a single row of data while the index is being defined as a single row. This results in an exception such as "ValueError: Length of values (3) does not match length of index (1)".

Co-authored-by: Makan Arastuie <makan.arastuie@seagate.com>
2022-05-11 18:29:50 +01:00
Antoni Baum
e95207a298
[data] Expose drop_last in to_tf (#24666) 2022-05-11 09:46:08 -07:00
Antoni Baum
aaead7e3b3
[AIR] Add load_checkpoint functions to Trainers (#24518)
Co-authored-by: Amog Kamsetty <amogkam@users.noreply.github.com>
2022-05-11 09:45:50 -07:00
Yi Cheng
a7d552ca25
[ci] Fix syncer staging tests error (#24681)
The staging tests failed due to using the wrong file. This PR fixed it.

https://buildkite.com/ray-project/ray-builders-branch/builds/7458#d6c28480-4c99-4a69-908c-9b0b5af9ce1f
2022-05-10 23:23:50 -07:00
Eric Liang
4c6fccafe6
Add a small timeline delay (#24673) 2022-05-10 21:04:40 -07:00
Eric Liang
2b598ca440
[doc] Improve the object reference documentation (#24636) 2022-05-10 18:39:16 -07:00
Jiajun Yao
1daad65568
[Doc] Add doc for usage stats collection (#24522) 2022-05-10 17:18:49 -07:00
Simon Mo
791ce22feb
[CI] Add conditional build to macOS pipeline (#24671) 2022-05-10 16:49:03 -07:00
Simon Mo
217939d441
[Serve] Mute Sync Handle Warnings in DAGHandle (#24629) 2022-05-10 16:03:09 -07:00
Zhe Zhang
909d463552
[docs] Fix import error in Ray Data "getting started" (#24424)
We did `import pandas as pd` but here we are using it as `pandas`
2022-05-10 15:46:15 -07:00
Simon Mo
6760fe0121
[Serve][Doc] Convert Serve doc sources from rst to myst (#24657) 2022-05-10 14:04:17 -07:00
Yi Cheng
6c60dbb242
[scheduler][6] Integrate ray with syncer. (#23660)
The new syncer comes with the feature of long-polling and versioning. This PR integrates it with ray.
2022-05-10 13:12:22 -07:00
Antoni Baum
04e16f70a3
[Datasets] [Docs] Add a warning about from_huggingface (#24608)
Adds a warning to docs about the intended use of from_huggingface.
2022-05-10 13:08:25 -07:00
Amog Kamsetty
c87c50b156
[Tune] Raise better error messages for failures with ResultGrid.get_best_result (#24610)
Co-authored-by: Kai Fricke <krfricke@users.noreply.github.com>
2022-05-10 13:06:44 -07:00
Artur Niederfahrenhorst
95d4a83a87
[RLlib] R2D2 Replay Buffer API integration. (#24473) 2022-05-10 20:36:14 +02:00
Simon Mo
962e839f13
[Serve] Enable SO_REUSEPORT beyond hasattr check (#22743) 2022-05-10 11:24:23 -07:00
Balaji Veeramani
c9cd4a75e8
[AIR] Fix Categorizer.__repr__ attribute error (#24640)
__repr__ fails because stats_ attribute is not assigned until _fit is called.
2022-05-10 11:12:49 -07:00
Sven Mika
44a51610c2
[RLlib] SlateQ config objects. (#24577) 2022-05-10 20:07:18 +02:00
Amog Kamsetty
a36e2a8f51
[Tune] Deprecate DistributedTrainableCreator (#24453)
Fully deprecate DistributedTrainableCreator for Ray 2.0

Closes #24453
2022-05-10 11:06:43 -07:00
Sven Mika
be31602983
[RLlib] IMPALAConfig small fix (double defined config key). (#24547) 2022-05-10 19:38:00 +02:00