Commit graph

13504 commits

Author SHA1 Message Date
mwtian
6acd0a4c9b
Allow grpcio >= 1.48 (#26765)
The previously observed Python grpc warning / logspam seems to have been fixed for grpcio >= 1.48. And users would like to upgrade beyond grpcio 1.43 for better M1 support. However, grpcio 1.48 has not been released yet, so there is still a risk this change needs to be reverted if any problem is discovered later with Ray nightly + grpcio 1.48.
2022-07-21 10:03:41 -07:00
matthewdeng
728e2b36d6
[train] set auto_transfer cuda device (#26819)
This sets the CUDA Stream on the correct device (and not the default one) when calling train.torch.prepare_data_loader(auto_transfer=True).

Signed-off-by: Matthew Deng <matt@anyscale.com>
2022-07-21 09:50:32 -07:00
Jiajun Yao
4da78c489a
Revert "[log_monitor] Always reopen files (#26730)" (#26831) 2022-07-21 08:40:15 -07:00
Archit Kulkarni
1aad5d2136
[Ray Client] [runtime env] Skip env hook in Ray client server (#26688)
Previously, using an env_hook with Ray Client would only execute the env_hook on the server side (a Ray cluster machine).  An env_hook defined on the client side would never be executed.  But the main problem is with the server-side env_hook.

Consider the simple example where the env_hook rewrites the `working_dir` or `py_modules` with a local directory.

Currently, when using Ray Client, the `working_dir` and `py_modules` are uploaded to the GCS before `ray.init()` is called on the server.   This is a fundamental constraint because the server-side driver script needs to be able to import modules from the `working_dir` or `py_modules`.  After the upload, these fields are overwritten with the URIs for the uploaded packages.  

After this happens, on the server side Ray expects the `working_dir` and `py_modules` fields to only contain GCS URIs.  So overwriting `working_dir` to be a local directory after this occurs doesn't make sense (and Ray will rightfully throw a RuntimeEnv validation error here.)

If a cluster is set up with such an env hook, it will only work when `ray.init()` is called by the user on a cluster machine; i.e. it will only work in non-Ray Client cases.  If a user ever wants to use Ray Client with this cluster, it will be broken with no way to disable the env hook.  To remedy this, this PR disables the execution of the env_hook when using Ray Client.

We can consider adding support in the future for env_hooks to be executed on the client side when using Ray Client.
2022-07-21 10:10:11 -05:00
Jiajun Yao
3a48a79fd7
[Usage stats] Report total number of running jobs for usage stats purpose. (#26787)
- Report total number of running jobs
- Fix total number of nodes to include only alive nodes

Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
2022-07-21 01:37:58 -07:00
Tao Wang
62288724b2
[Python]More efficient node_table() in state.py (#26760)
This picks up https://github.com/ray-project/ray/pull/24088
The `get_node_table` already has resources of nodes, so we don't need to invoke `get_node_resource_info` for every node again. This change will reduce lots of rpc calls and make the api more efficient.
2022-07-21 10:35:46 +08:00
Balaji Veeramani
ac1d21027d
[AIR] Add framework-specific checkpoints (#26777) 2022-07-20 19:33:27 -07:00
Richard Liaw
9f0d35b97c
[air/docs] add tensorflow benchmarks into table (#26800) 2022-07-20 17:12:40 -07:00
Ricky Xu
6ee37d4ad7
[Core][State Observability] Fix is_alive column with wrong column type that breaks filtering (#26739)
is_alive column of the WorkerState has wrong column type that breaks filtering on is_alive
2022-07-20 16:38:15 -07:00
Alex Wu
9e7ddddff7
[log_monitor] Always reopen files (#26730)
This PR prevents the log monitor for keeping files open for long periods of time. In settings in which the autoscaler and head node are not tightly coupled, leaving files open implies that the inode for a file never changes, but depending on how fs synchronization between the autoscaler and head node containers works, the inode could change. Thus, we should keep try reopening files.

This is done via setting max open files to 1, so that it's easy to revert this behavior.

Co-authored-by: Alex <alex@anyscale.com>
2022-07-20 16:17:25 -07:00
Archit Kulkarni
e043f49957
[Serve] [CI] Increase instance size and add debug log for autoscaling_multi_deployment release test (#26732) 2022-07-20 16:13:36 -07:00
Eric Liang
d6f29eb9ca
[docs] Mark pipelined prediction as experimental for now (#26792) 2022-07-20 15:31:19 -07:00
Olaf Lipinski
8271406a04
[RLLib] Fix MultiDiscrete not being one-hotted correctly (#26558)
Co-authored-by: Jun Gong <jungong@anyscale.com>
2022-07-20 15:25:53 -07:00
Kai Fricke
7f908c4086
Revert "[ci] fix determine_tests_to_run.py by finding merge base (#26790)" (#26799)
This reverts commit 7cf4f8e069.
2022-07-20 22:12:13 +01:00
Kai Fricke
2e35d47bd2
[air/train/benchmark] Add TF GPU 4x4 benchmark (#26776) 2022-07-20 14:07:51 -07:00
xwjiang2010
e7957f4a3e
[air] update offline/online rl example and enable them. (#26786) 2022-07-20 14:06:03 -07:00
Dmitri Gekhtman
d2ef342130
Try to create autoscaler log directory. (#26748)
Why are these changes needed?
Together with ray-project/kuberay#391, this should address #26064

Have the autoscaler try to make the Ray log directory before setting up logging.
ray-project/kuberay#391 should be good enough for this, but this PR makes things safer in case the KubeRay user overrides log mounts or something like that.
2022-07-20 14:00:37 -07:00
Siyuan (Ryans) Zhuang
55589d578c
[Core] Enhance docs of options (#26773)
* enhance docs

Signed-off-by: Siyuan Zhuang <suquark@gmail.com>
2022-07-20 13:30:36 -07:00
Siyuan (Ryans) Zhuang
0063d94166
[Core] Make "GetTimeoutError" a subclass of "TimeoutError" (#26771)
I am surprised by the fact that `GetTimeoutError` is not a subclass of `TimeoutError`, which is counter-intuitive and may discourage users from trying the timeout feature in `ray.get`, because you have to "guess" the correct error type. For most people, I believe the first error type in their mind would be `TimeoutError`.

This PR fixes this.
2022-07-20 14:37:39 -05:00
Sebastián Ramírez
8a45425e7b
Add extra types for datasets (#26648)
 Add extra types for datasets

Why are these changes needed?
By using Protocols for the definition of callable classes, the type parameter in datasets can be preserved for the methods that work on rows.

This allows getting typing information, editor support, in transformed datasets. It also enables editor support, including autocompletion, inside of the parameters inside of lambdas passed to things like ds.map() and ds.filter().

For example, after several transformations, ds.filter() still gets autocompletion for the x parameter in the lambda, the editor knows it's an int.

https://user-images.githubusercontent.com/1326112/179423609-6d77da23-5f5e-47ce-a17f-6eb0d06d82d0.png

I see there was a TODO comment to do this trick with the protocol, so Clark already had this idea. 💡 The good news is that it's not necessary to wait until only Python 3.8 is supported by using typing_extensions.
2022-07-20 12:16:24 -07:00
kourosh hakhamaneshi
aec79afda1
[RLlib] Fixes CRR flakeyness (#26770) 2022-07-20 12:08:57 -07:00
Avnish Narayan
5433c11650
[RLlib] Pin gym to 0.23.1 (#26752) 2022-07-20 11:49:01 -07:00
Kai Fricke
7cf4f8e069
[ci] fix determine_tests_to_run.py by finding merge base (#26790)
We previously found all differences between origin/master and the PR branch, which includes forward changes if origin/master is ahead of the branch. By finding file differences with respect to the merge base we will only include actually changed files.

See https://matthew-brett.github.io/pydagogue/git_diff_dots.html

Signed-off-by: Kai Fricke <kai@anyscale.com>
2022-07-20 19:39:22 +01:00
Siyuan (Ryans) Zhuang
c29a754526
[Core] Fix typo in logging during lineage reconstruction #26681
Signed-off-by: Siyuan Zhuang <suquark@gmail.com>
2022-07-20 11:18:12 -07:00
Matti Picus
6a71a293b2
cast to remove warning with MSVC (#25594)
Remove one source of many build warnings when building with MSVC

Co-authored-by: Philipp Moritz <pcmoritz@gmail.com>
2022-07-20 10:49:04 -07:00
tomsunelite
d915529e9e
Add doc for custom lifetime of java actor (#26706)
Custom lifetime of java Actor is already supported, but the related document is not updated

Co-authored-by: sunkunjian1 <sunkunjian1@jd.com>
2022-07-20 22:19:44 +08:00
matthewdeng
2a425b195c
[air] change default strategy to PACK (#26757) 2022-07-19 23:01:24 -07:00
mwtian
e157989a7a
Remove @mwtian from code owners #26769 2022-07-19 22:39:29 -07:00
Matti Picus
b835cb944d
redo agent_pid -> agent_id (#25806)
Redo the agent-id changes from #24968. The original PR is in the first commit, the second commit fixes a fatal flaw when using RAY_BACKEND_LOG_LEVEL=debug, which caused the "Ray C++, Java" tests to fail on macOS.
2022-07-19 20:26:49 -07:00
Tao Wang
4f2747f12a
[Core][C++ worker] Add GetNamespace api (#26509) 2022-07-20 11:17:14 +08:00
Edward Oakes
887f6726d5
[serve] Soft SPREAD replicas by default (#26734)
Currently replicas for each deployment are packed based on Ray's default scheduling policy. This is problematic when node failures occur because a given deployment may have all of its replicas crash at once.

This PR changes the default behavior to a soft SPREAD. If the replicas can be spread based on current resources, they will be, else they will still be placed.


Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
2022-07-19 20:12:47 -07:00
Tao Wang
cd521ed132
[Doc][namespaces][C++ worker]add document for c++ worker namespace and specifying namespace while creating/getting named actors (#26498)
We've supported namespace in c++ worker in https://github.com/ray-project/ray/pull/26327. Here we add doc for usage and also reinforce the documents of Java and Python, like adding explanation of specifying namespace while creating named actors.

- [x] add doc for basic c++ worker namespace usage
- [x] add explanation for specifying namespace while creating named actors, in Python, Java and C++
2022-07-20 10:58:41 +08:00
Eric Liang
0f6beca16e
[AIR] Execute GPU inference in a separate stage in BatchPredictor (#26616) 2022-07-19 19:16:08 -07:00
Guyang Song
f96f5a1c18
[runtime env] plugin refactor [5/n]: support priority (#26659) 2022-07-20 10:07:06 +08:00
Julius Frost
b87731c1b6
Windows gpu detection workaround with GPUtil (#25701)
Because [WMIC is now deprecated](https://docs.microsoft.com/en-us/windows/deployment/planning/windows-10-deprecated-features), #9300 may stop working on recent Windows systems. As a workaround this PR extends GPUtil to do GPU detection when installed on Windows systems.

Co-authored-by: Matti Picus <matti.picus@gmail.com>
2022-07-19 17:04:46 -07:00
Eric Liang
b0eb051282
[air] Accessors for preprocessor in Predictor class (#26600) 2022-07-19 16:42:33 -07:00
Jiao
e7ab969f61
[P0][Release Blocker Fix] Larger headnode for tune_scalability_network_overhead weekly test (#26742) 2022-07-19 16:40:25 -07:00
Dmitri Gekhtman
e117aa77c3
Re-revert skipping version check in Ray status (#26741)
* Revert "Revert "[KubeRay][Autoscaler][Core] Add a flag to disable ray status version check (#26584)" (#26597)"

(Fixes test issue.)
2022-07-19 16:25:47 -07:00
Avnish Narayan
9063cc9d5e
[RLlib] Fix memory leak in APEX_DQN (#26691) 2022-07-19 16:16:24 -07:00
Sihan Wang
445d277973
[Serve] Add @sihan to Serve Docs CODEOWNERS (#26743) 2022-07-19 15:37:19 -07:00
Jiajun Yao
2603aea4c9
[CI] Chaos tests for dataset random shuffle 1tb (#26738)
- Add chaos tests for dataset random shuffle 1tb: both simple shuffle and push-based shuffle
- Mark dataset_shuffle_push_based_random_shuffle_1tb as stable
2022-07-19 15:16:51 -07:00
Dmitri Gekhtman
fdd5c53bfd
[KubeRay] Documentation structure and skeleton (#26589)
Adds outline and structure for new KubeRay-based Ray-on-Kubernetes docs.
2022-07-19 13:28:04 -07:00
Jiajun Yao
2b37c32d43
Auto reconnect for gcs aio client (#26673)
#20299 adds auto reconnect for sync gcs client and this PR does the same thing for async gcs client.
2022-07-19 13:11:09 -07:00
Avnish Narayan
af41f21be0
[RLlib] Make queue placement ops blocking (#26581)
Signed-off-by: avnish avnish@anyscale.com

This change should fix issues with IMPALA and potentially APEX that stem from the various learner threads

Signed-off-by: avnish <avnish@anyscale.com>
2022-07-19 20:07:36 +01:00
Kai Fricke
7aac00bcc1
[air/hotfix] Fix test_tune (#26721)
Broken by #26493

Signed-off-by: Kai Fricke <kai@anyscale.com>
2022-07-19 19:25:29 +01:00
Stephanie Wang
1cd73f2a2b
[core] Fix bug in LocalObjectManager reporting for bytes pending spill (#26662)
Each node is supposed to report bytes used by its primary in-memory object copies. During spilling, this number is set incorrectly to 1 (see #26639 for more details).

This PR changes the reporting to include objects that are currently being spilled. It also splits out the "return nonzero number if there are local spilled objects" logic into a separate method.
Related issue number

Closes #26639.

Signed-off-by: Stephanie Wang <swang@cs.berkeley.edu>
2022-07-19 10:28:00 -07:00
xwjiang2010
75027eb479
[air/benchmarks] train/tune benchmark (#26564)
Making sure that tuning multiple trials in parallel is not significantly slower than training each individual trials.
Some overhead is expected.

Signed-off-by: Xiaowei Jiang <xwjiang2010@gmail.com>
Signed-off-by: Richard Liaw <rliaw@berkeley.edu>
Signed-off-by: Kai Fricke <kai@anyscale.com>

Co-authored-by: Jimmy Yao <jiahaoyao.math@gmail.com>
Co-authored-by: Richard Liaw <rliaw@berkeley.edu>
Co-authored-by: Kai Fricke <kai@anyscale.com>
2022-07-19 18:24:39 +01:00
Kai Fricke
02dded1e50
[air/tuner] Add checkpoint_frequency/checkpoint_at_end arguments to CheckpointConfig (#26661) 2022-07-19 10:06:35 -07:00
Richard Liaw
6563c2762d
[air] add pytorch benchmark number (#26719) 2022-07-19 09:51:13 -07:00
Cheng Su
03eb9f153c
[Datasets] Explicitly define Dataset-like APIs in DatasetPipeline class (#26627)
Rework of #26394, which gets reverted due to unit test failure.
2022-07-19 09:37:15 -07:00